protoactor-go: github.com/AsynkronIT/protoactor-go/remote Index | Files

package remote

import "github.com/AsynkronIT/protoactor-go/remote"

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

Package Files

activator_actor.go config.go doc.go endpoint_manager.go endpoint_reader.go endpoint_watcher.go endpoint_writer.go endpoint_writer_mailbox.go json_serializer.go log.go messages.go proto_serializer.go protos.pb.go remote_handler.go remote_process.go response_status_code.go serializer.go server.go

Variables

var (
    ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowProtos   = fmt.Errorf("proto: integer overflow")
)
var DefaultSerializerID int32 = 0
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

func ActivatorForAddress Uses

func ActivatorForAddress(address string) *actor.PID

ActivatorForAddress returns a PID for the activator at the given address

func Deserialize Uses

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

func GetKnownKinds Uses

func GetKnownKinds() []string

GetKnownKinds returns a slice of known actor "kinds"

func Register Uses

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

Register a known actor props by name

func RegisterRemotingServer Uses

func RegisterRemotingServer(s *grpc.Server, srv RemotingServer)

func RegisterSerializer Uses

func RegisterSerializer(serializer Serializer)

func RegisterSerializerAsDefault Uses

func RegisterSerializerAsDefault(serializer Serializer)

func SendMessage Uses

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

func Serialize Uses

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

func SetLogLevel Uses

func SetLogLevel(level log.Level)

SetLogLevel sets the log level for the logger.

SetLogLevel is safe to call concurrently

func Shutdown Uses

func Shutdown(graceful bool)

func SpawnFuture Uses

func 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 Start Uses

func Start(address string, options ...RemotingOption)

Start the remote server

type ActivatorError Uses

type ActivatorError struct {
    Code       int32
    DoNotPanic bool
}

func (*ActivatorError) Error Uses

func (e *ActivatorError) Error() string

type ActorPidRequest Uses

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 Uses

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

func (*ActorPidRequest) Equal Uses

func (this *ActorPidRequest) Equal(that interface{}) bool

func (*ActorPidRequest) GetKind Uses

func (m *ActorPidRequest) GetKind() string

func (*ActorPidRequest) GetName Uses

func (m *ActorPidRequest) GetName() string

func (*ActorPidRequest) Marshal Uses

func (m *ActorPidRequest) Marshal() (dAtA []byte, err error)

func (*ActorPidRequest) MarshalTo Uses

func (m *ActorPidRequest) MarshalTo(dAtA []byte) (int, error)

func (*ActorPidRequest) ProtoMessage Uses

func (*ActorPidRequest) ProtoMessage()

func (*ActorPidRequest) Reset Uses

func (m *ActorPidRequest) Reset()

func (*ActorPidRequest) Size Uses

func (m *ActorPidRequest) Size() (n int)

func (*ActorPidRequest) String Uses

func (this *ActorPidRequest) String() string

func (*ActorPidRequest) Unmarshal Uses

func (m *ActorPidRequest) Unmarshal(dAtA []byte) error

type ActorPidResponse Uses

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

func Spawn Uses

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

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

func SpawnNamed Uses

func 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 (*ActorPidResponse) Descriptor Uses

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

func (*ActorPidResponse) Equal Uses

func (this *ActorPidResponse) Equal(that interface{}) bool

func (*ActorPidResponse) GetPid Uses

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

func (*ActorPidResponse) GetStatusCode Uses

func (m *ActorPidResponse) GetStatusCode() int32

func (*ActorPidResponse) Marshal Uses

func (m *ActorPidResponse) Marshal() (dAtA []byte, err error)

func (*ActorPidResponse) MarshalTo Uses

func (m *ActorPidResponse) MarshalTo(dAtA []byte) (int, error)

func (*ActorPidResponse) ProtoMessage Uses

func (*ActorPidResponse) ProtoMessage()

func (*ActorPidResponse) Reset Uses

func (m *ActorPidResponse) Reset()

func (*ActorPidResponse) Size Uses

func (m *ActorPidResponse) Size() (n int)

func (*ActorPidResponse) String Uses

func (this *ActorPidResponse) String() string

func (*ActorPidResponse) Unmarshal Uses

func (m *ActorPidResponse) Unmarshal(dAtA []byte) error

type ConnectRequest Uses

type ConnectRequest struct {
}

func (*ConnectRequest) Descriptor Uses

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

func (*ConnectRequest) Equal Uses

func (this *ConnectRequest) Equal(that interface{}) bool

func (*ConnectRequest) Marshal Uses

func (m *ConnectRequest) Marshal() (dAtA []byte, err error)

func (*ConnectRequest) MarshalTo Uses

func (m *ConnectRequest) MarshalTo(dAtA []byte) (int, error)

func (*ConnectRequest) ProtoMessage Uses

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) Reset Uses

func (m *ConnectRequest) Reset()

func (*ConnectRequest) Size Uses

func (m *ConnectRequest) Size() (n int)

func (*ConnectRequest) String Uses

func (this *ConnectRequest) String() string

func (*ConnectRequest) Unmarshal Uses

func (m *ConnectRequest) Unmarshal(dAtA []byte) error

type ConnectResponse Uses

type ConnectResponse struct {
    DefaultSerializerId int32 `protobuf:"varint,1,opt,name=default_serializer_id,json=defaultSerializerId,proto3" json:"default_serializer_id,omitempty"`
}

func (*ConnectResponse) Descriptor Uses

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

func (*ConnectResponse) Equal Uses

func (this *ConnectResponse) Equal(that interface{}) bool

func (*ConnectResponse) GetDefaultSerializerId Uses

func (m *ConnectResponse) GetDefaultSerializerId() int32

func (*ConnectResponse) Marshal Uses

func (m *ConnectResponse) Marshal() (dAtA []byte, err error)

func (*ConnectResponse) MarshalTo Uses

func (m *ConnectResponse) MarshalTo(dAtA []byte) (int, error)

func (*ConnectResponse) ProtoMessage Uses

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) Reset Uses

func (m *ConnectResponse) Reset()

func (*ConnectResponse) Size Uses

func (m *ConnectResponse) Size() (n int)

func (*ConnectResponse) String Uses

func (this *ConnectResponse) String() string

func (*ConnectResponse) Unmarshal Uses

func (m *ConnectResponse) Unmarshal(dAtA []byte) error

type EndpointConnectedEvent Uses

type EndpointConnectedEvent struct {
    Address string
}

type EndpointTerminatedEvent Uses

type EndpointTerminatedEvent struct {
    Address string
}

type JsonMessage Uses

type JsonMessage struct {
    TypeName string
    Json     string
}

type MessageBatch Uses

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 Uses

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

func (*MessageBatch) Equal Uses

func (this *MessageBatch) Equal(that interface{}) bool

func (*MessageBatch) GetEnvelopes Uses

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

func (*MessageBatch) GetTargetNames Uses

func (m *MessageBatch) GetTargetNames() []string

func (*MessageBatch) GetTypeNames Uses

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

func (*MessageBatch) Marshal Uses

func (m *MessageBatch) Marshal() (dAtA []byte, err error)

func (*MessageBatch) MarshalTo Uses

func (m *MessageBatch) MarshalTo(dAtA []byte) (int, error)

func (*MessageBatch) ProtoMessage Uses

func (*MessageBatch) ProtoMessage()

func (*MessageBatch) Reset Uses

func (m *MessageBatch) Reset()

func (*MessageBatch) Size Uses

func (m *MessageBatch) Size() (n int)

func (*MessageBatch) String Uses

func (this *MessageBatch) String() string

func (*MessageBatch) Unmarshal Uses

func (m *MessageBatch) Unmarshal(dAtA []byte) error

type MessageEnvelope Uses

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 Uses

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

func (*MessageEnvelope) Equal Uses

func (this *MessageEnvelope) Equal(that interface{}) bool

func (*MessageEnvelope) GetMessageData Uses

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

func (*MessageEnvelope) GetSender Uses

func (m *MessageEnvelope) GetSender() *actor.PID

func (*MessageEnvelope) GetSerializerId Uses

func (m *MessageEnvelope) GetSerializerId() int32

func (*MessageEnvelope) GetTarget Uses

func (m *MessageEnvelope) GetTarget() int32

func (*MessageEnvelope) GetTypeId Uses

func (m *MessageEnvelope) GetTypeId() int32

func (*MessageEnvelope) Marshal Uses

func (m *MessageEnvelope) Marshal() (dAtA []byte, err error)

func (*MessageEnvelope) MarshalTo Uses

func (m *MessageEnvelope) MarshalTo(dAtA []byte) (int, error)

func (*MessageEnvelope) ProtoMessage Uses

func (*MessageEnvelope) ProtoMessage()

func (*MessageEnvelope) Reset Uses

func (m *MessageEnvelope) Reset()

func (*MessageEnvelope) Size Uses

func (m *MessageEnvelope) Size() (n int)

func (*MessageEnvelope) String Uses

func (this *MessageEnvelope) String() string

func (*MessageEnvelope) Unmarshal Uses

func (m *MessageEnvelope) Unmarshal(dAtA []byte) error

type RemotingClient Uses

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 Uses

func NewRemotingClient(cc *grpc.ClientConn) RemotingClient

type RemotingOption Uses

type RemotingOption func(*remoteConfig)

RemotingOption configures how the remote infrastructure is started

func WithCallOptions Uses

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

func WithDialOptions Uses

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

func WithEndpointManagerBatchSize Uses

func WithEndpointManagerBatchSize(batchSize int) RemotingOption

func WithEndpointManagerQueueSize Uses

func WithEndpointManagerQueueSize(queueSize int) RemotingOption

func WithEndpointWriterBatchSize Uses

func WithEndpointWriterBatchSize(batchSize int) RemotingOption

func WithEndpointWriterQueueSize Uses

func WithEndpointWriterQueueSize(queueSize int) RemotingOption

func WithServerOptions Uses

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

type RemotingServer Uses

type RemotingServer interface {
    Connect(context.Context, *ConnectRequest) (*ConnectResponse, error)
    Receive(Remoting_ReceiveServer) error
}

type Remoting_ReceiveClient Uses

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

type Remoting_ReceiveServer Uses

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

type ResponseStatusCode Uses

type ResponseStatusCode int32
const (
    ResponseStatusCodeOK ResponseStatusCode = iota
    ResponseStatusCodeUNAVAILABLE
    ResponseStatusCodeTIMEOUT
    ResponseStatusCodePROCESSNAMEALREADYEXIST
    ResponseStatusCodeERROR
)

func (ResponseStatusCode) ToInt32 Uses

func (c ResponseStatusCode) ToInt32() int32

type Serializer Uses

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

type StopEndpointManager Uses

type StopEndpointManager struct{}

type Unit Uses

type Unit struct {
}

func (*Unit) Descriptor Uses

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

func (*Unit) Equal Uses

func (this *Unit) Equal(that interface{}) bool

func (*Unit) Marshal Uses

func (m *Unit) Marshal() (dAtA []byte, err error)

func (*Unit) MarshalTo Uses

func (m *Unit) MarshalTo(dAtA []byte) (int, error)

func (*Unit) ProtoMessage Uses

func (*Unit) ProtoMessage()

func (*Unit) Reset Uses

func (m *Unit) Reset()

func (*Unit) Size Uses

func (m *Unit) Size() (n int)

func (*Unit) String Uses

func (this *Unit) String() string

func (*Unit) Unmarshal Uses

func (m *Unit) Unmarshal(dAtA []byte) error

Package remote imports 26 packages (graph) and is imported by 2 packages. Updated 2017-10-19. Refresh now. Tools for package owners.