Documentation ¶
Index ¶
- Variables
- func NewAgent(c *Cluster) actor.Producer
- type Activation
- func (m *Activation) CloneMessageVT() proto.Message
- func (m *Activation) CloneVT() *Activation
- func (*Activation) Descriptor() ([]byte, []int)deprecated
- func (this *Activation) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Activation) EqualVT(that *Activation) bool
- func (x *Activation) GetPID() *actor.PID
- func (m *Activation) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Activation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Activation) MarshalToVT(dAtA []byte) (int, error)
- func (m *Activation) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Activation) MarshalVT() (dAtA []byte, err error)
- func (m *Activation) MarshalVTStrict() (dAtA []byte, err error)
- func (*Activation) ProtoMessage()
- func (x *Activation) ProtoReflect() protoreflect.Message
- func (x *Activation) Reset()
- func (m *Activation) SizeVT() (n int)
- func (x *Activation) String() string
- func (m *Activation) UnmarshalVT(dAtA []byte) error
- type ActivationConfig
- type ActivationDetails
- type ActivationEvent
- type ActivationRequest
- func (m *ActivationRequest) CloneMessageVT() proto.Message
- func (m *ActivationRequest) CloneVT() *ActivationRequest
- func (*ActivationRequest) Descriptor() ([]byte, []int)deprecated
- func (this *ActivationRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ActivationRequest) EqualVT(that *ActivationRequest) bool
- func (x *ActivationRequest) GetID() string
- func (x *ActivationRequest) GetKind() string
- func (x *ActivationRequest) GetRegion() string
- func (x *ActivationRequest) GetTopologyHash() uint64
- func (m *ActivationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActivationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *ActivationRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActivationRequest) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *ActivationRequest) MarshalVT() (dAtA []byte, err error)
- func (m *ActivationRequest) MarshalVTStrict() (dAtA []byte, err error)
- func (*ActivationRequest) ProtoMessage()
- func (x *ActivationRequest) ProtoReflect() protoreflect.Message
- func (x *ActivationRequest) Reset()
- func (m *ActivationRequest) SizeVT() (n int)
- func (x *ActivationRequest) String() string
- func (m *ActivationRequest) UnmarshalVT(dAtA []byte) error
- type ActivationResponse
- func (m *ActivationResponse) CloneMessageVT() proto.Message
- func (m *ActivationResponse) CloneVT() *ActivationResponse
- func (*ActivationResponse) Descriptor() ([]byte, []int)deprecated
- func (this *ActivationResponse) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ActivationResponse) EqualVT(that *ActivationResponse) bool
- func (x *ActivationResponse) GetPID() *actor.PID
- func (x *ActivationResponse) GetSuccess() bool
- func (x *ActivationResponse) GetTopologyHash() uint64
- func (m *ActivationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActivationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *ActivationResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActivationResponse) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *ActivationResponse) MarshalVT() (dAtA []byte, err error)
- func (m *ActivationResponse) MarshalVTStrict() (dAtA []byte, err error)
- func (*ActivationResponse) ProtoMessage()
- func (x *ActivationResponse) ProtoReflect() protoreflect.Message
- func (x *ActivationResponse) Reset()
- func (m *ActivationResponse) SizeVT() (n int)
- func (x *ActivationResponse) String() string
- func (m *ActivationResponse) UnmarshalVT(dAtA []byte) error
- type ActorInfo
- func (m *ActorInfo) CloneMessageVT() proto.Message
- func (m *ActorInfo) CloneVT() *ActorInfo
- func (*ActorInfo) Descriptor() ([]byte, []int)deprecated
- func (this *ActorInfo) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ActorInfo) EqualVT(that *ActorInfo) bool
- func (x *ActorInfo) GetPID() *actor.PID
- func (m *ActorInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActorInfo) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *ActorInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActorInfo) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *ActorInfo) MarshalVT() (dAtA []byte, err error)
- func (m *ActorInfo) MarshalVTStrict() (dAtA []byte, err error)
- func (*ActorInfo) ProtoMessage()
- func (x *ActorInfo) ProtoReflect() protoreflect.Message
- func (x *ActorInfo) Reset()
- func (m *ActorInfo) SizeVT() (n int)
- func (x *ActorInfo) String() string
- func (m *ActorInfo) UnmarshalVT(dAtA []byte) error
- type ActorTopology
- func (m *ActorTopology) CloneMessageVT() proto.Message
- func (m *ActorTopology) CloneVT() *ActorTopology
- func (*ActorTopology) Descriptor() ([]byte, []int)deprecated
- func (this *ActorTopology) EqualMessageVT(thatMsg proto.Message) bool
- func (this *ActorTopology) EqualVT(that *ActorTopology) bool
- func (x *ActorTopology) GetActors() []*ActorInfo
- func (m *ActorTopology) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActorTopology) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *ActorTopology) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActorTopology) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *ActorTopology) MarshalVT() (dAtA []byte, err error)
- func (m *ActorTopology) MarshalVTStrict() (dAtA []byte, err error)
- func (*ActorTopology) ProtoMessage()
- func (x *ActorTopology) ProtoReflect() protoreflect.Message
- func (x *ActorTopology) Reset()
- func (m *ActorTopology) SizeVT() (n int)
- func (x *ActorTopology) String() string
- func (m *ActorTopology) UnmarshalVT(dAtA []byte) error
- type Agent
- type CID
- func (m *CID) CloneMessageVT() proto.Message
- func (m *CID) CloneVT() *CID
- func (*CID) Descriptor() ([]byte, []int)deprecated
- func (this *CID) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CID) EqualVT(that *CID) bool
- func (cid *CID) Equals(other *CID) bool
- func (x *CID) GetID() string
- func (x *CID) GetKind() string
- func (x *CID) GetPID() *actor.PID
- func (x *CID) GetRegion() string
- func (m *CID) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CID) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *CID) MarshalToVT(dAtA []byte) (int, error)
- func (m *CID) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *CID) MarshalVT() (dAtA []byte, err error)
- func (m *CID) MarshalVTStrict() (dAtA []byte, err error)
- func (*CID) ProtoMessage()
- func (x *CID) ProtoReflect() protoreflect.Message
- func (x *CID) Reset()
- func (m *CID) SizeVT() (n int)
- func (x *CID) String() string
- func (m *CID) UnmarshalVT(dAtA []byte) error
- type Cluster
- func (c *Cluster) Activate(kind string, config ActivationConfig) *actor.PID
- func (c *Cluster) Address() string
- func (c *Cluster) Deactivate(pid *actor.PID)
- func (c *Cluster) Engine() *actor.Engine
- func (c *Cluster) GetActivated(id string) *actor.PID
- func (c *Cluster) HasKind(name string) bool
- func (c *Cluster) HasKindLocal(name string) bool
- func (c *Cluster) ID() string
- func (c *Cluster) Member() *Member
- func (c *Cluster) Members() []*Member
- func (c *Cluster) PID() *actor.PID
- func (c *Cluster) Region() string
- func (c *Cluster) RegisterKind(kind string, producer actor.Producer, config KindConfig)
- func (c *Cluster) Spawn(p actor.Producer, id string, opts ...actor.OptFunc) *actor.PID
- func (c *Cluster) Start()
- func (c *Cluster) Stop() *sync.WaitGroup
- type Config
- func (config Config) WithEngine(e *actor.Engine) Config
- func (config Config) WithID(id string) Config
- func (config Config) WithListenAddr(addr string) Config
- func (config Config) WithProvider(p Producer) Config
- func (config Config) WithRegion(region string) Config
- func (config Config) WithRequestTimeout(d time.Duration) Config
- type Deactivation
- func (m *Deactivation) CloneMessageVT() proto.Message
- func (m *Deactivation) CloneVT() *Deactivation
- func (*Deactivation) Descriptor() ([]byte, []int)deprecated
- func (this *Deactivation) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Deactivation) EqualVT(that *Deactivation) bool
- func (x *Deactivation) GetPID() *actor.PID
- func (m *Deactivation) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Deactivation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Deactivation) MarshalToVT(dAtA []byte) (int, error)
- func (m *Deactivation) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Deactivation) MarshalVT() (dAtA []byte, err error)
- func (m *Deactivation) MarshalVTStrict() (dAtA []byte, err error)
- func (*Deactivation) ProtoMessage()
- func (x *Deactivation) ProtoReflect() protoreflect.Message
- func (x *Deactivation) Reset()
- func (m *Deactivation) SizeVT() (n int)
- func (x *Deactivation) String() string
- func (m *Deactivation) UnmarshalVT(dAtA []byte) error
- type DeactivationEvent
- type Handshake
- func (m *Handshake) CloneMessageVT() proto.Message
- func (m *Handshake) CloneVT() *Handshake
- func (*Handshake) Descriptor() ([]byte, []int)deprecated
- func (this *Handshake) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Handshake) EqualVT(that *Handshake) bool
- func (x *Handshake) GetMember() *Member
- func (m *Handshake) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Handshake) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Handshake) MarshalToVT(dAtA []byte) (int, error)
- func (m *Handshake) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Handshake) MarshalVT() (dAtA []byte, err error)
- func (m *Handshake) MarshalVTStrict() (dAtA []byte, err error)
- func (*Handshake) ProtoMessage()
- func (x *Handshake) ProtoReflect() protoreflect.Message
- func (x *Handshake) Reset()
- func (m *Handshake) SizeVT() (n int)
- func (x *Handshake) String() string
- func (m *Handshake) UnmarshalVT(dAtA []byte) error
- type KindConfig
- type Member
- func (m *Member) CloneMessageVT() proto.Message
- func (m *Member) CloneVT() *Member
- func (*Member) Descriptor() ([]byte, []int)deprecated
- func (this *Member) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Member) EqualVT(that *Member) bool
- func (m *Member) Equals(other *Member) bool
- func (x *Member) GetHost() string
- func (x *Member) GetID() string
- func (x *Member) GetKinds() []string
- func (x *Member) GetRegion() string
- func (m *Member) HasKind(kind string) bool
- func (m *Member) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Member) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Member) MarshalToVT(dAtA []byte) (int, error)
- func (m *Member) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Member) MarshalVT() (dAtA []byte, err error)
- func (m *Member) MarshalVTStrict() (dAtA []byte, err error)
- func (m *Member) PID() *actor.PID
- func (*Member) ProtoMessage()
- func (x *Member) ProtoReflect() protoreflect.Message
- func (x *Member) Reset()
- func (m *Member) SizeVT() (n int)
- func (x *Member) String() string
- func (m *Member) UnmarshalVT(dAtA []byte) error
- type MemberAddr
- type MemberJoinEvent
- type MemberLeaveEvent
- type MemberSet
- func (s *MemberSet) Add(member *Member)
- func (s *MemberSet) Contains(member *Member) bool
- func (s *MemberSet) Except(members []*Member) []*Member
- func (s *MemberSet) FilterByKind(kind string) []*Member
- func (s *MemberSet) ForEach(fun func(m *Member) bool)
- func (s *MemberSet) GetByHost(host string) *Member
- func (s *MemberSet) Len() int
- func (s *MemberSet) Remove(member *Member)
- func (s *MemberSet) RemoveByHost(host string)
- func (s *MemberSet) Slice() []*Member
- type Members
- func (m *Members) CloneMessageVT() proto.Message
- func (m *Members) CloneVT() *Members
- func (*Members) Descriptor() ([]byte, []int)deprecated
- func (this *Members) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Members) EqualVT(that *Members) bool
- func (x *Members) GetMembers() []*Member
- func (m *Members) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Members) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Members) MarshalToVT(dAtA []byte) (int, error)
- func (m *Members) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Members) MarshalVT() (dAtA []byte, err error)
- func (m *Members) MarshalVTStrict() (dAtA []byte, err error)
- func (*Members) ProtoMessage()
- func (x *Members) ProtoReflect() protoreflect.Message
- func (x *Members) Reset()
- func (m *Members) SizeVT() (n int)
- func (x *Members) String() string
- func (m *Members) UnmarshalVT(dAtA []byte) error
- type MembersJoin
- func (m *MembersJoin) CloneMessageVT() proto.Message
- func (m *MembersJoin) CloneVT() *MembersJoin
- func (*MembersJoin) Descriptor() ([]byte, []int)deprecated
- func (this *MembersJoin) EqualMessageVT(thatMsg proto.Message) bool
- func (this *MembersJoin) EqualVT(that *MembersJoin) bool
- func (x *MembersJoin) GetMembers() []*Member
- func (m *MembersJoin) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *MembersJoin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *MembersJoin) MarshalToVT(dAtA []byte) (int, error)
- func (m *MembersJoin) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *MembersJoin) MarshalVT() (dAtA []byte, err error)
- func (m *MembersJoin) MarshalVTStrict() (dAtA []byte, err error)
- func (*MembersJoin) ProtoMessage()
- func (x *MembersJoin) ProtoReflect() protoreflect.Message
- func (x *MembersJoin) Reset()
- func (m *MembersJoin) SizeVT() (n int)
- func (x *MembersJoin) String() string
- func (m *MembersJoin) UnmarshalVT(dAtA []byte) error
- type MembersLeave
- func (m *MembersLeave) CloneMessageVT() proto.Message
- func (m *MembersLeave) CloneVT() *MembersLeave
- func (*MembersLeave) Descriptor() ([]byte, []int)deprecated
- func (this *MembersLeave) EqualMessageVT(thatMsg proto.Message) bool
- func (this *MembersLeave) EqualVT(that *MembersLeave) bool
- func (x *MembersLeave) GetMembers() []*Member
- func (m *MembersLeave) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *MembersLeave) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *MembersLeave) MarshalToVT(dAtA []byte) (int, error)
- func (m *MembersLeave) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *MembersLeave) MarshalVT() (dAtA []byte, err error)
- func (m *MembersLeave) MarshalVTStrict() (dAtA []byte, err error)
- func (*MembersLeave) ProtoMessage()
- func (x *MembersLeave) ProtoReflect() protoreflect.Message
- func (x *MembersLeave) Reset()
- func (m *MembersLeave) SizeVT() (n int)
- func (x *MembersLeave) String() string
- func (m *MembersLeave) UnmarshalVT(dAtA []byte) error
- type Producer
- type SelectMemberFunc
- type SelfManaged
- type SelfManagedConfig
- type Topology
- func (m *Topology) CloneMessageVT() proto.Message
- func (m *Topology) CloneVT() *Topology
- func (*Topology) Descriptor() ([]byte, []int)deprecated
- func (this *Topology) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Topology) EqualVT(that *Topology) bool
- func (x *Topology) GetBlocked() []*Member
- func (x *Topology) GetHash() uint64
- func (x *Topology) GetJoined() []*Member
- func (x *Topology) GetLeft() []*Member
- func (x *Topology) GetMembers() []*Member
- func (m *Topology) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Topology) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *Topology) MarshalToVT(dAtA []byte) (int, error)
- func (m *Topology) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *Topology) MarshalVT() (dAtA []byte, err error)
- func (m *Topology) MarshalVTStrict() (dAtA []byte, err error)
- func (*Topology) ProtoMessage()
- func (x *Topology) ProtoReflect() protoreflect.Message
- func (x *Topology) Reset()
- func (m *Topology) SizeVT() (n int)
- func (x *Topology) String() string
- func (m *Topology) UnmarshalVT(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_cluster_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Activation ¶
type Activation struct { PID *actor.PID `protobuf:"bytes,1,opt,name=PID,proto3" json:"PID,omitempty"` // contains filtered or unexported fields }
func (*Activation) CloneMessageVT ¶
func (m *Activation) CloneMessageVT() proto.Message
func (*Activation) CloneVT ¶
func (m *Activation) CloneVT() *Activation
func (*Activation) Descriptor
deprecated
func (*Activation) Descriptor() ([]byte, []int)
Deprecated: Use Activation.ProtoReflect.Descriptor instead.
func (*Activation) EqualMessageVT ¶
func (this *Activation) EqualMessageVT(thatMsg proto.Message) bool
func (*Activation) EqualVT ¶
func (this *Activation) EqualVT(that *Activation) bool
func (*Activation) GetPID ¶
func (x *Activation) GetPID() *actor.PID
func (*Activation) MarshalToSizedBufferVT ¶
func (m *Activation) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*Activation) MarshalToSizedBufferVTStrict ¶
func (m *Activation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*Activation) MarshalToVT ¶
func (m *Activation) MarshalToVT(dAtA []byte) (int, error)
func (*Activation) MarshalToVTStrict ¶
func (m *Activation) MarshalToVTStrict(dAtA []byte) (int, error)
func (*Activation) MarshalVT ¶
func (m *Activation) MarshalVT() (dAtA []byte, err error)
func (*Activation) MarshalVTStrict ¶
func (m *Activation) MarshalVTStrict() (dAtA []byte, err error)
func (*Activation) ProtoMessage ¶
func (*Activation) ProtoMessage()
func (*Activation) ProtoReflect ¶
func (x *Activation) ProtoReflect() protoreflect.Message
func (*Activation) Reset ¶
func (x *Activation) Reset()
func (*Activation) SizeVT ¶
func (m *Activation) SizeVT() (n int)
func (*Activation) String ¶
func (x *Activation) String() string
func (*Activation) UnmarshalVT ¶
func (m *Activation) UnmarshalVT(dAtA []byte) error
type ActivationConfig ¶
type ActivationConfig struct {
// contains filtered or unexported fields
}
ActivationConfig...
func NewActivationConfig ¶
func NewActivationConfig() ActivationConfig
NewActivationConfig returns a new default config.
func (ActivationConfig) WithID ¶
func (config ActivationConfig) WithID(id string) ActivationConfig
WithID set's the id of the actor that will be activated on the cluster.
Defaults to a random identifier.
func (ActivationConfig) WithRegion ¶
func (config ActivationConfig) WithRegion(region string) ActivationConfig
WithRegion set's the region on where this actor should be spawned.
Defaults to a "default".
func (ActivationConfig) WithSelectMemberFunc ¶
func (config ActivationConfig) WithSelectMemberFunc(fun SelectMemberFunc) ActivationConfig
WithSelectMemberFunc set's the fuction that will be invoked during the activation process. It will select the member where the actor will be activated/spawned on.
type ActivationDetails ¶
type ActivationDetails struct { // Region where the actor should be activated on Region string // A slice of members that are pre-filtered by the kind of the actor // that need to be activated Members []*Member // The kind of the actor Kind string }
ActivationDetails holds detailed information about an activation.
type ActivationEvent ¶
ActivationEvent gets triggered each time a new actor is activated somewhere on the cluster.
type ActivationRequest ¶
type ActivationRequest struct { Kind string `protobuf:"bytes,1,opt,name=Kind,proto3" json:"Kind,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` Region string `protobuf:"bytes,3,opt,name=Region,proto3" json:"Region,omitempty"` TopologyHash uint64 `protobuf:"varint,4,opt,name=topologyHash,proto3" json:"topologyHash,omitempty"` // contains filtered or unexported fields }
func (*ActivationRequest) CloneMessageVT ¶
func (m *ActivationRequest) CloneMessageVT() proto.Message
func (*ActivationRequest) CloneVT ¶
func (m *ActivationRequest) CloneVT() *ActivationRequest
func (*ActivationRequest) Descriptor
deprecated
func (*ActivationRequest) Descriptor() ([]byte, []int)
Deprecated: Use ActivationRequest.ProtoReflect.Descriptor instead.
func (*ActivationRequest) EqualMessageVT ¶
func (this *ActivationRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*ActivationRequest) EqualVT ¶
func (this *ActivationRequest) EqualVT(that *ActivationRequest) bool
func (*ActivationRequest) GetID ¶
func (x *ActivationRequest) GetID() string
func (*ActivationRequest) GetKind ¶
func (x *ActivationRequest) GetKind() string
func (*ActivationRequest) GetRegion ¶
func (x *ActivationRequest) GetRegion() string
func (*ActivationRequest) GetTopologyHash ¶
func (x *ActivationRequest) GetTopologyHash() uint64
func (*ActivationRequest) MarshalToSizedBufferVT ¶
func (m *ActivationRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ActivationRequest) MarshalToSizedBufferVTStrict ¶
func (m *ActivationRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*ActivationRequest) MarshalToVT ¶
func (m *ActivationRequest) MarshalToVT(dAtA []byte) (int, error)
func (*ActivationRequest) MarshalToVTStrict ¶
func (m *ActivationRequest) MarshalToVTStrict(dAtA []byte) (int, error)
func (*ActivationRequest) MarshalVT ¶
func (m *ActivationRequest) MarshalVT() (dAtA []byte, err error)
func (*ActivationRequest) MarshalVTStrict ¶
func (m *ActivationRequest) MarshalVTStrict() (dAtA []byte, err error)
func (*ActivationRequest) ProtoMessage ¶
func (*ActivationRequest) ProtoMessage()
func (*ActivationRequest) ProtoReflect ¶
func (x *ActivationRequest) ProtoReflect() protoreflect.Message
func (*ActivationRequest) Reset ¶
func (x *ActivationRequest) Reset()
func (*ActivationRequest) SizeVT ¶
func (m *ActivationRequest) SizeVT() (n int)
func (*ActivationRequest) String ¶
func (x *ActivationRequest) String() string
func (*ActivationRequest) UnmarshalVT ¶
func (m *ActivationRequest) UnmarshalVT(dAtA []byte) error
type ActivationResponse ¶
type ActivationResponse struct { PID *actor.PID `protobuf:"bytes,1,opt,name=PID,proto3" json:"PID,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` TopologyHash uint64 `protobuf:"varint,3,opt,name=topologyHash,proto3" json:"topologyHash,omitempty"` // contains filtered or unexported fields }
func (*ActivationResponse) CloneMessageVT ¶
func (m *ActivationResponse) CloneMessageVT() proto.Message
func (*ActivationResponse) CloneVT ¶
func (m *ActivationResponse) CloneVT() *ActivationResponse
func (*ActivationResponse) Descriptor
deprecated
func (*ActivationResponse) Descriptor() ([]byte, []int)
Deprecated: Use ActivationResponse.ProtoReflect.Descriptor instead.
func (*ActivationResponse) EqualMessageVT ¶
func (this *ActivationResponse) EqualMessageVT(thatMsg proto.Message) bool
func (*ActivationResponse) EqualVT ¶
func (this *ActivationResponse) EqualVT(that *ActivationResponse) bool
func (*ActivationResponse) GetPID ¶
func (x *ActivationResponse) GetPID() *actor.PID
func (*ActivationResponse) GetSuccess ¶
func (x *ActivationResponse) GetSuccess() bool
func (*ActivationResponse) GetTopologyHash ¶
func (x *ActivationResponse) GetTopologyHash() uint64
func (*ActivationResponse) MarshalToSizedBufferVT ¶
func (m *ActivationResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ActivationResponse) MarshalToSizedBufferVTStrict ¶
func (m *ActivationResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*ActivationResponse) MarshalToVT ¶
func (m *ActivationResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ActivationResponse) MarshalToVTStrict ¶
func (m *ActivationResponse) MarshalToVTStrict(dAtA []byte) (int, error)
func (*ActivationResponse) MarshalVT ¶
func (m *ActivationResponse) MarshalVT() (dAtA []byte, err error)
func (*ActivationResponse) MarshalVTStrict ¶
func (m *ActivationResponse) MarshalVTStrict() (dAtA []byte, err error)
func (*ActivationResponse) ProtoMessage ¶
func (*ActivationResponse) ProtoMessage()
func (*ActivationResponse) ProtoReflect ¶
func (x *ActivationResponse) ProtoReflect() protoreflect.Message
func (*ActivationResponse) Reset ¶
func (x *ActivationResponse) Reset()
func (*ActivationResponse) SizeVT ¶
func (m *ActivationResponse) SizeVT() (n int)
func (*ActivationResponse) String ¶
func (x *ActivationResponse) String() string
func (*ActivationResponse) UnmarshalVT ¶
func (m *ActivationResponse) UnmarshalVT(dAtA []byte) error
type ActorInfo ¶
type ActorInfo struct { PID *actor.PID `protobuf:"bytes,2,opt,name=PID,proto3" json:"PID,omitempty"` // contains filtered or unexported fields }
func (*ActorInfo) CloneMessageVT ¶
func (*ActorInfo) Descriptor
deprecated
func (*ActorInfo) EqualMessageVT ¶
func (*ActorInfo) MarshalToSizedBufferVT ¶
func (*ActorInfo) MarshalToSizedBufferVTStrict ¶
func (*ActorInfo) MarshalToVTStrict ¶
func (*ActorInfo) MarshalVTStrict ¶
func (*ActorInfo) ProtoMessage ¶
func (*ActorInfo) ProtoMessage()
func (*ActorInfo) ProtoReflect ¶
func (x *ActorInfo) ProtoReflect() protoreflect.Message
func (*ActorInfo) UnmarshalVT ¶
type ActorTopology ¶
type ActorTopology struct { Actors []*ActorInfo `protobuf:"bytes,1,rep,name=actors,proto3" json:"actors,omitempty"` // contains filtered or unexported fields }
func (*ActorTopology) CloneMessageVT ¶
func (m *ActorTopology) CloneMessageVT() proto.Message
func (*ActorTopology) CloneVT ¶
func (m *ActorTopology) CloneVT() *ActorTopology
func (*ActorTopology) Descriptor
deprecated
func (*ActorTopology) Descriptor() ([]byte, []int)
Deprecated: Use ActorTopology.ProtoReflect.Descriptor instead.
func (*ActorTopology) EqualMessageVT ¶
func (this *ActorTopology) EqualMessageVT(thatMsg proto.Message) bool
func (*ActorTopology) EqualVT ¶
func (this *ActorTopology) EqualVT(that *ActorTopology) bool
func (*ActorTopology) GetActors ¶
func (x *ActorTopology) GetActors() []*ActorInfo
func (*ActorTopology) MarshalToSizedBufferVT ¶
func (m *ActorTopology) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ActorTopology) MarshalToSizedBufferVTStrict ¶
func (m *ActorTopology) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*ActorTopology) MarshalToVT ¶
func (m *ActorTopology) MarshalToVT(dAtA []byte) (int, error)
func (*ActorTopology) MarshalToVTStrict ¶
func (m *ActorTopology) MarshalToVTStrict(dAtA []byte) (int, error)
func (*ActorTopology) MarshalVT ¶
func (m *ActorTopology) MarshalVT() (dAtA []byte, err error)
func (*ActorTopology) MarshalVTStrict ¶
func (m *ActorTopology) MarshalVTStrict() (dAtA []byte, err error)
func (*ActorTopology) ProtoMessage ¶
func (*ActorTopology) ProtoMessage()
func (*ActorTopology) ProtoReflect ¶
func (x *ActorTopology) ProtoReflect() protoreflect.Message
func (*ActorTopology) Reset ¶
func (x *ActorTopology) Reset()
func (*ActorTopology) SizeVT ¶
func (m *ActorTopology) SizeVT() (n int)
func (*ActorTopology) String ¶
func (x *ActorTopology) String() string
func (*ActorTopology) UnmarshalVT ¶
func (m *ActorTopology) UnmarshalVT(dAtA []byte) error
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is an actor/receiver that is responsible for managing the state of the cluster.
type CID ¶
type CID struct { PID *actor.PID `protobuf:"bytes,1,opt,name=PID,proto3" json:"PID,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region,omitempty"` // contains filtered or unexported fields }
func (*CID) CloneMessageVT ¶
func (*CID) Descriptor
deprecated
func (*CID) MarshalToSizedBufferVTStrict ¶
func (*CID) MarshalVTStrict ¶
func (*CID) ProtoMessage ¶
func (*CID) ProtoMessage()
func (*CID) ProtoReflect ¶
func (x *CID) ProtoReflect() protoreflect.Message
func (*CID) UnmarshalVT ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster allows you to write distributed actors. It combines Engine, Remote, and Provider which allows members of the cluster to send messages to eachother in a self discovering environment.
func (*Cluster) Activate ¶
func (c *Cluster) Activate(kind string, config ActivationConfig) *actor.PID
Activate actives the registered kind in the cluster based on the given config. The actor does not need to be registered locally on the member if at least one member has that kind registered.
playerPID := cluster.Activate("player", cluster.NewActivationConfig())
func (*Cluster) Deactivate ¶
Deactivate deactivates the given PID.
func (*Cluster) HasKind ¶
HasKind returns true whether the given kind is available for activation on the cluster.
func (*Cluster) HasKindLocal ¶
HasKindLocal returns true whether the node of the cluster has the kind locally registered.
func (*Cluster) RegisterKind ¶
func (c *Cluster) RegisterKind(kind string, producer actor.Producer, config KindConfig)
RegisterKind registers a new actor that can be activated from any member in the cluster.
cluster.Register("player", NewPlayer, NewKindConfig())
NOTE: Kinds can only be registered before the cluster is started.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds the cluster configuration
func NewConfig ¶
func NewConfig() Config
NewConfig returns a Config that is initialized with default values.
func (Config) WithEngine ¶
WithEngine set's the internal actor engine that will be used to power the actors running on the node.
If no engine is given the cluster will instanciate a new engine and remote.
func (Config) WithListenAddr ¶
WithListenAddr set's the listen address of the underlying remote.
Defaults to a random port number.
func (Config) WithProvider ¶
WithProvider set's the cluster provider.
Defaults to the SelfManagedProvider.
func (Config) WithRegion ¶
WithRegion set's the region where the member will be hosted.
Defaults to "default"
type Deactivation ¶
type Deactivation struct { PID *actor.PID `protobuf:"bytes,1,opt,name=PID,proto3" json:"PID,omitempty"` // contains filtered or unexported fields }
func (*Deactivation) CloneMessageVT ¶
func (m *Deactivation) CloneMessageVT() proto.Message
func (*Deactivation) CloneVT ¶
func (m *Deactivation) CloneVT() *Deactivation
func (*Deactivation) Descriptor
deprecated
func (*Deactivation) Descriptor() ([]byte, []int)
Deprecated: Use Deactivation.ProtoReflect.Descriptor instead.
func (*Deactivation) EqualMessageVT ¶
func (this *Deactivation) EqualMessageVT(thatMsg proto.Message) bool
func (*Deactivation) EqualVT ¶
func (this *Deactivation) EqualVT(that *Deactivation) bool
func (*Deactivation) GetPID ¶
func (x *Deactivation) GetPID() *actor.PID
func (*Deactivation) MarshalToSizedBufferVT ¶
func (m *Deactivation) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*Deactivation) MarshalToSizedBufferVTStrict ¶
func (m *Deactivation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*Deactivation) MarshalToVT ¶
func (m *Deactivation) MarshalToVT(dAtA []byte) (int, error)
func (*Deactivation) MarshalToVTStrict ¶
func (m *Deactivation) MarshalToVTStrict(dAtA []byte) (int, error)
func (*Deactivation) MarshalVT ¶
func (m *Deactivation) MarshalVT() (dAtA []byte, err error)
func (*Deactivation) MarshalVTStrict ¶
func (m *Deactivation) MarshalVTStrict() (dAtA []byte, err error)
func (*Deactivation) ProtoMessage ¶
func (*Deactivation) ProtoMessage()
func (*Deactivation) ProtoReflect ¶
func (x *Deactivation) ProtoReflect() protoreflect.Message
func (*Deactivation) Reset ¶
func (x *Deactivation) Reset()
func (*Deactivation) SizeVT ¶
func (m *Deactivation) SizeVT() (n int)
func (*Deactivation) String ¶
func (x *Deactivation) String() string
func (*Deactivation) UnmarshalVT ¶
func (m *Deactivation) UnmarshalVT(dAtA []byte) error
type DeactivationEvent ¶
DeactivationEvent gets triggered each time an actor gets deactivated somewhere on the cluster.
type Handshake ¶
type Handshake struct { Member *Member `protobuf:"bytes,1,opt,name=Member,proto3" json:"Member,omitempty"` // contains filtered or unexported fields }
func (*Handshake) CloneMessageVT ¶
func (*Handshake) Descriptor
deprecated
func (*Handshake) EqualMessageVT ¶
func (*Handshake) MarshalToSizedBufferVT ¶
func (*Handshake) MarshalToSizedBufferVTStrict ¶
func (*Handshake) MarshalToVTStrict ¶
func (*Handshake) MarshalVTStrict ¶
func (*Handshake) ProtoMessage ¶
func (*Handshake) ProtoMessage()
func (*Handshake) ProtoReflect ¶
func (x *Handshake) ProtoReflect() protoreflect.Message
func (*Handshake) UnmarshalVT ¶
type KindConfig ¶
type KindConfig struct{}
KindConfig holds configuration for a registered kind.
func NewKindConfig ¶
func NewKindConfig() KindConfig
NewKindConfig returns a default kind configuration.
type Member ¶
type Member struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` Kinds []string `protobuf:"bytes,4,rep,name=kinds,proto3" json:"kinds,omitempty"` // contains filtered or unexported fields }
func SelectRandomMember ¶
func SelectRandomMember(details ActivationDetails) *Member
SelectRandomMember selects a random member of the cluster.
func (*Member) CloneMessageVT ¶
func (*Member) Descriptor
deprecated
func (*Member) HasKind ¶
TODO: Maybe relocate this function. HasKind returns true whether the Member has the given kind registered.
func (*Member) MarshalToSizedBufferVT ¶
func (*Member) MarshalToSizedBufferVTStrict ¶
func (*Member) MarshalVTStrict ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) ProtoReflect ¶
func (x *Member) ProtoReflect() protoreflect.Message
func (*Member) UnmarshalVT ¶
type MemberAddr ¶
MemberAddr represents a reachable node in the cluster.
type MemberJoinEvent ¶
type MemberJoinEvent struct {
Member *Member
}
MemberJoinEvent gets triggered each time a new member enters the cluster.
type MemberLeaveEvent ¶
type MemberLeaveEvent struct {
Member *Member
}
MemberLeaveEvent gets triggered each time a member leaves the cluster.
type MemberSet ¶
type MemberSet struct {
// contains filtered or unexported fields
}
func NewMemberSet ¶
func (*MemberSet) FilterByKind ¶
func (*MemberSet) RemoveByHost ¶
type Members ¶
type Members struct { Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
func (*Members) CloneMessageVT ¶
func (*Members) Descriptor
deprecated
func (*Members) GetMembers ¶
func (*Members) MarshalToSizedBufferVT ¶
func (*Members) MarshalToSizedBufferVTStrict ¶
func (*Members) MarshalVTStrict ¶
func (*Members) ProtoMessage ¶
func (*Members) ProtoMessage()
func (*Members) ProtoReflect ¶
func (x *Members) ProtoReflect() protoreflect.Message
func (*Members) UnmarshalVT ¶
type MembersJoin ¶
type MembersJoin struct { Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
TODO: Deprecated
func (*MembersJoin) CloneMessageVT ¶
func (m *MembersJoin) CloneMessageVT() proto.Message
func (*MembersJoin) CloneVT ¶
func (m *MembersJoin) CloneVT() *MembersJoin
func (*MembersJoin) Descriptor
deprecated
func (*MembersJoin) Descriptor() ([]byte, []int)
Deprecated: Use MembersJoin.ProtoReflect.Descriptor instead.
func (*MembersJoin) EqualMessageVT ¶
func (this *MembersJoin) EqualMessageVT(thatMsg proto.Message) bool
func (*MembersJoin) EqualVT ¶
func (this *MembersJoin) EqualVT(that *MembersJoin) bool
func (*MembersJoin) GetMembers ¶
func (x *MembersJoin) GetMembers() []*Member
func (*MembersJoin) MarshalToSizedBufferVT ¶
func (m *MembersJoin) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*MembersJoin) MarshalToSizedBufferVTStrict ¶
func (m *MembersJoin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*MembersJoin) MarshalToVT ¶
func (m *MembersJoin) MarshalToVT(dAtA []byte) (int, error)
func (*MembersJoin) MarshalToVTStrict ¶
func (m *MembersJoin) MarshalToVTStrict(dAtA []byte) (int, error)
func (*MembersJoin) MarshalVT ¶
func (m *MembersJoin) MarshalVT() (dAtA []byte, err error)
func (*MembersJoin) MarshalVTStrict ¶
func (m *MembersJoin) MarshalVTStrict() (dAtA []byte, err error)
func (*MembersJoin) ProtoMessage ¶
func (*MembersJoin) ProtoMessage()
func (*MembersJoin) ProtoReflect ¶
func (x *MembersJoin) ProtoReflect() protoreflect.Message
func (*MembersJoin) Reset ¶
func (x *MembersJoin) Reset()
func (*MembersJoin) SizeVT ¶
func (m *MembersJoin) SizeVT() (n int)
func (*MembersJoin) String ¶
func (x *MembersJoin) String() string
func (*MembersJoin) UnmarshalVT ¶
func (m *MembersJoin) UnmarshalVT(dAtA []byte) error
type MembersLeave ¶
type MembersLeave struct { Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` // contains filtered or unexported fields }
func (*MembersLeave) CloneMessageVT ¶
func (m *MembersLeave) CloneMessageVT() proto.Message
func (*MembersLeave) CloneVT ¶
func (m *MembersLeave) CloneVT() *MembersLeave
func (*MembersLeave) Descriptor
deprecated
func (*MembersLeave) Descriptor() ([]byte, []int)
Deprecated: Use MembersLeave.ProtoReflect.Descriptor instead.
func (*MembersLeave) EqualMessageVT ¶
func (this *MembersLeave) EqualMessageVT(thatMsg proto.Message) bool
func (*MembersLeave) EqualVT ¶
func (this *MembersLeave) EqualVT(that *MembersLeave) bool
func (*MembersLeave) GetMembers ¶
func (x *MembersLeave) GetMembers() []*Member
func (*MembersLeave) MarshalToSizedBufferVT ¶
func (m *MembersLeave) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*MembersLeave) MarshalToSizedBufferVTStrict ¶
func (m *MembersLeave) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*MembersLeave) MarshalToVT ¶
func (m *MembersLeave) MarshalToVT(dAtA []byte) (int, error)
func (*MembersLeave) MarshalToVTStrict ¶
func (m *MembersLeave) MarshalToVTStrict(dAtA []byte) (int, error)
func (*MembersLeave) MarshalVT ¶
func (m *MembersLeave) MarshalVT() (dAtA []byte, err error)
func (*MembersLeave) MarshalVTStrict ¶
func (m *MembersLeave) MarshalVTStrict() (dAtA []byte, err error)
func (*MembersLeave) ProtoMessage ¶
func (*MembersLeave) ProtoMessage()
func (*MembersLeave) ProtoReflect ¶
func (x *MembersLeave) ProtoReflect() protoreflect.Message
func (*MembersLeave) Reset ¶
func (x *MembersLeave) Reset()
func (*MembersLeave) SizeVT ¶
func (m *MembersLeave) SizeVT() (n int)
func (*MembersLeave) String ¶
func (x *MembersLeave) String() string
func (*MembersLeave) UnmarshalVT ¶
func (m *MembersLeave) UnmarshalVT(dAtA []byte) error
type Producer ¶
Producer is a function that produces an actor.Producer given a *cluster.Cluster. Pretty simple, but yet powerfull tool to construct receivers that are depending on Cluster.
func NewSelfManagedProvider ¶
func NewSelfManagedProvider(config SelfManagedConfig) Producer
type SelectMemberFunc ¶
type SelectMemberFunc func(ActivationDetails) *Member
SelectMemberFunc will be invoked during the activation process. Given the ActivationDetails the actor will be spawned on the returned member.
type SelfManaged ¶
type SelfManaged struct {
// contains filtered or unexported fields
}
func (*SelfManaged) Receive ¶
func (s *SelfManaged) Receive(c *actor.Context)
type SelfManagedConfig ¶
type SelfManagedConfig struct {
// contains filtered or unexported fields
}
func NewSelfManagedConfig ¶
func NewSelfManagedConfig() SelfManagedConfig
func (SelfManagedConfig) WithBootstrapMember ¶
func (c SelfManagedConfig) WithBootstrapMember(member MemberAddr) SelfManagedConfig
type Topology ¶
type Topology struct { Hash uint64 `protobuf:"varint,1,opt,name=hash,proto3" json:"hash,omitempty"` Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` Left []*Member `protobuf:"bytes,3,rep,name=left,proto3" json:"left,omitempty"` Joined []*Member `protobuf:"bytes,4,rep,name=joined,proto3" json:"joined,omitempty"` Blocked []*Member `protobuf:"bytes,5,rep,name=blocked,proto3" json:"blocked,omitempty"` // contains filtered or unexported fields }
func (*Topology) CloneMessageVT ¶
func (*Topology) Descriptor
deprecated
func (*Topology) GetBlocked ¶
func (*Topology) GetMembers ¶
func (*Topology) MarshalToSizedBufferVT ¶
func (*Topology) MarshalToSizedBufferVTStrict ¶
func (*Topology) MarshalVTStrict ¶
func (*Topology) ProtoMessage ¶
func (*Topology) ProtoMessage()
func (*Topology) ProtoReflect ¶
func (x *Topology) ProtoReflect() protoreflect.Message