remote

package
v0.0.0-...-76c172a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 31 Imported by: 27

Documentation

Overview

Package remote provides access to actors across a network or other I/O connection.

Index

Constants

This section is empty.

Variables

View Source
var (
	ActorPidRespErr         interface{} = &ActorPidResponse{StatusCode: ResponseStatusCodeERROR.ToInt32()}
	ActorPidRespTimeout     interface{} = &ActorPidResponse{StatusCode: ResponseStatusCodeTIMEOUT.ToInt32()}
	ActorPidRespUnavailable interface{} = &ActorPidResponse{StatusCode: ResponseStatusCodeUNAVAILABLE.ToInt32()}
)
View Source
var (
	ListProcessesMatchType_name = map[int32]string{
		0: "MatchPartOfString",
		1: "MatchExactString",
		2: "MatchRegex",
	}
	ListProcessesMatchType_value = map[string]int32{
		"MatchPartOfString": 0,
		"MatchExactString":  1,
		"MatchRegex":        2,
	}
)

Enum value maps for ListProcessesMatchType.

View Source
var (
	DefaultSerializerID int32
)
View Source
var ErrActivatorUnavailable = &ActivatorError{ResponseStatusCodeUNAVAILABLE.ToInt32(), true}

ErrActivatorUnavailable : this error will not panic the Activator. It simply tells Partition this Activator is not available Partition will then find next available Activator to spawn

View Source
var File_remote_proto protoreflect.FileDescriptor
View Source
var Remoting_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "remote.Remoting",
	HandlerType: (*RemotingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListProcesses",
			Handler:    _Remoting_ListProcesses_Handler,
		},
		{
			MethodName: "GetProcessDiagnostics",
			Handler:    _Remoting_GetProcessDiagnostics_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Receive",
			Handler:       _Remoting_Receive_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "remote.proto",
}

Remoting_ServiceDesc is the grpc.ServiceDesc for Remoting service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func Deserialize

func Deserialize(message []byte, typeName string, serializerID int32) (interface{}, error)

func NewEndpointLazy

func NewEndpointLazy(em *endpointManager, address string) *endpointLazy

func RegisterRemotingServer

func RegisterRemotingServer(s grpc.ServiceRegistrar, srv RemotingServer)

func RegisterSerializer

func RegisterSerializer(serializer Serializer)

func Serialize

func Serialize(message interface{}, serializerID int32) ([]byte, string, error)

Types

type ActivatorError

type ActivatorError struct {
	Code       int32
	DoNotPanic bool
}

func (*ActivatorError) Error

func (e *ActivatorError) Error() string

type ActorPidRequest

type ActorPidRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorPidRequest) Descriptor deprecated

func (*ActorPidRequest) Descriptor() ([]byte, []int)

Deprecated: Use ActorPidRequest.ProtoReflect.Descriptor instead.

func (*ActorPidRequest) GetKind

func (x *ActorPidRequest) GetKind() string

func (*ActorPidRequest) GetName

func (x *ActorPidRequest) GetName() string

func (*ActorPidRequest) ProtoMessage

func (*ActorPidRequest) ProtoMessage()

func (*ActorPidRequest) ProtoReflect

func (x *ActorPidRequest) ProtoReflect() protoreflect.Message

func (*ActorPidRequest) Reset

func (x *ActorPidRequest) Reset()

func (*ActorPidRequest) String

func (x *ActorPidRequest) String() string

type ActorPidResponse

type ActorPidResponse struct {
	Pid        *actor.PID `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	StatusCode int32      `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorPidResponse) Descriptor deprecated

func (*ActorPidResponse) Descriptor() ([]byte, []int)

Deprecated: Use ActorPidResponse.ProtoReflect.Descriptor instead.

func (*ActorPidResponse) GetPid

func (x *ActorPidResponse) GetPid() *actor.PID

func (*ActorPidResponse) GetStatusCode

func (x *ActorPidResponse) GetStatusCode() int32

func (*ActorPidResponse) ProtoMessage

func (*ActorPidResponse) ProtoMessage()

func (*ActorPidResponse) ProtoReflect

func (x *ActorPidResponse) ProtoReflect() protoreflect.Message

func (*ActorPidResponse) Reset

func (x *ActorPidResponse) Reset()

func (*ActorPidResponse) String

func (x *ActorPidResponse) String() string

type BlockList

type BlockList struct {
	// contains filtered or unexported fields
}

TODO: document it

func NewBlockList

func NewBlockList() *BlockList

func (*BlockList) Block

func (bl *BlockList) Block(memberIDs ...string)

Block adds the given memberID list to the BlockList

func (*BlockList) BlockedMembers

func (bl *BlockList) BlockedMembers() set.Set[string]

func (*BlockList) IsBlocked

func (bl *BlockList) IsBlocked(memberID string) bool

IsBlocked returns true if the given memberID string has been ever added to the BlockList

func (*BlockList) Len

func (bl *BlockList) Len() int

Len returns the number of blocked members

type ClientConnection

type ClientConnection struct {
	SystemId string `protobuf:"bytes,1,opt,name=SystemId,proto3" json:"SystemId,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientConnection) Descriptor deprecated

func (*ClientConnection) Descriptor() ([]byte, []int)

Deprecated: Use ClientConnection.ProtoReflect.Descriptor instead.

func (*ClientConnection) GetSystemId

func (x *ClientConnection) GetSystemId() string

func (*ClientConnection) ProtoMessage

func (*ClientConnection) ProtoMessage()

func (*ClientConnection) ProtoReflect

func (x *ClientConnection) ProtoReflect() protoreflect.Message

func (*ClientConnection) Reset

func (x *ClientConnection) Reset()

func (*ClientConnection) String

func (x *ClientConnection) String() string

type Config

type Config struct {
	Host                     string
	Port                     int
	AdvertisedHost           string
	ServerOptions            []grpc.ServerOption
	CallOptions              []grpc.CallOption
	DialOptions              []grpc.DialOption
	EndpointWriterBatchSize  int
	EndpointWriterQueueSize  int
	EndpointManagerBatchSize int
	EndpointManagerQueueSize int
	Kinds                    map[string]*actor.Props
	MaxRetryCount            int
}

Config is the configuration for the remote

func Configure

func Configure(host string, port int, options ...ConfigOption) *Config

Configure configures the remote

func (Config) Address

func (rc Config) Address() string

Address returns the address of the remote

type ConfigOption

type ConfigOption func(config *Config)

func WithAdvertisedHost

func WithAdvertisedHost(address string) ConfigOption

WithAdvertisedHost sets the advertised host for the remote

func WithCallOptions

func WithCallOptions(options ...grpc.CallOption) ConfigOption

WithCallOptions sets the call options for the remote

func WithDialOptions

func WithDialOptions(options ...grpc.DialOption) ConfigOption

WithDialOptions sets the dial options for the remote

func WithEndpointManagerBatchSize

func WithEndpointManagerBatchSize(batchSize int) ConfigOption

WithEndpointManagerBatchSize sets the batch size for the endpoint manager

func WithEndpointManagerQueueSize

func WithEndpointManagerQueueSize(queueSize int) ConfigOption

WithEndpointManagerQueueSize sets the queue size for the endpoint manager

func WithEndpointWriterBatchSize

func WithEndpointWriterBatchSize(batchSize int) ConfigOption

WithEndpointWriterBatchSize sets the batch size for the endpoint writer

func WithEndpointWriterQueueSize

func WithEndpointWriterQueueSize(queueSize int) ConfigOption

WithEndpointWriterQueueSize sets the queue size for the endpoint writer

func WithKinds

func WithKinds(kinds ...*Kind) ConfigOption

WithKinds adds the kinds to the remote

func WithServerOptions

func WithServerOptions(options ...grpc.ServerOption) ConfigOption

WithServerOptions sets the server options for the remote

type ConnectRequest

type ConnectRequest struct {

	// Types that are assignable to ConnectionType:
	//	*ConnectRequest_ClientConnection
	//	*ConnectRequest_ServerConnection
	ConnectionType isConnectRequest_ConnectionType `protobuf_oneof:"connection_type"`
	// contains filtered or unexported fields
}

func (*ConnectRequest) Descriptor deprecated

func (*ConnectRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.

func (*ConnectRequest) GetClientConnection

func (x *ConnectRequest) GetClientConnection() *ClientConnection

func (*ConnectRequest) GetConnectionType

func (m *ConnectRequest) GetConnectionType() isConnectRequest_ConnectionType

func (*ConnectRequest) GetServerConnection

func (x *ConnectRequest) GetServerConnection() *ServerConnection

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) ProtoReflect

func (x *ConnectRequest) ProtoReflect() protoreflect.Message

func (*ConnectRequest) Reset

func (x *ConnectRequest) Reset()

func (*ConnectRequest) String

func (x *ConnectRequest) String() string

type ConnectRequest_ClientConnection

type ConnectRequest_ClientConnection struct {
	ClientConnection *ClientConnection `protobuf:"bytes,1,opt,name=client_connection,json=clientConnection,proto3,oneof"`
}

type ConnectRequest_ServerConnection

type ConnectRequest_ServerConnection struct {
	ServerConnection *ServerConnection `protobuf:"bytes,2,opt,name=server_connection,json=serverConnection,proto3,oneof"`
}

type ConnectResponse

type ConnectResponse struct {
	MemberId string `protobuf:"bytes,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
	Blocked  bool   `protobuf:"varint,3,opt,name=blocked,proto3" json:"blocked,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectResponse) Descriptor deprecated

func (*ConnectResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConnectResponse.ProtoReflect.Descriptor instead.

func (*ConnectResponse) GetBlocked

func (x *ConnectResponse) GetBlocked() bool

func (*ConnectResponse) GetMemberId

func (x *ConnectResponse) GetMemberId() string

func (*ConnectResponse) ProtoMessage

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) ProtoReflect

func (x *ConnectResponse) ProtoReflect() protoreflect.Message

func (*ConnectResponse) Reset

func (x *ConnectResponse) Reset()

func (*ConnectResponse) String

func (x *ConnectResponse) String() string

type DisconnectRequest

type DisconnectRequest struct {
	// contains filtered or unexported fields
}

func (*DisconnectRequest) Descriptor deprecated

func (*DisconnectRequest) Descriptor() ([]byte, []int)

Deprecated: Use DisconnectRequest.ProtoReflect.Descriptor instead.

func (*DisconnectRequest) ProtoMessage

func (*DisconnectRequest) ProtoMessage()

func (*DisconnectRequest) ProtoReflect

func (x *DisconnectRequest) ProtoReflect() protoreflect.Message

func (*DisconnectRequest) Reset

func (x *DisconnectRequest) Reset()

func (*DisconnectRequest) String

func (x *DisconnectRequest) String() string

type EndpointConnectedEvent

type EndpointConnectedEvent struct {
	Address string
}

type EndpointTerminatedEvent

type EndpointTerminatedEvent struct {
	Address string
}

type GetProcessDiagnosticsRequest

type GetProcessDiagnosticsRequest struct {
	Pid *actor.PID `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProcessDiagnosticsRequest) Descriptor deprecated

func (*GetProcessDiagnosticsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetProcessDiagnosticsRequest.ProtoReflect.Descriptor instead.

func (*GetProcessDiagnosticsRequest) GetPid

func (x *GetProcessDiagnosticsRequest) GetPid() *actor.PID

func (*GetProcessDiagnosticsRequest) ProtoMessage

func (*GetProcessDiagnosticsRequest) ProtoMessage()

func (*GetProcessDiagnosticsRequest) ProtoReflect

func (*GetProcessDiagnosticsRequest) Reset

func (x *GetProcessDiagnosticsRequest) Reset()

func (*GetProcessDiagnosticsRequest) String

type GetProcessDiagnosticsResponse

type GetProcessDiagnosticsResponse struct {
	DiagnosticsString string `protobuf:"bytes,1,opt,name=diagnostics_string,json=diagnosticsString,proto3" json:"diagnostics_string,omitempty"`
	// contains filtered or unexported fields
}

func (*GetProcessDiagnosticsResponse) Descriptor deprecated

func (*GetProcessDiagnosticsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetProcessDiagnosticsResponse.ProtoReflect.Descriptor instead.

func (*GetProcessDiagnosticsResponse) GetDiagnosticsString

func (x *GetProcessDiagnosticsResponse) GetDiagnosticsString() string

func (*GetProcessDiagnosticsResponse) ProtoMessage

func (*GetProcessDiagnosticsResponse) ProtoMessage()

func (*GetProcessDiagnosticsResponse) ProtoReflect

func (*GetProcessDiagnosticsResponse) Reset

func (x *GetProcessDiagnosticsResponse) Reset()

func (*GetProcessDiagnosticsResponse) String

type JsonMessage

type JsonMessage struct {
	TypeName string
	Json     string
}

type Kind

type Kind struct {
	Kind  string
	Props *actor.Props
}

Kind is the configuration for a kind

func NewKind

func NewKind(kind string, props *actor.Props) *Kind

NewKind creates a new kind configuration

type ListProcessesMatchType

type ListProcessesMatchType int32
const (
	ListProcessesMatchType_MatchPartOfString ListProcessesMatchType = 0
	ListProcessesMatchType_MatchExactString  ListProcessesMatchType = 1
	ListProcessesMatchType_MatchRegex        ListProcessesMatchType = 2
)

func (ListProcessesMatchType) Descriptor

func (ListProcessesMatchType) Enum

func (ListProcessesMatchType) EnumDescriptor deprecated

func (ListProcessesMatchType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ListProcessesMatchType.Descriptor instead.

func (ListProcessesMatchType) Number

func (ListProcessesMatchType) String

func (x ListProcessesMatchType) String() string

func (ListProcessesMatchType) Type

type ListProcessesRequest

type ListProcessesRequest struct {
	Pattern string                 `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
	Type    ListProcessesMatchType `protobuf:"varint,2,opt,name=type,proto3,enum=remote.ListProcessesMatchType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ListProcessesRequest) Descriptor deprecated

func (*ListProcessesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListProcessesRequest.ProtoReflect.Descriptor instead.

func (*ListProcessesRequest) GetPattern

func (x *ListProcessesRequest) GetPattern() string

func (*ListProcessesRequest) GetType

func (*ListProcessesRequest) ProtoMessage

func (*ListProcessesRequest) ProtoMessage()

func (*ListProcessesRequest) ProtoReflect

func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message

func (*ListProcessesRequest) Reset

func (x *ListProcessesRequest) Reset()

func (*ListProcessesRequest) String

func (x *ListProcessesRequest) String() string

type ListProcessesResponse

type ListProcessesResponse struct {
	Pids []*actor.PID `protobuf:"bytes,1,rep,name=pids,proto3" json:"pids,omitempty"`
	// contains filtered or unexported fields
}

func (*ListProcessesResponse) Descriptor deprecated

func (*ListProcessesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListProcessesResponse.ProtoReflect.Descriptor instead.

func (*ListProcessesResponse) GetPids

func (x *ListProcessesResponse) GetPids() []*actor.PID

func (*ListProcessesResponse) ProtoMessage

func (*ListProcessesResponse) ProtoMessage()

func (*ListProcessesResponse) ProtoReflect

func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message

func (*ListProcessesResponse) Reset

func (x *ListProcessesResponse) Reset()

func (*ListProcessesResponse) String

func (x *ListProcessesResponse) String() string

type MessageBatch

type MessageBatch struct {
	TypeNames []string           `protobuf:"bytes,1,rep,name=type_names,json=typeNames,proto3" json:"type_names,omitempty"`
	Targets   []*actor.PID       `protobuf:"bytes,2,rep,name=targets,proto3" json:"targets,omitempty"`
	Envelopes []*MessageEnvelope `protobuf:"bytes,3,rep,name=envelopes,proto3" json:"envelopes,omitempty"`
	Senders   []*actor.PID       `protobuf:"bytes,4,rep,name=senders,proto3" json:"senders,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageBatch) Descriptor deprecated

func (*MessageBatch) Descriptor() ([]byte, []int)

Deprecated: Use MessageBatch.ProtoReflect.Descriptor instead.

func (*MessageBatch) GetEnvelopes

func (x *MessageBatch) GetEnvelopes() []*MessageEnvelope

func (*MessageBatch) GetSenders

func (x *MessageBatch) GetSenders() []*actor.PID

func (*MessageBatch) GetTargets

func (x *MessageBatch) GetTargets() []*actor.PID

func (*MessageBatch) GetTypeNames

func (x *MessageBatch) GetTypeNames() []string

func (*MessageBatch) ProtoMessage

func (*MessageBatch) ProtoMessage()

func (*MessageBatch) ProtoReflect

func (x *MessageBatch) ProtoReflect() protoreflect.Message

func (*MessageBatch) Reset

func (x *MessageBatch) Reset()

func (*MessageBatch) String

func (x *MessageBatch) String() string

type MessageEnvelope

type MessageEnvelope struct {
	TypeId          int32          `protobuf:"varint,1,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"`
	MessageData     []byte         `protobuf:"bytes,2,opt,name=message_data,json=messageData,proto3" json:"message_data,omitempty"`
	Target          int32          `protobuf:"varint,3,opt,name=target,proto3" json:"target,omitempty"`
	Sender          int32          `protobuf:"varint,4,opt,name=sender,proto3" json:"sender,omitempty"`
	SerializerId    int32          `protobuf:"varint,5,opt,name=serializer_id,json=serializerId,proto3" json:"serializer_id,omitempty"`
	MessageHeader   *MessageHeader `protobuf:"bytes,6,opt,name=message_header,json=messageHeader,proto3" json:"message_header,omitempty"`
	TargetRequestId uint32         `protobuf:"varint,7,opt,name=target_request_id,json=targetRequestId,proto3" json:"target_request_id,omitempty"`
	SenderRequestId uint32         `protobuf:"varint,8,opt,name=sender_request_id,json=senderRequestId,proto3" json:"sender_request_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageEnvelope) Descriptor deprecated

func (*MessageEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use MessageEnvelope.ProtoReflect.Descriptor instead.

func (*MessageEnvelope) GetMessageData

func (x *MessageEnvelope) GetMessageData() []byte

func (*MessageEnvelope) GetMessageHeader

func (x *MessageEnvelope) GetMessageHeader() *MessageHeader

func (*MessageEnvelope) GetSender

func (x *MessageEnvelope) GetSender() int32

func (*MessageEnvelope) GetSenderRequestId

func (x *MessageEnvelope) GetSenderRequestId() uint32

func (*MessageEnvelope) GetSerializerId

func (x *MessageEnvelope) GetSerializerId() int32

func (*MessageEnvelope) GetTarget

func (x *MessageEnvelope) GetTarget() int32

func (*MessageEnvelope) GetTargetRequestId

func (x *MessageEnvelope) GetTargetRequestId() uint32

func (*MessageEnvelope) GetTypeId

func (x *MessageEnvelope) GetTypeId() int32

func (*MessageEnvelope) ProtoMessage

func (*MessageEnvelope) ProtoMessage()

func (*MessageEnvelope) ProtoReflect

func (x *MessageEnvelope) ProtoReflect() protoreflect.Message

func (*MessageEnvelope) Reset

func (x *MessageEnvelope) Reset()

func (*MessageEnvelope) String

func (x *MessageEnvelope) String() string

type MessageHeader

type MessageHeader struct {
	HeaderData map[string]string `` /* 179-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MessageHeader) Descriptor deprecated

func (*MessageHeader) Descriptor() ([]byte, []int)

Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead.

func (*MessageHeader) GetHeaderData

func (x *MessageHeader) GetHeaderData() map[string]string

func (*MessageHeader) ProtoMessage

func (*MessageHeader) ProtoMessage()

func (*MessageHeader) ProtoReflect

func (x *MessageHeader) ProtoReflect() protoreflect.Message

func (*MessageHeader) Reset

func (x *MessageHeader) Reset()

func (*MessageHeader) String

func (x *MessageHeader) String() string

type Ping

type Ping struct{}

Ping is message sent by the actor system to probe an actor is started.

type Pong

type Pong struct{}

Pong is response for ping.

type Remote

type Remote struct {
	// contains filtered or unexported fields
}

func GetRemote

func GetRemote(actorSystem *actor.ActorSystem) *Remote

func NewRemote

func NewRemote(actorSystem *actor.ActorSystem, config *Config) *Remote

func (*Remote) ActivatorForAddress

func (r *Remote) ActivatorForAddress(address string) *actor.PID

ActivatorForAddress returns a PID for the activator at the given address

func (*Remote) BlockList

func (r *Remote) BlockList() *BlockList

func (*Remote) ExtensionID

func (r *Remote) ExtensionID() extensions.ExtensionID

func (*Remote) GetKnownKinds

func (r *Remote) GetKnownKinds() []string

GetKnownKinds returns a slice of known actor "Kinds"

func (*Remote) Logger

func (r *Remote) Logger() *slog.Logger

func (*Remote) Register

func (r *Remote) Register(kind string, props *actor.Props)

Register a known actor props by name

func (*Remote) SendMessage

func (r *Remote) SendMessage(pid *actor.PID, header actor.ReadonlyMessageHeader, message interface{}, sender *actor.PID, serializerID int32)

func (*Remote) Shutdown

func (r *Remote) Shutdown(graceful bool)

func (*Remote) Spawn

func (r *Remote) Spawn(address, kind string, timeout time.Duration) (*ActorPidResponse, error)

Spawn spawns a remote actor of a given type at a given address

func (*Remote) SpawnFuture

func (r *Remote) SpawnFuture(address, name, kind string, timeout time.Duration) *actor.Future

SpawnFuture spawns a remote actor and returns a Future that completes once the actor is started

func (*Remote) SpawnNamed

func (r *Remote) SpawnNamed(address, name, kind string, timeout time.Duration) (*ActorPidResponse, error)

SpawnNamed spawns a named remote actor of a given type at a given address

func (*Remote) Start

func (r *Remote) Start()

Start the remote server

type RemoteMessage

type RemoteMessage struct {

	// Types that are assignable to MessageType:
	//	*RemoteMessage_MessageBatch
	//	*RemoteMessage_ConnectRequest
	//	*RemoteMessage_ConnectResponse
	//	*RemoteMessage_DisconnectRequest
	MessageType isRemoteMessage_MessageType `protobuf_oneof:"message_type"`
	// contains filtered or unexported fields
}

func (*RemoteMessage) Descriptor deprecated

func (*RemoteMessage) Descriptor() ([]byte, []int)

Deprecated: Use RemoteMessage.ProtoReflect.Descriptor instead.

func (*RemoteMessage) GetConnectRequest

func (x *RemoteMessage) GetConnectRequest() *ConnectRequest

func (*RemoteMessage) GetConnectResponse

func (x *RemoteMessage) GetConnectResponse() *ConnectResponse

func (*RemoteMessage) GetDisconnectRequest

func (x *RemoteMessage) GetDisconnectRequest() *DisconnectRequest

func (*RemoteMessage) GetMessageBatch

func (x *RemoteMessage) GetMessageBatch() *MessageBatch

func (*RemoteMessage) GetMessageType

func (m *RemoteMessage) GetMessageType() isRemoteMessage_MessageType

func (*RemoteMessage) ProtoMessage

func (*RemoteMessage) ProtoMessage()

func (*RemoteMessage) ProtoReflect

func (x *RemoteMessage) ProtoReflect() protoreflect.Message

func (*RemoteMessage) Reset

func (x *RemoteMessage) Reset()

func (*RemoteMessage) String

func (x *RemoteMessage) String() string

type RemoteMessage_ConnectRequest

type RemoteMessage_ConnectRequest struct {
	ConnectRequest *ConnectRequest `protobuf:"bytes,2,opt,name=connect_request,json=connectRequest,proto3,oneof"`
}

type RemoteMessage_ConnectResponse

type RemoteMessage_ConnectResponse struct {
	ConnectResponse *ConnectResponse `protobuf:"bytes,3,opt,name=connect_response,json=connectResponse,proto3,oneof"`
}

type RemoteMessage_DisconnectRequest

type RemoteMessage_DisconnectRequest struct {
	DisconnectRequest *DisconnectRequest `protobuf:"bytes,4,opt,name=disconnect_request,json=disconnectRequest,proto3,oneof"`
}

type RemoteMessage_MessageBatch

type RemoteMessage_MessageBatch struct {
	MessageBatch *MessageBatch `protobuf:"bytes,1,opt,name=message_batch,json=messageBatch,proto3,oneof"`
}

type RemotingClient

type RemotingClient interface {
	Receive(ctx context.Context, opts ...grpc.CallOption) (Remoting_ReceiveClient, error)
	ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error)
	GetProcessDiagnostics(ctx context.Context, in *GetProcessDiagnosticsRequest, opts ...grpc.CallOption) (*GetProcessDiagnosticsResponse, error)
}

RemotingClient is the client API for Remoting service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRemotingClient

func NewRemotingClient(cc grpc.ClientConnInterface) RemotingClient

type RemotingServer

type RemotingServer interface {
	Receive(Remoting_ReceiveServer) error
	ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error)
	GetProcessDiagnostics(context.Context, *GetProcessDiagnosticsRequest) (*GetProcessDiagnosticsResponse, error)
	// contains filtered or unexported methods
}

RemotingServer is the server API for Remoting service. All implementations must embed UnimplementedRemotingServer for forward compatibility

type Remoting_ReceiveClient

type Remoting_ReceiveClient interface {
	Send(*RemoteMessage) error
	Recv() (*RemoteMessage, error)
	grpc.ClientStream
}

type Remoting_ReceiveServer

type Remoting_ReceiveServer interface {
	Send(*RemoteMessage) error
	Recv() (*RemoteMessage, error)
	grpc.ServerStream
}

type ResponseError

type ResponseError struct {
	Code ResponseStatusCode
}

ResponseError is an error type. e.g.:

var err = &ResponseError{1}

func (*ResponseError) Error

func (r *ResponseError) Error() string

type ResponseStatusCode

type ResponseStatusCode int32
const (
	ResponseStatusCodeOK ResponseStatusCode = iota
	ResponseStatusCodeUNAVAILABLE
	ResponseStatusCodeTIMEOUT
	ResponseStatusCodePROCESSNAMEALREADYEXIST
	ResponseStatusCodeERROR
	ResponseStatusCodeDeadLetter
	ResponseStatusCodeMAX // just a boundary.
)

func (ResponseStatusCode) AsError

func (c ResponseStatusCode) AsError() *ResponseError

func (ResponseStatusCode) String

func (c ResponseStatusCode) String() string

func (ResponseStatusCode) ToInt32

func (c ResponseStatusCode) ToInt32() int32

type RootSerializable

type RootSerializable interface {
	// Serialize returns the on-the-wire representation of the message
	//   Message -> IRootSerialized -> ByteString
	Serialize() (RootSerialized, error)
}

RootSerializable is the root level in-process representation of a message

type RootSerialized

type RootSerialized interface {
	// Deserialize returns the in-process representation of a message
	//   ByteString -> IRootSerialized -> Message
	Deserialize() (RootSerializable, error)
}

RootSerialized is the root level on-the-wire representation of a message

type Serializer

type Serializer interface {
	Serialize(msg interface{}) ([]byte, error)
	Deserialize(typeName string, bytes []byte) (interface{}, error)
	GetTypeName(msg interface{}) (string, error)
}

type ServerConnection

type ServerConnection struct {
	SystemId string `protobuf:"bytes,1,opt,name=SystemId,proto3" json:"SystemId,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerConnection) Descriptor deprecated

func (*ServerConnection) Descriptor() ([]byte, []int)

Deprecated: Use ServerConnection.ProtoReflect.Descriptor instead.

func (*ServerConnection) GetAddress

func (x *ServerConnection) GetAddress() string

func (*ServerConnection) GetSystemId

func (x *ServerConnection) GetSystemId() string

func (*ServerConnection) ProtoMessage

func (*ServerConnection) ProtoMessage()

func (*ServerConnection) ProtoReflect

func (x *ServerConnection) ProtoReflect() protoreflect.Message

func (*ServerConnection) Reset

func (x *ServerConnection) Reset()

func (*ServerConnection) String

func (x *ServerConnection) String() string

type UnimplementedRemotingServer

type UnimplementedRemotingServer struct {
}

UnimplementedRemotingServer must be embedded to have forward compatible implementations.

func (UnimplementedRemotingServer) ListProcesses

func (UnimplementedRemotingServer) Receive

type UnsafeRemotingServer

type UnsafeRemotingServer interface {
	// contains filtered or unexported methods
}

UnsafeRemotingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RemotingServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL