Documentation ¶
Index ¶
- Variables
- func RegisterRemotingServiceServer(s grpc.ServiceRegistrar, srv RemotingServiceServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetHost() string
- func (x *Address) GetId() string
- func (x *Address) GetName() string
- func (x *Address) GetPort() int32
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- type RemoteAskRequest
- func (*RemoteAskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteAskRequest) GetMessage() *anypb.Any
- func (x *RemoteAskRequest) GetReceiver() *Address
- func (x *RemoteAskRequest) GetSender() *Address
- func (*RemoteAskRequest) ProtoMessage()
- func (x *RemoteAskRequest) ProtoReflect() protoreflect.Message
- func (x *RemoteAskRequest) Reset()
- func (x *RemoteAskRequest) String() string
- type RemoteAskResponse
- func (*RemoteAskResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteAskResponse) GetMessage() *anypb.Any
- func (*RemoteAskResponse) ProtoMessage()
- func (x *RemoteAskResponse) ProtoReflect() protoreflect.Message
- func (x *RemoteAskResponse) Reset()
- func (x *RemoteAskResponse) String() string
- type RemoteLookupRequest
- func (*RemoteLookupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteLookupRequest) GetHost() string
- func (x *RemoteLookupRequest) GetName() string
- func (x *RemoteLookupRequest) GetPort() int32
- func (*RemoteLookupRequest) ProtoMessage()
- func (x *RemoteLookupRequest) ProtoReflect() protoreflect.Message
- func (x *RemoteLookupRequest) Reset()
- func (x *RemoteLookupRequest) String() string
- type RemoteLookupResponse
- func (*RemoteLookupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteLookupResponse) GetAddress() *Address
- func (*RemoteLookupResponse) ProtoMessage()
- func (x *RemoteLookupResponse) ProtoReflect() protoreflect.Message
- func (x *RemoteLookupResponse) Reset()
- func (x *RemoteLookupResponse) String() string
- type RemoteMessage
- func (*RemoteMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteMessage) GetMessage() *anypb.Any
- func (x *RemoteMessage) GetReceiver() *Address
- func (x *RemoteMessage) GetSender() *Address
- func (*RemoteMessage) ProtoMessage()
- func (x *RemoteMessage) ProtoReflect() protoreflect.Message
- func (x *RemoteMessage) Reset()
- func (x *RemoteMessage) String() string
- type RemoteTellRequest
- func (*RemoteTellRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteTellRequest) GetRemoteMessage() *RemoteMessage
- func (*RemoteTellRequest) ProtoMessage()
- func (x *RemoteTellRequest) ProtoReflect() protoreflect.Message
- func (x *RemoteTellRequest) Reset()
- func (x *RemoteTellRequest) String() string
- type RemoteTellResponse
- type RemotingServiceClient
- type RemotingServiceServer
- type StrategyDirective
- func (StrategyDirective) Descriptor() protoreflect.EnumDescriptor
- func (x StrategyDirective) Enum() *StrategyDirective
- func (StrategyDirective) EnumDescriptor() ([]byte, []int)deprecated
- func (x StrategyDirective) Number() protoreflect.EnumNumber
- func (x StrategyDirective) String() string
- func (StrategyDirective) Type() protoreflect.EnumType
- type UnimplementedRemotingServiceServer
- func (UnimplementedRemotingServiceServer) RemoteAsk(context.Context, *RemoteAskRequest) (*RemoteAskResponse, error)
- func (UnimplementedRemotingServiceServer) RemoteLookup(context.Context, *RemoteLookupRequest) (*RemoteLookupResponse, error)
- func (UnimplementedRemotingServiceServer) RemoteTell(context.Context, *RemoteTellRequest) (*RemoteTellResponse, error)
- type UnsafeRemotingServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( StrategyDirective_name = map[int32]string{ 0: "STOP_DIRECTIVE", 1: "RESTART_DIRECTIVE", } StrategyDirective_value = map[string]int32{ "STOP_DIRECTIVE": 0, "RESTART_DIRECTIVE": 1, } )
Enum value maps for StrategyDirective.
var File_actors_v1_remoting_proto protoreflect.FileDescriptor
var File_actors_v1_supervisor_proto protoreflect.FileDescriptor
var RemotingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "actors.v1.RemotingService", HandlerType: (*RemotingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RemoteAsk", Handler: _RemotingService_RemoteAsk_Handler, }, { MethodName: "RemoteTell", Handler: _RemotingService_RemoteTell_Handler, }, { MethodName: "RemoteLookup", Handler: _RemotingService_RemoteLookup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "actors/v1/remoting.proto", }
RemotingService_ServiceDesc is the grpc.ServiceDesc for RemotingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRemotingServiceServer ¶
func RegisterRemotingServiceServer(s grpc.ServiceRegistrar, srv RemotingServiceServer)
Types ¶
type Address ¶
type Address struct { // Specifies the remote host address Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Specifies the remote port Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // Specifies the actor name Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Specifies the actor unique id on the remote host Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Address represents an actor address
func (*Address) Descriptor
deprecated
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
type RemoteAskRequest ¶
type RemoteAskRequest struct { // Specifies the sender' address Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Specifies the receiver' address Receiver *Address `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // Specifies the message to send to the actor // Any proto message is allowed to be sent Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
RemoteAsk is used to send a message to an actor remotely and expect a response immediately. With this type of message the receiver cannot communicate back to Sender except reply the message with a response. This one-way communication
func (*RemoteAskRequest) Descriptor
deprecated
func (*RemoteAskRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoteAskRequest.ProtoReflect.Descriptor instead.
func (*RemoteAskRequest) GetMessage ¶
func (x *RemoteAskRequest) GetMessage() *anypb.Any
func (*RemoteAskRequest) GetReceiver ¶
func (x *RemoteAskRequest) GetReceiver() *Address
func (*RemoteAskRequest) GetSender ¶
func (x *RemoteAskRequest) GetSender() *Address
func (*RemoteAskRequest) ProtoMessage ¶
func (*RemoteAskRequest) ProtoMessage()
func (*RemoteAskRequest) ProtoReflect ¶
func (x *RemoteAskRequest) ProtoReflect() protoreflect.Message
func (*RemoteAskRequest) Reset ¶
func (x *RemoteAskRequest) Reset()
func (*RemoteAskRequest) String ¶
func (x *RemoteAskRequest) String() string
type RemoteAskResponse ¶
type RemoteAskResponse struct { // Specifies the message to send to the actor // Any proto message is allowed to be sent Message *anypb.Any `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*RemoteAskResponse) Descriptor
deprecated
func (*RemoteAskResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoteAskResponse.ProtoReflect.Descriptor instead.
func (*RemoteAskResponse) GetMessage ¶
func (x *RemoteAskResponse) GetMessage() *anypb.Any
func (*RemoteAskResponse) ProtoMessage ¶
func (*RemoteAskResponse) ProtoMessage()
func (*RemoteAskResponse) ProtoReflect ¶
func (x *RemoteAskResponse) ProtoReflect() protoreflect.Message
func (*RemoteAskResponse) Reset ¶
func (x *RemoteAskResponse) Reset()
func (*RemoteAskResponse) String ¶
func (x *RemoteAskResponse) String() string
type RemoteLookupRequest ¶
type RemoteLookupRequest struct { // Specifies the remote host address Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // Specifies the remote port Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // Specifies the actor name Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
RemoteLookupRequest checks whether a given actor exists on a remote host
func (*RemoteLookupRequest) Descriptor
deprecated
func (*RemoteLookupRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoteLookupRequest.ProtoReflect.Descriptor instead.
func (*RemoteLookupRequest) GetHost ¶
func (x *RemoteLookupRequest) GetHost() string
func (*RemoteLookupRequest) GetName ¶
func (x *RemoteLookupRequest) GetName() string
func (*RemoteLookupRequest) GetPort ¶
func (x *RemoteLookupRequest) GetPort() int32
func (*RemoteLookupRequest) ProtoMessage ¶
func (*RemoteLookupRequest) ProtoMessage()
func (*RemoteLookupRequest) ProtoReflect ¶
func (x *RemoteLookupRequest) ProtoReflect() protoreflect.Message
func (*RemoteLookupRequest) Reset ¶
func (x *RemoteLookupRequest) Reset()
func (*RemoteLookupRequest) String ¶
func (x *RemoteLookupRequest) String() string
type RemoteLookupResponse ¶
type RemoteLookupResponse struct { // Specifies the actor address Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*RemoteLookupResponse) Descriptor
deprecated
func (*RemoteLookupResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoteLookupResponse.ProtoReflect.Descriptor instead.
func (*RemoteLookupResponse) GetAddress ¶
func (x *RemoteLookupResponse) GetAddress() *Address
func (*RemoteLookupResponse) ProtoMessage ¶
func (*RemoteLookupResponse) ProtoMessage()
func (*RemoteLookupResponse) ProtoReflect ¶
func (x *RemoteLookupResponse) ProtoReflect() protoreflect.Message
func (*RemoteLookupResponse) Reset ¶
func (x *RemoteLookupResponse) Reset()
func (*RemoteLookupResponse) String ¶
func (x *RemoteLookupResponse) String() string
type RemoteMessage ¶
type RemoteMessage struct { // Specifies the sender' address Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // Specifies the actor address Receiver *Address `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // Specifies the message to send to the actor // Any proto message is allowed to be sent Message *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
RemoteMessage will be used by Actors to communicate remotely
func (*RemoteMessage) Descriptor
deprecated
func (*RemoteMessage) Descriptor() ([]byte, []int)
Deprecated: Use RemoteMessage.ProtoReflect.Descriptor instead.
func (*RemoteMessage) GetMessage ¶
func (x *RemoteMessage) GetMessage() *anypb.Any
func (*RemoteMessage) GetReceiver ¶
func (x *RemoteMessage) GetReceiver() *Address
func (*RemoteMessage) GetSender ¶
func (x *RemoteMessage) GetSender() *Address
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 RemoteTellRequest ¶
type RemoteTellRequest struct { // Specifies the remote message RemoteMessage *RemoteMessage `protobuf:"bytes,1,opt,name=remote_message,json=remoteMessage,proto3" json:"remote_message,omitempty"` // contains filtered or unexported fields }
RemoteTell is used to send a message to an actor remotely by another actor This is the only way remote actors can interact with each other. The actor on the other line can reply to the sender by using the Sender in the message
func (*RemoteTellRequest) Descriptor
deprecated
func (*RemoteTellRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoteTellRequest.ProtoReflect.Descriptor instead.
func (*RemoteTellRequest) GetRemoteMessage ¶
func (x *RemoteTellRequest) GetRemoteMessage() *RemoteMessage
func (*RemoteTellRequest) ProtoMessage ¶
func (*RemoteTellRequest) ProtoMessage()
func (*RemoteTellRequest) ProtoReflect ¶
func (x *RemoteTellRequest) ProtoReflect() protoreflect.Message
func (*RemoteTellRequest) Reset ¶
func (x *RemoteTellRequest) Reset()
func (*RemoteTellRequest) String ¶
func (x *RemoteTellRequest) String() string
type RemoteTellResponse ¶
type RemoteTellResponse struct {
// contains filtered or unexported fields
}
func (*RemoteTellResponse) Descriptor
deprecated
func (*RemoteTellResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoteTellResponse.ProtoReflect.Descriptor instead.
func (*RemoteTellResponse) ProtoMessage ¶
func (*RemoteTellResponse) ProtoMessage()
func (*RemoteTellResponse) ProtoReflect ¶
func (x *RemoteTellResponse) ProtoReflect() protoreflect.Message
func (*RemoteTellResponse) Reset ¶
func (x *RemoteTellResponse) Reset()
func (*RemoteTellResponse) String ¶
func (x *RemoteTellResponse) String() string
type RemotingServiceClient ¶
type RemotingServiceClient interface { // RemoteAsk is used to send a message to an actor remotely and expect a response // immediately. With this type of message the receiver cannot communicate back to Sender // except reply the message with a response. This one-way communication RemoteAsk(ctx context.Context, in *RemoteAskRequest, opts ...grpc.CallOption) (*RemoteAskResponse, error) // RemoteTell is used to send a message to an actor remotely by another actor // This is the only way remote actors can interact with each other. The actor on the // other line can reply to the sender by using the Sender in the message RemoteTell(ctx context.Context, in *RemoteTellRequest, opts ...grpc.CallOption) (*RemoteTellResponse, error) // Lookup for an actor on a remote host. RemoteLookup(ctx context.Context, in *RemoteLookupRequest, opts ...grpc.CallOption) (*RemoteLookupResponse, error) }
RemotingServiceClient is the client API for RemotingService 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 NewRemotingServiceClient ¶
func NewRemotingServiceClient(cc grpc.ClientConnInterface) RemotingServiceClient
type RemotingServiceServer ¶
type RemotingServiceServer interface { // RemoteAsk is used to send a message to an actor remotely and expect a response // immediately. With this type of message the receiver cannot communicate back to Sender // except reply the message with a response. This one-way communication RemoteAsk(context.Context, *RemoteAskRequest) (*RemoteAskResponse, error) // RemoteTell is used to send a message to an actor remotely by another actor // This is the only way remote actors can interact with each other. The actor on the // other line can reply to the sender by using the Sender in the message RemoteTell(context.Context, *RemoteTellRequest) (*RemoteTellResponse, error) // Lookup for an actor on a remote host. RemoteLookup(context.Context, *RemoteLookupRequest) (*RemoteLookupResponse, error) }
RemotingServiceServer is the server API for RemotingService service. All implementations should embed UnimplementedRemotingServiceServer for forward compatibility
type StrategyDirective ¶
type StrategyDirective int32
Strategy is used to handle a failed child actor
const ( // STOP means stop the child actor in case of error StrategyDirective_STOP_DIRECTIVE StrategyDirective = 0 // RESTART means restart the child actor in case of error StrategyDirective_RESTART_DIRECTIVE StrategyDirective = 1 )
func (StrategyDirective) Descriptor ¶
func (StrategyDirective) Descriptor() protoreflect.EnumDescriptor
func (StrategyDirective) Enum ¶
func (x StrategyDirective) Enum() *StrategyDirective
func (StrategyDirective) EnumDescriptor
deprecated
func (StrategyDirective) EnumDescriptor() ([]byte, []int)
Deprecated: Use StrategyDirective.Descriptor instead.
func (StrategyDirective) Number ¶
func (x StrategyDirective) Number() protoreflect.EnumNumber
func (StrategyDirective) String ¶
func (x StrategyDirective) String() string
func (StrategyDirective) Type ¶
func (StrategyDirective) Type() protoreflect.EnumType
type UnimplementedRemotingServiceServer ¶
type UnimplementedRemotingServiceServer struct { }
UnimplementedRemotingServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedRemotingServiceServer) RemoteAsk ¶
func (UnimplementedRemotingServiceServer) RemoteAsk(context.Context, *RemoteAskRequest) (*RemoteAskResponse, error)
func (UnimplementedRemotingServiceServer) RemoteLookup ¶
func (UnimplementedRemotingServiceServer) RemoteLookup(context.Context, *RemoteLookupRequest) (*RemoteLookupResponse, error)
func (UnimplementedRemotingServiceServer) RemoteTell ¶
func (UnimplementedRemotingServiceServer) RemoteTell(context.Context, *RemoteTellRequest) (*RemoteTellResponse, error)
type UnsafeRemotingServiceServer ¶
type UnsafeRemotingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRemotingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RemotingServiceServer will result in compilation errors.