github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/forwarding/state.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.33.0
     4  // 	protoc        v5.26.1
     5  // source: forwarding/state.proto
     6  
     7  package forwarding
     8  
     9  import (
    10  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    11  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    12  	reflect "reflect"
    13  	sync "sync"
    14  )
    15  
    16  const (
    17  	// Verify that this generated code is sufficiently up-to-date.
    18  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    19  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    20  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    21  )
    22  
    23  // Status encodes the status of a forwarding session.
    24  type Status int32
    25  
    26  const (
    27  	// Status_Disconnected indicates that the session is disconnected.
    28  	Status_Disconnected Status = 0
    29  	// Status_ConnectingSource indicates that the session is in the process of
    30  	// connecting to the source endpoint.
    31  	Status_ConnectingSource Status = 1
    32  	// Status_ConnectingDestination indicates that the session is in the process
    33  	// of connecting to the destination endpoint.
    34  	Status_ConnectingDestination Status = 2
    35  	// Status_ForwardingConnections indicates that the session is connected and
    36  	// currently forwarding connections.
    37  	Status_ForwardingConnections Status = 3
    38  )
    39  
    40  // Enum value maps for Status.
    41  var (
    42  	Status_name = map[int32]string{
    43  		0: "Disconnected",
    44  		1: "ConnectingSource",
    45  		2: "ConnectingDestination",
    46  		3: "ForwardingConnections",
    47  	}
    48  	Status_value = map[string]int32{
    49  		"Disconnected":          0,
    50  		"ConnectingSource":      1,
    51  		"ConnectingDestination": 2,
    52  		"ForwardingConnections": 3,
    53  	}
    54  )
    55  
    56  func (x Status) Enum() *Status {
    57  	p := new(Status)
    58  	*p = x
    59  	return p
    60  }
    61  
    62  func (x Status) String() string {
    63  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    64  }
    65  
    66  func (Status) Descriptor() protoreflect.EnumDescriptor {
    67  	return file_forwarding_state_proto_enumTypes[0].Descriptor()
    68  }
    69  
    70  func (Status) Type() protoreflect.EnumType {
    71  	return &file_forwarding_state_proto_enumTypes[0]
    72  }
    73  
    74  func (x Status) Number() protoreflect.EnumNumber {
    75  	return protoreflect.EnumNumber(x)
    76  }
    77  
    78  // Deprecated: Use Status.Descriptor instead.
    79  func (Status) EnumDescriptor() ([]byte, []int) {
    80  	return file_forwarding_state_proto_rawDescGZIP(), []int{0}
    81  }
    82  
    83  // EndpointState encodes the current state of a forwarding endpoint. It is
    84  // mutable within the context of the daemon, so it should be accessed and
    85  // modified in a synchronized fashion. Outside of the daemon (e.g. when returned
    86  // via the API), it should be considered immutable.
    87  type EndpointState struct {
    88  	state         protoimpl.MessageState
    89  	sizeCache     protoimpl.SizeCache
    90  	unknownFields protoimpl.UnknownFields
    91  
    92  	// Connected indicates whether or not the controller is currently connected
    93  	// to the endpoint.
    94  	Connected bool `protobuf:"varint,1,opt,name=connected,proto3" json:"connected,omitempty"`
    95  }
    96  
    97  func (x *EndpointState) Reset() {
    98  	*x = EndpointState{}
    99  	if protoimpl.UnsafeEnabled {
   100  		mi := &file_forwarding_state_proto_msgTypes[0]
   101  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   102  		ms.StoreMessageInfo(mi)
   103  	}
   104  }
   105  
   106  func (x *EndpointState) String() string {
   107  	return protoimpl.X.MessageStringOf(x)
   108  }
   109  
   110  func (*EndpointState) ProtoMessage() {}
   111  
   112  func (x *EndpointState) ProtoReflect() protoreflect.Message {
   113  	mi := &file_forwarding_state_proto_msgTypes[0]
   114  	if protoimpl.UnsafeEnabled && x != nil {
   115  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   116  		if ms.LoadMessageInfo() == nil {
   117  			ms.StoreMessageInfo(mi)
   118  		}
   119  		return ms
   120  	}
   121  	return mi.MessageOf(x)
   122  }
   123  
   124  // Deprecated: Use EndpointState.ProtoReflect.Descriptor instead.
   125  func (*EndpointState) Descriptor() ([]byte, []int) {
   126  	return file_forwarding_state_proto_rawDescGZIP(), []int{0}
   127  }
   128  
   129  func (x *EndpointState) GetConnected() bool {
   130  	if x != nil {
   131  		return x.Connected
   132  	}
   133  	return false
   134  }
   135  
   136  // State encodes the current state of a forwarding session. It is mutable within
   137  // the context of the daemon, so it should be accessed and modified in a
   138  // synchronized fashion. Outside of the daemon (e.g. when returned via the API),
   139  // it should be considered immutable.
   140  type State struct {
   141  	state         protoimpl.MessageState
   142  	sizeCache     protoimpl.SizeCache
   143  	unknownFields protoimpl.UnknownFields
   144  
   145  	// Session is the session specification.
   146  	Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
   147  	// Status is the status of the session.
   148  	Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=forwarding.Status" json:"status,omitempty"`
   149  	// LastError indicates the last error that occurred during forwarding.
   150  	LastError string `protobuf:"bytes,3,opt,name=lastError,proto3" json:"lastError,omitempty"`
   151  	// OpenConnections is the number of connections currently open and being
   152  	// forwarded.
   153  	OpenConnections uint64 `protobuf:"varint,4,opt,name=openConnections,proto3" json:"openConnections,omitempty"`
   154  	// TotalConnections is the number of total connections that have been opened
   155  	// and forwarded (including those that are currently open).
   156  	TotalConnections uint64 `protobuf:"varint,5,opt,name=totalConnections,proto3" json:"totalConnections,omitempty"`
   157  	// TotalOutboundData is the total amount of data (in bytes) that has been
   158  	// transmitted from source to destination across all forwarded connections.
   159  	TotalOutboundData uint64 `protobuf:"varint,6,opt,name=totalOutboundData,proto3" json:"totalOutboundData,omitempty"`
   160  	// TotalInboundData is the total amount of data (in bytes) that has been
   161  	// transmitted from destination to source across all forwarded connections.
   162  	TotalInboundData uint64 `protobuf:"varint,7,opt,name=totalInboundData,proto3" json:"totalInboundData,omitempty"`
   163  	// SourceState encodes the state of the source endpoint. It is always
   164  	// non-nil.
   165  	SourceState *EndpointState `protobuf:"bytes,8,opt,name=sourceState,proto3" json:"sourceState,omitempty"`
   166  	// DestinationState encodes the state of the destination endpoint. It is
   167  	// always non-nil.
   168  	DestinationState *EndpointState `protobuf:"bytes,9,opt,name=destinationState,proto3" json:"destinationState,omitempty"`
   169  }
   170  
   171  func (x *State) Reset() {
   172  	*x = State{}
   173  	if protoimpl.UnsafeEnabled {
   174  		mi := &file_forwarding_state_proto_msgTypes[1]
   175  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   176  		ms.StoreMessageInfo(mi)
   177  	}
   178  }
   179  
   180  func (x *State) String() string {
   181  	return protoimpl.X.MessageStringOf(x)
   182  }
   183  
   184  func (*State) ProtoMessage() {}
   185  
   186  func (x *State) ProtoReflect() protoreflect.Message {
   187  	mi := &file_forwarding_state_proto_msgTypes[1]
   188  	if protoimpl.UnsafeEnabled && x != nil {
   189  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   190  		if ms.LoadMessageInfo() == nil {
   191  			ms.StoreMessageInfo(mi)
   192  		}
   193  		return ms
   194  	}
   195  	return mi.MessageOf(x)
   196  }
   197  
   198  // Deprecated: Use State.ProtoReflect.Descriptor instead.
   199  func (*State) Descriptor() ([]byte, []int) {
   200  	return file_forwarding_state_proto_rawDescGZIP(), []int{1}
   201  }
   202  
   203  func (x *State) GetSession() *Session {
   204  	if x != nil {
   205  		return x.Session
   206  	}
   207  	return nil
   208  }
   209  
   210  func (x *State) GetStatus() Status {
   211  	if x != nil {
   212  		return x.Status
   213  	}
   214  	return Status_Disconnected
   215  }
   216  
   217  func (x *State) GetLastError() string {
   218  	if x != nil {
   219  		return x.LastError
   220  	}
   221  	return ""
   222  }
   223  
   224  func (x *State) GetOpenConnections() uint64 {
   225  	if x != nil {
   226  		return x.OpenConnections
   227  	}
   228  	return 0
   229  }
   230  
   231  func (x *State) GetTotalConnections() uint64 {
   232  	if x != nil {
   233  		return x.TotalConnections
   234  	}
   235  	return 0
   236  }
   237  
   238  func (x *State) GetTotalOutboundData() uint64 {
   239  	if x != nil {
   240  		return x.TotalOutboundData
   241  	}
   242  	return 0
   243  }
   244  
   245  func (x *State) GetTotalInboundData() uint64 {
   246  	if x != nil {
   247  		return x.TotalInboundData
   248  	}
   249  	return 0
   250  }
   251  
   252  func (x *State) GetSourceState() *EndpointState {
   253  	if x != nil {
   254  		return x.SourceState
   255  	}
   256  	return nil
   257  }
   258  
   259  func (x *State) GetDestinationState() *EndpointState {
   260  	if x != nil {
   261  		return x.DestinationState
   262  	}
   263  	return nil
   264  }
   265  
   266  var File_forwarding_state_proto protoreflect.FileDescriptor
   267  
   268  var file_forwarding_state_proto_rawDesc = []byte{
   269  	0x0a, 0x16, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x74, 0x61,
   270  	0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
   271  	0x64, 0x69, 0x6e, 0x67, 0x1a, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
   272  	0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d,
   273  	0x0a, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
   274  	0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
   275  	0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xb4, 0x03,
   276  	0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69,
   277  	0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6f, 0x72, 0x77, 0x61,
   278  	0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73,
   279  	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
   280  	0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
   281  	0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
   282  	0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18,
   283  	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72,
   284  	0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
   285  	0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x43,
   286  	0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f,
   287  	0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05,
   288  	0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
   289  	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f,
   290  	0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
   291  	0x04, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64,
   292  	0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x62,
   293  	0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10,
   294  	0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61,
   295  	0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
   296  	0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69,
   297  	0x6e, 0x67, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65,
   298  	0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a,
   299  	0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
   300  	0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
   301  	0x64, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61,
   302  	0x74, 0x65, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
   303  	0x74, 0x61, 0x74, 0x65, 0x2a, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10,
   304  	0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0x00,
   305  	0x12, 0x14, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x6f,
   306  	0x75, 0x72, 0x63, 0x65, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
   307  	0x74, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10,
   308  	0x02, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x43,
   309  	0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x03, 0x42, 0x2e, 0x5a, 0x2c,
   310  	0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x67,
   311  	0x65, 0x6e, 0x2d, 0x69, 0x6f, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6b,
   312  	0x67, 0x2f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72,
   313  	0x6f, 0x74, 0x6f, 0x33,
   314  }
   315  
   316  var (
   317  	file_forwarding_state_proto_rawDescOnce sync.Once
   318  	file_forwarding_state_proto_rawDescData = file_forwarding_state_proto_rawDesc
   319  )
   320  
   321  func file_forwarding_state_proto_rawDescGZIP() []byte {
   322  	file_forwarding_state_proto_rawDescOnce.Do(func() {
   323  		file_forwarding_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_forwarding_state_proto_rawDescData)
   324  	})
   325  	return file_forwarding_state_proto_rawDescData
   326  }
   327  
   328  var file_forwarding_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   329  var file_forwarding_state_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   330  var file_forwarding_state_proto_goTypes = []interface{}{
   331  	(Status)(0),           // 0: forwarding.Status
   332  	(*EndpointState)(nil), // 1: forwarding.EndpointState
   333  	(*State)(nil),         // 2: forwarding.State
   334  	(*Session)(nil),       // 3: forwarding.Session
   335  }
   336  var file_forwarding_state_proto_depIdxs = []int32{
   337  	3, // 0: forwarding.State.session:type_name -> forwarding.Session
   338  	0, // 1: forwarding.State.status:type_name -> forwarding.Status
   339  	1, // 2: forwarding.State.sourceState:type_name -> forwarding.EndpointState
   340  	1, // 3: forwarding.State.destinationState:type_name -> forwarding.EndpointState
   341  	4, // [4:4] is the sub-list for method output_type
   342  	4, // [4:4] is the sub-list for method input_type
   343  	4, // [4:4] is the sub-list for extension type_name
   344  	4, // [4:4] is the sub-list for extension extendee
   345  	0, // [0:4] is the sub-list for field type_name
   346  }
   347  
   348  func init() { file_forwarding_state_proto_init() }
   349  func file_forwarding_state_proto_init() {
   350  	if File_forwarding_state_proto != nil {
   351  		return
   352  	}
   353  	file_forwarding_session_proto_init()
   354  	if !protoimpl.UnsafeEnabled {
   355  		file_forwarding_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   356  			switch v := v.(*EndpointState); i {
   357  			case 0:
   358  				return &v.state
   359  			case 1:
   360  				return &v.sizeCache
   361  			case 2:
   362  				return &v.unknownFields
   363  			default:
   364  				return nil
   365  			}
   366  		}
   367  		file_forwarding_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   368  			switch v := v.(*State); i {
   369  			case 0:
   370  				return &v.state
   371  			case 1:
   372  				return &v.sizeCache
   373  			case 2:
   374  				return &v.unknownFields
   375  			default:
   376  				return nil
   377  			}
   378  		}
   379  	}
   380  	type x struct{}
   381  	out := protoimpl.TypeBuilder{
   382  		File: protoimpl.DescBuilder{
   383  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   384  			RawDescriptor: file_forwarding_state_proto_rawDesc,
   385  			NumEnums:      1,
   386  			NumMessages:   2,
   387  			NumExtensions: 0,
   388  			NumServices:   0,
   389  		},
   390  		GoTypes:           file_forwarding_state_proto_goTypes,
   391  		DependencyIndexes: file_forwarding_state_proto_depIdxs,
   392  		EnumInfos:         file_forwarding_state_proto_enumTypes,
   393  		MessageInfos:      file_forwarding_state_proto_msgTypes,
   394  	}.Build()
   395  	File_forwarding_state_proto = out.File
   396  	file_forwarding_state_proto_rawDesc = nil
   397  	file_forwarding_state_proto_goTypes = nil
   398  	file_forwarding_state_proto_depIdxs = nil
   399  }