Documentation ¶
Index ¶
- Variables
- func RegisterRemoteConnectionServer(s *grpc.Server, srv RemoteConnectionServer)
- type Closed
- type Data
- type DestroyRequest
- type ExposeRequest
- type ExposeResponse
- type ListResponse
- type NewConnection
- type NullMessage
- type OpenData
- func (*OpenData) Descriptor() ([]byte, []int)deprecated
- func (x *OpenData) GetClosed() *Closed
- func (x *OpenData) GetConnectionId() string
- func (x *OpenData) GetData() *Data
- func (x *OpenData) GetDestroy() *DestroyRequest
- func (x *OpenData) GetError() *status.Status
- func (x *OpenData) GetExpose() *ExposeRequest
- func (m *OpenData) GetMessage() isOpenData_Message
- func (x *OpenData) GetNewConnection() *NewConnection
- func (x *OpenData) GetPing() *NullMessage
- func (x *OpenData) GetReadDone() *ReadDone
- func (x *OpenData) GetServiceId() string
- func (x *OpenData) GetStatusUpdate() *StatusUpdate
- func (x *OpenData) GetWriteDone() *WriteDone
- func (*OpenData) ProtoMessage()
- func (x *OpenData) ProtoReflect() protoreflect.Message
- func (x *OpenData) Reset()
- func (x *OpenData) String() string
- type OpenData_Closed
- type OpenData_Data
- type OpenData_Destroy
- type OpenData_Error
- type OpenData_Expose
- type OpenData_NewConnection
- type OpenData_Ping
- type OpenData_ReadDone
- type OpenData_StatusUpdate
- type OpenData_WriteDone
- type ReadDone
- type RemoteConnectionClient
- type RemoteConnectionServer
- type RemoteConnection_OpenStreamClient
- type RemoteConnection_OpenStreamServer
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetDestinationAddr() string
- func (x *Service) GetId() string
- func (x *Service) GetName() string
- func (x *Service) GetRemoteConnectorAddr() string
- func (x *Service) GetSourcePort() int32
- func (x *Service) GetStatus() ServiceStatus
- func (x *Service) GetType() ServiceType
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- type ServiceStatus
- func (ServiceStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceStatus) Enum() *ServiceStatus
- func (ServiceStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceStatus) Number() protoreflect.EnumNumber
- func (x ServiceStatus) String() string
- func (ServiceStatus) Type() protoreflect.EnumType
- type ServiceType
- func (ServiceType) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceType) Enum() *ServiceType
- func (ServiceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceType) Number() protoreflect.EnumNumber
- func (x ServiceType) String() string
- func (ServiceType) Type() protoreflect.EnumType
- type StatusUpdate
- func (*StatusUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *StatusUpdate) GetMessage() string
- func (x *StatusUpdate) GetStatus() ServiceStatus
- func (*StatusUpdate) ProtoMessage()
- func (x *StatusUpdate) ProtoReflect() protoreflect.Message
- func (x *StatusUpdate) Reset()
- func (x *StatusUpdate) String() string
- type UnimplementedRemoteConnectionServer
- func (*UnimplementedRemoteConnectionServer) DestroyService(context.Context, *DestroyRequest) (*NullMessage, error)
- func (*UnimplementedRemoteConnectionServer) ExposeService(context.Context, *ExposeRequest) (*ExposeResponse, error)
- func (*UnimplementedRemoteConnectionServer) ListServices(context.Context, *NullMessage) (*ListResponse, error)
- func (*UnimplementedRemoteConnectionServer) OpenStream(RemoteConnection_OpenStreamServer) error
- type WriteDone
Constants ¶
This section is empty.
Variables ¶
var ( ServiceType_name = map[int32]string{ 0: "LOCAL", 1: "REMOTE", } ServiceType_value = map[string]int32{ "LOCAL": 0, "REMOTE": 1, } )
Enum value maps for ServiceType.
var ( ServiceStatus_name = map[int32]string{ 0: "PENDING", 1: "COMPLETE", 2: "ERROR", } ServiceStatus_value = map[string]int32{ "PENDING": 0, "COMPLETE": 1, "ERROR": 2, } )
Enum value maps for ServiceStatus.
var File_server_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRemoteConnectionServer ¶
func RegisterRemoteConnectionServer(s *grpc.Server, srv RemoteConnectionServer)
Types ¶
type Closed ¶ added in v0.0.2
type Closed struct {
// contains filtered or unexported fields
}
Closed is sent when a remote connection is closed
func (*Closed) Descriptor
deprecated
added in
v0.0.2
func (*Closed) ProtoMessage ¶ added in v0.0.2
func (*Closed) ProtoMessage()
func (*Closed) ProtoReflect ¶ added in v0.0.2
func (x *Closed) ProtoReflect() protoreflect.Message
type Data ¶ added in v0.0.2
type Data struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
Data is a message containing data for a connection
func (*Data) Descriptor
deprecated
added in
v0.0.2
func (*Data) ProtoMessage ¶ added in v0.0.2
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶ added in v0.0.2
func (x *Data) ProtoReflect() protoreflect.Message
type DestroyRequest ¶
type DestroyRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DestroyRequest) Descriptor
deprecated
func (*DestroyRequest) Descriptor() ([]byte, []int)
Deprecated: Use DestroyRequest.ProtoReflect.Descriptor instead.
func (*DestroyRequest) GetId ¶
func (x *DestroyRequest) GetId() string
func (*DestroyRequest) ProtoMessage ¶
func (*DestroyRequest) ProtoMessage()
func (*DestroyRequest) ProtoReflect ¶ added in v0.0.2
func (x *DestroyRequest) ProtoReflect() protoreflect.Message
func (*DestroyRequest) Reset ¶
func (x *DestroyRequest) Reset()
func (*DestroyRequest) String ¶
func (x *DestroyRequest) String() string
type ExposeRequest ¶
type ExposeRequest struct { Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // contains filtered or unexported fields }
ExposeRequest is a message indicating that a new TCP Listener should be created ExposeRequests will be replayed when a connection is re-opened
func (*ExposeRequest) Descriptor
deprecated
func (*ExposeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExposeRequest.ProtoReflect.Descriptor instead.
func (*ExposeRequest) GetService ¶ added in v0.0.2
func (x *ExposeRequest) GetService() *Service
func (*ExposeRequest) ProtoMessage ¶
func (*ExposeRequest) ProtoMessage()
func (*ExposeRequest) ProtoReflect ¶ added in v0.0.2
func (x *ExposeRequest) ProtoReflect() protoreflect.Message
func (*ExposeRequest) Reset ¶
func (x *ExposeRequest) Reset()
func (*ExposeRequest) String ¶
func (x *ExposeRequest) String() string
type ExposeResponse ¶
type ExposeResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // id of the service // contains filtered or unexported fields }
func (*ExposeResponse) Descriptor
deprecated
func (*ExposeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExposeResponse.ProtoReflect.Descriptor instead.
func (*ExposeResponse) GetId ¶
func (x *ExposeResponse) GetId() string
func (*ExposeResponse) ProtoMessage ¶
func (*ExposeResponse) ProtoMessage()
func (*ExposeResponse) ProtoReflect ¶ added in v0.0.2
func (x *ExposeResponse) ProtoReflect() protoreflect.Message
func (*ExposeResponse) Reset ¶
func (x *ExposeResponse) Reset()
func (*ExposeResponse) String ¶
func (x *ExposeResponse) String() string
type ListResponse ¶ added in v0.0.2
type ListResponse struct { Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
added in
v0.0.2
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetServices ¶ added in v0.0.2
func (x *ListResponse) GetServices() []*Service
func (*ListResponse) ProtoMessage ¶ added in v0.0.2
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶ added in v0.0.2
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶ added in v0.0.2
func (x *ListResponse) Reset()
func (*ListResponse) String ¶ added in v0.0.2
func (x *ListResponse) String() string
type NewConnection ¶ added in v0.0.2
type NewConnection struct {
// contains filtered or unexported fields
}
Indicates that a new connection has been received
func (*NewConnection) Descriptor
deprecated
added in
v0.0.2
func (*NewConnection) Descriptor() ([]byte, []int)
Deprecated: Use NewConnection.ProtoReflect.Descriptor instead.
func (*NewConnection) ProtoMessage ¶ added in v0.0.2
func (*NewConnection) ProtoMessage()
func (*NewConnection) ProtoReflect ¶ added in v0.0.2
func (x *NewConnection) ProtoReflect() protoreflect.Message
func (*NewConnection) Reset ¶ added in v0.0.2
func (x *NewConnection) Reset()
func (*NewConnection) String ¶ added in v0.0.2
func (x *NewConnection) String() string
type NullMessage ¶ added in v0.0.2
type NullMessage struct {
// contains filtered or unexported fields
}
Expose remote service - allow traffic on remote server 8081 to be exposed locally at 8080
- ExposeRequest called on local server name = service name serverAddr = http://remote.server localPort = 8080 remotePort = 8081 type = remote
- Call CreateListener on local server to setup a TCP listener name = service name port = 8080
- OpenStream called on remote if no stream exists
func (*NullMessage) Descriptor
deprecated
added in
v0.0.2
func (*NullMessage) Descriptor() ([]byte, []int)
Deprecated: Use NullMessage.ProtoReflect.Descriptor instead.
func (*NullMessage) ProtoMessage ¶ added in v0.0.2
func (*NullMessage) ProtoMessage()
func (*NullMessage) ProtoReflect ¶ added in v0.0.2
func (x *NullMessage) ProtoReflect() protoreflect.Message
func (*NullMessage) Reset ¶ added in v0.0.2
func (x *NullMessage) Reset()
func (*NullMessage) String ¶ added in v0.0.2
func (x *NullMessage) String() string
type OpenData ¶
type OpenData struct { ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // different messages can be sent to the stream // // Types that are assignable to Message: // *OpenData_Data // *OpenData_Expose // *OpenData_Destroy // *OpenData_NewConnection // *OpenData_WriteDone // *OpenData_ReadDone // *OpenData_Closed // *OpenData_StatusUpdate // *OpenData_Ping // *OpenData_Error Message isOpenData_Message `protobuf_oneof:"message"` // contains filtered or unexported fields }
func (*OpenData) Descriptor
deprecated
func (*OpenData) GetConnectionId ¶
func (*OpenData) GetDestroy ¶ added in v0.0.2
func (x *OpenData) GetDestroy() *DestroyRequest
func (*OpenData) GetExpose ¶ added in v0.0.2
func (x *OpenData) GetExpose() *ExposeRequest
func (*OpenData) GetMessage ¶ added in v0.0.2
func (m *OpenData) GetMessage() isOpenData_Message
func (*OpenData) GetNewConnection ¶ added in v0.0.2
func (x *OpenData) GetNewConnection() *NewConnection
func (*OpenData) GetPing ¶ added in v0.0.3
func (x *OpenData) GetPing() *NullMessage
func (*OpenData) GetReadDone ¶ added in v0.0.2
func (*OpenData) GetServiceId ¶
func (*OpenData) GetStatusUpdate ¶ added in v0.0.2
func (x *OpenData) GetStatusUpdate() *StatusUpdate
func (*OpenData) GetWriteDone ¶ added in v0.0.2
func (*OpenData) ProtoMessage ¶
func (*OpenData) ProtoMessage()
func (*OpenData) ProtoReflect ¶ added in v0.0.2
func (x *OpenData) ProtoReflect() protoreflect.Message
type OpenData_Closed ¶ added in v0.0.2
type OpenData_Closed struct {
Closed *Closed `protobuf:"bytes,9,opt,name=closed,proto3,oneof"`
}
type OpenData_Data ¶ added in v0.0.2
type OpenData_Data struct {
Data *Data `protobuf:"bytes,3,opt,name=data,proto3,oneof"`
}
type OpenData_Destroy ¶ added in v0.0.2
type OpenData_Destroy struct {
Destroy *DestroyRequest `protobuf:"bytes,5,opt,name=destroy,proto3,oneof"`
}
type OpenData_Error ¶ added in v0.0.2
type OpenData_Expose ¶ added in v0.0.2
type OpenData_Expose struct {
Expose *ExposeRequest `protobuf:"bytes,4,opt,name=expose,proto3,oneof"`
}
type OpenData_NewConnection ¶ added in v0.0.2
type OpenData_NewConnection struct {
NewConnection *NewConnection `protobuf:"bytes,6,opt,name=new_connection,json=newConnection,proto3,oneof"`
}
type OpenData_Ping ¶ added in v0.0.3
type OpenData_Ping struct {
Ping *NullMessage `protobuf:"bytes,11,opt,name=ping,proto3,oneof"`
}
type OpenData_ReadDone ¶ added in v0.0.2
type OpenData_ReadDone struct {
ReadDone *ReadDone `protobuf:"bytes,8,opt,name=read_done,json=readDone,proto3,oneof"`
}
type OpenData_StatusUpdate ¶ added in v0.0.2
type OpenData_StatusUpdate struct {
StatusUpdate *StatusUpdate `protobuf:"bytes,10,opt,name=status_update,json=statusUpdate,proto3,oneof"`
}
type OpenData_WriteDone ¶ added in v0.0.2
type OpenData_WriteDone struct {
WriteDone *WriteDone `protobuf:"bytes,7,opt,name=write_done,json=writeDone,proto3,oneof"`
}
type ReadDone ¶ added in v0.0.2
type ReadDone struct {
// contains filtered or unexported fields
}
ReadDone is sent when all data has been read from a socket the next step is to write a reply
func (*ReadDone) Descriptor
deprecated
added in
v0.0.2
func (*ReadDone) ProtoMessage ¶ added in v0.0.2
func (*ReadDone) ProtoMessage()
func (*ReadDone) ProtoReflect ¶ added in v0.0.2
func (x *ReadDone) ProtoReflect() protoreflect.Message
type RemoteConnectionClient ¶
type RemoteConnectionClient interface { // Open a stream between two servers OpenStream(ctx context.Context, opts ...grpc.CallOption) (RemoteConnection_OpenStreamClient, error) // Open a new TCP port for the local service on the server and start listening ExposeService(ctx context.Context, in *ExposeRequest, opts ...grpc.CallOption) (*ExposeResponse, error) // Close the remote TCP port and remove all resources DestroyService(ctx context.Context, in *DestroyRequest, opts ...grpc.CallOption) (*NullMessage, error) // Close the remote TCP port and remove all resources ListServices(ctx context.Context, in *NullMessage, opts ...grpc.CallOption) (*ListResponse, error) }
RemoteConnectionClient is the client API for RemoteConnection service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRemoteConnectionClient ¶
func NewRemoteConnectionClient(cc grpc.ClientConnInterface) RemoteConnectionClient
type RemoteConnectionServer ¶
type RemoteConnectionServer interface { // Open a stream between two servers OpenStream(RemoteConnection_OpenStreamServer) error // Open a new TCP port for the local service on the server and start listening ExposeService(context.Context, *ExposeRequest) (*ExposeResponse, error) // Close the remote TCP port and remove all resources DestroyService(context.Context, *DestroyRequest) (*NullMessage, error) // Close the remote TCP port and remove all resources ListServices(context.Context, *NullMessage) (*ListResponse, error) }
RemoteConnectionServer is the server API for RemoteConnection service.
type Service ¶ added in v0.0.2
type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // id for the service Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // name of the service RemoteConnectorAddr string `protobuf:"bytes,3,opt,name=remoteConnectorAddr,proto3" json:"remoteConnectorAddr,omitempty"` // address of the remote component for the service DestinationAddr string `protobuf:"bytes,4,opt,name=destinationAddr,proto3" json:"destinationAddr,omitempty"` // address of the service being exposed SourcePort int32 `protobuf:"varint,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` // local port to expose on Type ServiceType `protobuf:"varint,6,opt,name=type,proto3,enum=shipyard.ServiceType" json:"type,omitempty"` // is the service running on this machine or the remote machine Status ServiceStatus `protobuf:"varint,7,opt,name=status,proto3,enum=shipyard.ServiceStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Service) Descriptor
deprecated
added in
v0.0.2
func (*Service) GetDestinationAddr ¶ added in v0.0.2
func (*Service) GetRemoteConnectorAddr ¶ added in v0.0.2
func (*Service) GetSourcePort ¶ added in v0.0.2
func (*Service) GetStatus ¶ added in v0.0.2
func (x *Service) GetStatus() ServiceStatus
func (*Service) GetType ¶ added in v0.0.2
func (x *Service) GetType() ServiceType
func (*Service) ProtoMessage ¶ added in v0.0.2
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶ added in v0.0.2
func (x *Service) ProtoReflect() protoreflect.Message
type ServiceStatus ¶ added in v0.0.2
type ServiceStatus int32
const ( ServiceStatus_PENDING ServiceStatus = 0 // Service is pending setup ServiceStatus_COMPLETE ServiceStatus = 1 // Service has been setup ServiceStatus_ERROR ServiceStatus = 2 // Service has errored when attempting setup )
func (ServiceStatus) Descriptor ¶ added in v0.0.2
func (ServiceStatus) Descriptor() protoreflect.EnumDescriptor
func (ServiceStatus) Enum ¶ added in v0.0.2
func (x ServiceStatus) Enum() *ServiceStatus
func (ServiceStatus) EnumDescriptor
deprecated
added in
v0.0.2
func (ServiceStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceStatus.Descriptor instead.
func (ServiceStatus) Number ¶ added in v0.0.2
func (x ServiceStatus) Number() protoreflect.EnumNumber
func (ServiceStatus) String ¶ added in v0.0.2
func (x ServiceStatus) String() string
func (ServiceStatus) Type ¶ added in v0.0.2
func (ServiceStatus) Type() protoreflect.EnumType
type ServiceType ¶
type ServiceType int32
const ( ServiceType_LOCAL ServiceType = 0 // Service exists on local component ServiceType_REMOTE ServiceType = 1 // Service exists on remote component )
func (ServiceType) Descriptor ¶ added in v0.0.2
func (ServiceType) Descriptor() protoreflect.EnumDescriptor
func (ServiceType) Enum ¶ added in v0.0.2
func (x ServiceType) Enum() *ServiceType
func (ServiceType) EnumDescriptor
deprecated
func (ServiceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceType.Descriptor instead.
func (ServiceType) Number ¶ added in v0.0.2
func (x ServiceType) Number() protoreflect.EnumNumber
func (ServiceType) String ¶
func (x ServiceType) String() string
func (ServiceType) Type ¶ added in v0.0.2
func (ServiceType) Type() protoreflect.EnumType
type StatusUpdate ¶ added in v0.0.2
type StatusUpdate struct { Status ServiceStatus `protobuf:"varint,1,opt,name=status,proto3,enum=shipyard.ServiceStatus" json:"status,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
StatusUpdate is sent by the remote connector when the status of a service changes
func (*StatusUpdate) Descriptor
deprecated
added in
v0.0.2
func (*StatusUpdate) Descriptor() ([]byte, []int)
Deprecated: Use StatusUpdate.ProtoReflect.Descriptor instead.
func (*StatusUpdate) GetMessage ¶ added in v0.0.2
func (x *StatusUpdate) GetMessage() string
func (*StatusUpdate) GetStatus ¶ added in v0.0.2
func (x *StatusUpdate) GetStatus() ServiceStatus
func (*StatusUpdate) ProtoMessage ¶ added in v0.0.2
func (*StatusUpdate) ProtoMessage()
func (*StatusUpdate) ProtoReflect ¶ added in v0.0.2
func (x *StatusUpdate) ProtoReflect() protoreflect.Message
func (*StatusUpdate) Reset ¶ added in v0.0.2
func (x *StatusUpdate) Reset()
func (*StatusUpdate) String ¶ added in v0.0.2
func (x *StatusUpdate) String() string
type UnimplementedRemoteConnectionServer ¶
type UnimplementedRemoteConnectionServer struct { }
UnimplementedRemoteConnectionServer can be embedded to have forward compatible implementations.
func (*UnimplementedRemoteConnectionServer) DestroyService ¶
func (*UnimplementedRemoteConnectionServer) DestroyService(context.Context, *DestroyRequest) (*NullMessage, error)
func (*UnimplementedRemoteConnectionServer) ExposeService ¶
func (*UnimplementedRemoteConnectionServer) ExposeService(context.Context, *ExposeRequest) (*ExposeResponse, error)
func (*UnimplementedRemoteConnectionServer) ListServices ¶ added in v0.0.2
func (*UnimplementedRemoteConnectionServer) ListServices(context.Context, *NullMessage) (*ListResponse, error)
func (*UnimplementedRemoteConnectionServer) OpenStream ¶
func (*UnimplementedRemoteConnectionServer) OpenStream(RemoteConnection_OpenStreamServer) error
type WriteDone ¶ added in v0.0.2
type WriteDone struct {
// contains filtered or unexported fields
}
WriteDone is sent when writing to a socket has been completed the next step is to read a reply
func (*WriteDone) Descriptor
deprecated
added in
v0.0.2
func (*WriteDone) ProtoMessage ¶ added in v0.0.2
func (*WriteDone) ProtoMessage()
func (*WriteDone) ProtoReflect ¶ added in v0.0.2
func (x *WriteDone) ProtoReflect() protoreflect.Message