Documentation ¶
Overview ¶
Package remote provides access to actors across a network or other I/O connection.
Package remote is a generated protocol buffer package. It is generated from these files: protos.proto It has these top-level messages: MessageBatch MessageEnvelope ActorPidRequest ActorPidResponse Unit ConnectRequest ConnectResponse
Index ¶
- Variables
- func ActivatorForAddress(address string) *actor.PID
- func GetKnownKinds() []string
- func Register(kind string, props *actor.Props)
- func RegisterRemotingServer(s *grpc.Server, srv RemotingServer)
- func RegisterSerializer(serializer Serializer)
- func SendMessage(pid *actor.PID, message interface{}, sender *actor.PID, serializerID int32)
- func SetLogLevel(level log.Level)
- func Spawn(address, kind string, timeout time.Duration) (*actor.PID, error)
- func SpawnFuture(address, name, kind string, timeout time.Duration) *actor.Future
- func SpawnNamed(address, name, kind string, timeout time.Duration) (*actor.PID, error)
- func Start(address string, options ...RemotingOption)
- type ActorPidRequest
- func (*ActorPidRequest) Descriptor() ([]byte, []int)
- func (this *ActorPidRequest) Equal(that interface{}) bool
- func (m *ActorPidRequest) GetKind() string
- func (m *ActorPidRequest) GetName() string
- func (m *ActorPidRequest) Marshal() (dAtA []byte, err error)
- func (m *ActorPidRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ActorPidRequest) ProtoMessage()
- func (m *ActorPidRequest) Reset()
- func (m *ActorPidRequest) Size() (n int)
- func (this *ActorPidRequest) String() string
- func (m *ActorPidRequest) Unmarshal(dAtA []byte) error
- type ActorPidResponse
- func (*ActorPidResponse) Descriptor() ([]byte, []int)
- func (this *ActorPidResponse) Equal(that interface{}) bool
- func (m *ActorPidResponse) GetPid() *actor.PID
- func (m *ActorPidResponse) Marshal() (dAtA []byte, err error)
- func (m *ActorPidResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ActorPidResponse) ProtoMessage()
- func (m *ActorPidResponse) Reset()
- func (m *ActorPidResponse) Size() (n int)
- func (this *ActorPidResponse) String() string
- func (m *ActorPidResponse) Unmarshal(dAtA []byte) error
- type ConnectRequest
- func (*ConnectRequest) Descriptor() ([]byte, []int)
- func (this *ConnectRequest) Equal(that interface{}) bool
- func (m *ConnectRequest) Marshal() (dAtA []byte, err error)
- func (m *ConnectRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectRequest) ProtoMessage()
- func (m *ConnectRequest) Reset()
- func (m *ConnectRequest) Size() (n int)
- func (this *ConnectRequest) String() string
- func (m *ConnectRequest) Unmarshal(dAtA []byte) error
- type ConnectResponse
- func (*ConnectResponse) Descriptor() ([]byte, []int)
- func (this *ConnectResponse) Equal(that interface{}) bool
- func (m *ConnectResponse) GetDefaultSerializerId() int32
- func (m *ConnectResponse) Marshal() (dAtA []byte, err error)
- func (m *ConnectResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ConnectResponse) ProtoMessage()
- func (m *ConnectResponse) Reset()
- func (m *ConnectResponse) Size() (n int)
- func (this *ConnectResponse) String() string
- func (m *ConnectResponse) Unmarshal(dAtA []byte) error
- type EndpointTerminatedEvent
- type JsonMessage
- type MessageBatch
- func (*MessageBatch) Descriptor() ([]byte, []int)
- func (this *MessageBatch) Equal(that interface{}) bool
- func (m *MessageBatch) GetEnvelopes() []*MessageEnvelope
- func (m *MessageBatch) GetTargetNames() []string
- func (m *MessageBatch) GetTypeNames() []string
- func (m *MessageBatch) Marshal() (dAtA []byte, err error)
- func (m *MessageBatch) MarshalTo(dAtA []byte) (int, error)
- func (*MessageBatch) ProtoMessage()
- func (m *MessageBatch) Reset()
- func (m *MessageBatch) Size() (n int)
- func (this *MessageBatch) String() string
- func (m *MessageBatch) Unmarshal(dAtA []byte) error
- type MessageEnvelope
- func (*MessageEnvelope) Descriptor() ([]byte, []int)
- func (this *MessageEnvelope) Equal(that interface{}) bool
- func (m *MessageEnvelope) GetMessageData() []byte
- func (m *MessageEnvelope) GetSender() *actor.PID
- func (m *MessageEnvelope) GetSerializerId() int32
- func (m *MessageEnvelope) GetTarget() int32
- func (m *MessageEnvelope) GetTypeId() int32
- func (m *MessageEnvelope) Marshal() (dAtA []byte, err error)
- func (m *MessageEnvelope) MarshalTo(dAtA []byte) (int, error)
- func (*MessageEnvelope) ProtoMessage()
- func (m *MessageEnvelope) Reset()
- func (m *MessageEnvelope) Size() (n int)
- func (this *MessageEnvelope) String() string
- func (m *MessageEnvelope) Unmarshal(dAtA []byte) error
- type RemotingClient
- type RemotingOption
- func WithCallOptions(options ...grpc.CallOption) RemotingOption
- func WithDialOptions(options ...grpc.DialOption) RemotingOption
- func WithEndpointManagerBatchSize(batchSize int) RemotingOption
- func WithEndpointManagerQueueSize(queueSize int) RemotingOption
- func WithEndpointWriterBatchSize(batchSize int) RemotingOption
- func WithEndpointWriterQueueSize(queueSize int) RemotingOption
- func WithServerOptions(options ...grpc.ServerOption) RemotingOption
- type RemotingServer
- type Remoting_ReceiveClient
- type Remoting_ReceiveServer
- type Serializer
- type Unit
- func (*Unit) Descriptor() ([]byte, []int)
- func (this *Unit) Equal(that interface{}) bool
- func (m *Unit) Marshal() (dAtA []byte, err error)
- func (m *Unit) MarshalTo(dAtA []byte) (int, error)
- func (*Unit) ProtoMessage()
- func (m *Unit) Reset()
- func (m *Unit) Size() (n int)
- func (this *Unit) String() string
- func (m *Unit) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProtos = fmt.Errorf("proto: integer overflow") )
View Source
var DefaultSerializerID int32 = 0
Functions ¶
func ActivatorForAddress ¶
ActivatorForAddress returns a PID for the activator at the given address
func GetKnownKinds ¶
func GetKnownKinds() []string
GetKnownKinds returns a slice of known actor "kinds"
func RegisterRemotingServer ¶
func RegisterRemotingServer(s *grpc.Server, srv RemotingServer)
func RegisterSerializer ¶
func RegisterSerializer(serializer Serializer)
func SendMessage ¶
func SetLogLevel ¶
SetLogLevel sets the log level for the logger.
SetLogLevel is safe to call concurrently
func SpawnFuture ¶
SpawnFuture spawns a remote actor and returns a Future that completes once the actor is started
func SpawnNamed ¶
SpawnNamed spawns a named remote actor of a given type at a given address
Types ¶
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"` }
func (*ActorPidRequest) Descriptor ¶
func (*ActorPidRequest) Descriptor() ([]byte, []int)
func (*ActorPidRequest) Equal ¶
func (this *ActorPidRequest) Equal(that interface{}) bool
func (*ActorPidRequest) GetKind ¶
func (m *ActorPidRequest) GetKind() string
func (*ActorPidRequest) GetName ¶
func (m *ActorPidRequest) GetName() string
func (*ActorPidRequest) Marshal ¶
func (m *ActorPidRequest) Marshal() (dAtA []byte, err error)
func (*ActorPidRequest) ProtoMessage ¶
func (*ActorPidRequest) ProtoMessage()
func (*ActorPidRequest) Reset ¶
func (m *ActorPidRequest) Reset()
func (*ActorPidRequest) Size ¶
func (m *ActorPidRequest) Size() (n int)
func (*ActorPidRequest) String ¶
func (this *ActorPidRequest) String() string
func (*ActorPidRequest) Unmarshal ¶
func (m *ActorPidRequest) Unmarshal(dAtA []byte) error
type ActorPidResponse ¶
type ActorPidResponse struct {
Pid *actor.PID `protobuf:"bytes,1,opt,name=pid" json:"pid,omitempty"`
}
func (*ActorPidResponse) Descriptor ¶
func (*ActorPidResponse) Descriptor() ([]byte, []int)
func (*ActorPidResponse) Equal ¶
func (this *ActorPidResponse) Equal(that interface{}) bool
func (*ActorPidResponse) GetPid ¶
func (m *ActorPidResponse) GetPid() *actor.PID
func (*ActorPidResponse) Marshal ¶
func (m *ActorPidResponse) Marshal() (dAtA []byte, err error)
func (*ActorPidResponse) ProtoMessage ¶
func (*ActorPidResponse) ProtoMessage()
func (*ActorPidResponse) Reset ¶
func (m *ActorPidResponse) Reset()
func (*ActorPidResponse) Size ¶
func (m *ActorPidResponse) Size() (n int)
func (*ActorPidResponse) String ¶
func (this *ActorPidResponse) String() string
func (*ActorPidResponse) Unmarshal ¶
func (m *ActorPidResponse) Unmarshal(dAtA []byte) error
type ConnectRequest ¶
type ConnectRequest struct { }
func (*ConnectRequest) Descriptor ¶
func (*ConnectRequest) Descriptor() ([]byte, []int)
func (*ConnectRequest) Equal ¶
func (this *ConnectRequest) Equal(that interface{}) bool
func (*ConnectRequest) Marshal ¶
func (m *ConnectRequest) Marshal() (dAtA []byte, err error)
func (*ConnectRequest) ProtoMessage ¶
func (*ConnectRequest) ProtoMessage()
func (*ConnectRequest) Reset ¶
func (m *ConnectRequest) Reset()
func (*ConnectRequest) Size ¶
func (m *ConnectRequest) Size() (n int)
func (*ConnectRequest) String ¶
func (this *ConnectRequest) String() string
func (*ConnectRequest) Unmarshal ¶
func (m *ConnectRequest) Unmarshal(dAtA []byte) error
type ConnectResponse ¶
type ConnectResponse struct {
DefaultSerializerId int32 `protobuf:"varint,1,opt,name=default_serializer_id,json=defaultSerializerId,proto3" json:"default_serializer_id,omitempty"`
}
func (*ConnectResponse) Descriptor ¶
func (*ConnectResponse) Descriptor() ([]byte, []int)
func (*ConnectResponse) Equal ¶
func (this *ConnectResponse) Equal(that interface{}) bool
func (*ConnectResponse) GetDefaultSerializerId ¶
func (m *ConnectResponse) GetDefaultSerializerId() int32
func (*ConnectResponse) Marshal ¶
func (m *ConnectResponse) Marshal() (dAtA []byte, err error)
func (*ConnectResponse) ProtoMessage ¶
func (*ConnectResponse) ProtoMessage()
func (*ConnectResponse) Reset ¶
func (m *ConnectResponse) Reset()
func (*ConnectResponse) Size ¶
func (m *ConnectResponse) Size() (n int)
func (*ConnectResponse) String ¶
func (this *ConnectResponse) String() string
func (*ConnectResponse) Unmarshal ¶
func (m *ConnectResponse) Unmarshal(dAtA []byte) error
type EndpointTerminatedEvent ¶
type EndpointTerminatedEvent struct {
Address string
}
type JsonMessage ¶
type MessageBatch ¶
type MessageBatch struct { TypeNames []string `protobuf:"bytes,1,rep,name=type_names,json=typeNames" json:"type_names,omitempty"` TargetNames []string `protobuf:"bytes,2,rep,name=target_names,json=targetNames" json:"target_names,omitempty"` Envelopes []*MessageEnvelope `protobuf:"bytes,3,rep,name=envelopes" json:"envelopes,omitempty"` }
func (*MessageBatch) Descriptor ¶
func (*MessageBatch) Descriptor() ([]byte, []int)
func (*MessageBatch) Equal ¶
func (this *MessageBatch) Equal(that interface{}) bool
func (*MessageBatch) GetEnvelopes ¶
func (m *MessageBatch) GetEnvelopes() []*MessageEnvelope
func (*MessageBatch) GetTargetNames ¶
func (m *MessageBatch) GetTargetNames() []string
func (*MessageBatch) GetTypeNames ¶
func (m *MessageBatch) GetTypeNames() []string
func (*MessageBatch) Marshal ¶
func (m *MessageBatch) Marshal() (dAtA []byte, err error)
func (*MessageBatch) ProtoMessage ¶
func (*MessageBatch) ProtoMessage()
func (*MessageBatch) Reset ¶
func (m *MessageBatch) Reset()
func (*MessageBatch) Size ¶
func (m *MessageBatch) Size() (n int)
func (*MessageBatch) String ¶
func (this *MessageBatch) String() string
func (*MessageBatch) Unmarshal ¶
func (m *MessageBatch) Unmarshal(dAtA []byte) error
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 *actor.PID `protobuf:"bytes,4,opt,name=sender" json:"sender,omitempty"` SerializerId int32 `protobuf:"varint,5,opt,name=serializer_id,json=serializerId,proto3" json:"serializer_id,omitempty"` }
func (*MessageEnvelope) Descriptor ¶
func (*MessageEnvelope) Descriptor() ([]byte, []int)
func (*MessageEnvelope) Equal ¶
func (this *MessageEnvelope) Equal(that interface{}) bool
func (*MessageEnvelope) GetMessageData ¶
func (m *MessageEnvelope) GetMessageData() []byte
func (*MessageEnvelope) GetSender ¶
func (m *MessageEnvelope) GetSender() *actor.PID
func (*MessageEnvelope) GetSerializerId ¶
func (m *MessageEnvelope) GetSerializerId() int32
func (*MessageEnvelope) GetTarget ¶
func (m *MessageEnvelope) GetTarget() int32
func (*MessageEnvelope) GetTypeId ¶
func (m *MessageEnvelope) GetTypeId() int32
func (*MessageEnvelope) Marshal ¶
func (m *MessageEnvelope) Marshal() (dAtA []byte, err error)
func (*MessageEnvelope) ProtoMessage ¶
func (*MessageEnvelope) ProtoMessage()
func (*MessageEnvelope) Reset ¶
func (m *MessageEnvelope) Reset()
func (*MessageEnvelope) Size ¶
func (m *MessageEnvelope) Size() (n int)
func (*MessageEnvelope) String ¶
func (this *MessageEnvelope) String() string
func (*MessageEnvelope) Unmarshal ¶
func (m *MessageEnvelope) Unmarshal(dAtA []byte) error
type RemotingClient ¶
type RemotingClient interface { Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) Receive(ctx context.Context, opts ...grpc.CallOption) (Remoting_ReceiveClient, error) }
func NewRemotingClient ¶
func NewRemotingClient(cc *grpc.ClientConn) RemotingClient
type RemotingOption ¶
type RemotingOption func(*remoteConfig)
RemotingOption configures how the remote infrastructure is started
func WithCallOptions ¶
func WithCallOptions(options ...grpc.CallOption) RemotingOption
func WithDialOptions ¶
func WithDialOptions(options ...grpc.DialOption) RemotingOption
func WithEndpointManagerBatchSize ¶
func WithEndpointManagerBatchSize(batchSize int) RemotingOption
func WithEndpointManagerQueueSize ¶
func WithEndpointManagerQueueSize(queueSize int) RemotingOption
func WithEndpointWriterBatchSize ¶
func WithEndpointWriterBatchSize(batchSize int) RemotingOption
func WithEndpointWriterQueueSize ¶
func WithEndpointWriterQueueSize(queueSize int) RemotingOption
func WithServerOptions ¶
func WithServerOptions(options ...grpc.ServerOption) RemotingOption
type RemotingServer ¶
type RemotingServer interface { Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) Receive(Remoting_ReceiveServer) error }
type Remoting_ReceiveClient ¶
type Remoting_ReceiveClient interface { Send(*MessageBatch) error Recv() (*Unit, error) grpc.ClientStream }
type Remoting_ReceiveServer ¶
type Remoting_ReceiveServer interface { Send(*Unit) error Recv() (*MessageBatch, error) grpc.ServerStream }
type Serializer ¶
type Unit ¶
type Unit struct { }
func (*Unit) Descriptor ¶
func (*Unit) ProtoMessage ¶
func (*Unit) ProtoMessage()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.