Documentation
¶
Overview ¶
Package actor is a generated protocol buffer package.
It is generated from these files:
protos.proto
It has these top-level messages:
PID Restarting Stopping Stopped PoisonPill Started
Index ¶
- Constants
- Variables
- func RequestResponsePID() (*PID, *Response)
- type Actor
- type ActorCell
- func (cell *ActorCell) Become(behavior Receive)
- func (cell *ActorCell) BecomeStacked(behavior Receive)
- func (cell *ActorCell) Children() []*PID
- func (cell *ActorCell) Parent() *PID
- func (cell *ActorCell) Self() *PID
- func (cell *ActorCell) Spawn(props Props) *PID
- func (cell *ActorCell) SpawnNamed(props Props, name string) *PID
- func (cell *ActorCell) UnbecomeStacked()
- func (cell *ActorCell) Unwatch(who *PID)
- func (cell *ActorCell) Watch(who *PID)
- type ActorProducer
- type ActorRef
- type BoundedBatchingMailbox
- func (mailbox *BoundedBatchingMailbox) PostSystemMessage(message SystemMessage)
- func (mailbox *BoundedBatchingMailbox) PostUserMessage(message interface{})
- func (mailbox *BoundedBatchingMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
- func (mailbox *BoundedBatchingMailbox) Resume()
- func (mailbox *BoundedBatchingMailbox) Suspend()
- type BoundedMailbox
- func (mailbox *BoundedMailbox) PostSystemMessage(message SystemMessage)
- func (mailbox *BoundedMailbox) PostUserMessage(message interface{})
- func (mailbox *BoundedMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
- func (mailbox *BoundedMailbox) Resume()
- func (mailbox *BoundedMailbox) Suspend()
- type Context
- type ContextValue
- type DeadLetterActorRef
- type Decider
- type Directive
- type EmptyActor
- type GroupRouterConfig
- type HostResolver
- type LocalActorRef
- type Mailbox
- type MailboxProducer
- type OneForOneStrategy
- type PID
- func (*PID) Descriptor() ([]byte, []int)
- func (m *PID) Marshal() (data []byte, err error)
- func (m *PID) MarshalTo(data []byte) (int, error)
- func (*PID) ProtoMessage()
- func (m *PID) Reset()
- func (m *PID) Size() (n int)
- func (pid *PID) Stop()
- func (m *PID) String() string
- func (pid *PID) Tell(message interface{})
- func (m *PID) Unmarshal(data []byte) error
- type PoisonPill
- func (*PoisonPill) Descriptor() ([]byte, []int)
- func (m *PoisonPill) Marshal() (data []byte, err error)
- func (m *PoisonPill) MarshalTo(data []byte) (int, error)
- func (*PoisonPill) ProtoMessage()
- func (m *PoisonPill) Reset()
- func (m *PoisonPill) Size() (n int)
- func (m *PoisonPill) String() string
- func (m *PoisonPill) Unmarshal(data []byte) error
- type PoolRouterConfig
- type ProcessRegistryValue
- type Properties
- type Props
- func (props Props) ProduceActor() Actor
- func (props Props) ProduceMailbox() Mailbox
- func (props Props) RouterConfig() RouterConfig
- func (props Props) Supervisor() SupervisionStrategy
- func (props Props) WithMailbox(mailbox MailboxProducer) Props
- func (props Props) WithPoolRouter(routerConfig PoolRouterConfig) Props
- func (props Props) WithSupervisor(supervisor SupervisionStrategy) Props
- type Receive
- type Response
- func (ref *Response) Result() interface{}
- func (ref *Response) ResultChannel() <-chan interface{}
- func (ref *Response) ResultOrTimeout(timeout time.Duration) (interface{}, error)
- func (ref *Response) SendSystemMessage(message SystemMessage)
- func (ref *Response) Stop()
- func (ref *Response) Tell(message interface{})
- type Restarting
- func (*Restarting) Descriptor() ([]byte, []int)
- func (m *Restarting) Marshal() (data []byte, err error)
- func (m *Restarting) MarshalTo(data []byte) (int, error)
- func (*Restarting) ProtoMessage()
- func (m *Restarting) Reset()
- func (m *Restarting) Size() (n int)
- func (m *Restarting) String() string
- func (m *Restarting) Unmarshal(data []byte) error
- type RoundRobinGroupRouter
- type RoundRobinPoolRouter
- type RoundRobinState
- type RouterActorRef
- type RouterConfig
- type RouterState
- type Started
- func (*Started) Descriptor() ([]byte, []int)
- func (m *Started) Marshal() (data []byte, err error)
- func (m *Started) MarshalTo(data []byte) (int, error)
- func (*Started) ProtoMessage()
- func (m *Started) Reset()
- func (m *Started) Size() (n int)
- func (m *Started) String() string
- func (m *Started) Unmarshal(data []byte) error
- type Stopped
- func (*Stopped) Descriptor() ([]byte, []int)
- func (m *Stopped) Marshal() (data []byte, err error)
- func (m *Stopped) MarshalTo(data []byte) (int, error)
- func (*Stopped) ProtoMessage()
- func (m *Stopped) Reset()
- func (m *Stopped) Size() (n int)
- func (m *Stopped) String() string
- func (m *Stopped) Unmarshal(data []byte) error
- type Stopping
- func (*Stopping) Descriptor() ([]byte, []int)
- func (m *Stopping) Marshal() (data []byte, err error)
- func (m *Stopping) MarshalTo(data []byte) (int, error)
- func (*Stopping) ProtoMessage()
- func (m *Stopping) Reset()
- func (m *Stopping) Size() (n int)
- func (m *Stopping) String() string
- func (m *Stopping) Unmarshal(data []byte) error
- type SupervisionStrategy
- type SystemMessage
- type UnboundedBatchingMailbox
- func (mailbox *UnboundedBatchingMailbox) PostSystemMessage(message SystemMessage)
- func (mailbox *UnboundedBatchingMailbox) PostUserMessage(message interface{})
- func (mailbox *UnboundedBatchingMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
- func (mailbox *UnboundedBatchingMailbox) Resume()
- func (mailbox *UnboundedBatchingMailbox) Suspend()
- type UnboundedMailbox
- func (mailbox *UnboundedMailbox) PostSystemMessage(message SystemMessage)
- func (mailbox *UnboundedMailbox) PostUserMessage(message interface{})
- func (mailbox *UnboundedMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
- func (mailbox *UnboundedMailbox) Resume()
- func (mailbox *UnboundedMailbox) Suspend()
Constants ¶
View Source
const ( MailboxIdle int32 = iota MailboxRunning int32 = iota )
View Source
const ( MailboxHasNoMessages int32 = iota MailboxHasMoreMessages int32 = iota )
Variables ¶
View Source
var ( ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProtos = fmt.Errorf("proto: integer overflow") )
View Source
var ProcessRegistry = &ProcessRegistryValue{ Host: "nonhost", LocalPids: make(map[string]ActorRef), RemoteHandlers: make([]HostResolver, 0), }
Functions ¶
func RequestResponsePID ¶
Types ¶
type ActorCell ¶
type ActorCell struct {
// contains filtered or unexported fields
}
func NewActorCell ¶
func (*ActorCell) BecomeStacked ¶
func (*ActorCell) UnbecomeStacked ¶
func (cell *ActorCell) UnbecomeStacked()
type ActorProducer ¶
type ActorProducer func() Actor
type ActorRef ¶
type ActorRef interface { Tell(message interface{}) SendSystemMessage(message SystemMessage) Stop() }
type BoundedBatchingMailbox ¶
type BoundedBatchingMailbox struct {
// contains filtered or unexported fields
}
func (*BoundedBatchingMailbox) PostSystemMessage ¶
func (mailbox *BoundedBatchingMailbox) PostSystemMessage(message SystemMessage)
func (*BoundedBatchingMailbox) PostUserMessage ¶
func (mailbox *BoundedBatchingMailbox) PostUserMessage(message interface{})
func (*BoundedBatchingMailbox) RegisterHandlers ¶
func (mailbox *BoundedBatchingMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
func (*BoundedBatchingMailbox) Resume ¶
func (mailbox *BoundedBatchingMailbox) Resume()
func (*BoundedBatchingMailbox) Suspend ¶
func (mailbox *BoundedBatchingMailbox) Suspend()
type BoundedMailbox ¶
type BoundedMailbox struct {
// contains filtered or unexported fields
}
func (*BoundedMailbox) PostSystemMessage ¶
func (mailbox *BoundedMailbox) PostSystemMessage(message SystemMessage)
func (*BoundedMailbox) PostUserMessage ¶
func (mailbox *BoundedMailbox) PostUserMessage(message interface{})
func (*BoundedMailbox) RegisterHandlers ¶
func (mailbox *BoundedMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
func (*BoundedMailbox) Resume ¶
func (mailbox *BoundedMailbox) Resume()
func (*BoundedMailbox) Suspend ¶
func (mailbox *BoundedMailbox) Suspend()
type Context ¶
type Context interface { Watch(*PID) Unwatch(*PID) Message() interface{} Become(Receive) BecomeStacked(Receive) UnbecomeStacked() Self() *PID Parent() *PID Spawn(Props) *PID SpawnNamed(Props, string) *PID Children() []*PID Stash() }
func NewContext ¶
type ContextValue ¶
type ContextValue struct { *ActorCell // contains filtered or unexported fields }
func (*ContextValue) Message ¶
func (context *ContextValue) Message() interface{}
func (*ContextValue) Stash ¶
func (context *ContextValue) Stash()
type DeadLetterActorRef ¶
type DeadLetterActorRef struct { }
func (DeadLetterActorRef) SendSystemMessage ¶
func (DeadLetterActorRef) SendSystemMessage(message SystemMessage)
func (DeadLetterActorRef) Stop ¶
func (DeadLetterActorRef) Stop()
func (DeadLetterActorRef) Tell ¶
func (DeadLetterActorRef) Tell(message interface{})
type EmptyActor ¶
type EmptyActor struct {
// contains filtered or unexported fields
}
func (*EmptyActor) Receive ¶
func (state *EmptyActor) Receive(context Context)
type GroupRouterConfig ¶
type GroupRouterConfig interface { RouterConfig GroupRouter() }
func NewRoundRobinGroup ¶
func NewRoundRobinGroup(routees ...*PID) GroupRouterConfig
type HostResolver ¶
type LocalActorRef ¶
type LocalActorRef struct {
// contains filtered or unexported fields
}
func NewLocalActorRef ¶
func NewLocalActorRef(mailbox Mailbox) *LocalActorRef
func (*LocalActorRef) Resume ¶
func (ref *LocalActorRef) Resume()
func (*LocalActorRef) SendSystemMessage ¶
func (ref *LocalActorRef) SendSystemMessage(message SystemMessage)
func (*LocalActorRef) Stop ¶
func (ref *LocalActorRef) Stop()
func (*LocalActorRef) Suspend ¶
func (ref *LocalActorRef) Suspend()
func (*LocalActorRef) Tell ¶
func (ref *LocalActorRef) Tell(message interface{})
type Mailbox ¶
type Mailbox interface { PostUserMessage(message interface{}) PostSystemMessage(message SystemMessage) Suspend() Resume() RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage)) }
type MailboxProducer ¶
type MailboxProducer func() Mailbox
func NewBoundedBatchingMailbox ¶
func NewBoundedBatchingMailbox(batchSize int, size int) MailboxProducer
func NewBoundedMailbox ¶
func NewBoundedMailbox(throughput int, size int) MailboxProducer
func NewUnboundedBatchingMailbox ¶
func NewUnboundedBatchingMailbox(batchSize int) MailboxProducer
func NewUnboundedMailbox ¶
func NewUnboundedMailbox(throughput int) MailboxProducer
type OneForOneStrategy ¶
type OneForOneStrategy struct {
// contains filtered or unexported fields
}
func (*OneForOneStrategy) Handle ¶
func (strategy *OneForOneStrategy) Handle(child *PID, reason interface{}) Directive
type PID ¶
type PID struct { Host string `protobuf:"bytes,1,opt,name=Host,json=host,proto3" json:"Host,omitempty"` Id string `protobuf:"bytes,2,opt,name=Id,json=id,proto3" json:"Id,omitempty"` }
func SpawnNamed ¶
func (*PID) Descriptor ¶
func (*PID) ProtoMessage ¶
func (*PID) ProtoMessage()
type PoisonPill ¶
type PoisonPill struct { }
func (*PoisonPill) Descriptor ¶
func (*PoisonPill) Descriptor() ([]byte, []int)
func (*PoisonPill) Marshal ¶
func (m *PoisonPill) Marshal() (data []byte, err error)
func (*PoisonPill) ProtoMessage ¶
func (*PoisonPill) ProtoMessage()
func (*PoisonPill) Reset ¶
func (m *PoisonPill) Reset()
func (*PoisonPill) Size ¶
func (m *PoisonPill) Size() (n int)
func (*PoisonPill) String ¶
func (m *PoisonPill) String() string
func (*PoisonPill) Unmarshal ¶
func (m *PoisonPill) Unmarshal(data []byte) error
type PoolRouterConfig ¶
type PoolRouterConfig interface { RouterConfig PoolRouter() }
func NewRoundRobinPool ¶
func NewRoundRobinPool(poolSize int) PoolRouterConfig
type ProcessRegistryValue ¶
type ProcessRegistryValue struct { Host string LocalPids map[string]ActorRef //maybe this should be replaced with something lockfree like ctrie instead RemoteHandlers []HostResolver SequenceID uint64 // contains filtered or unexported fields }
func (*ProcessRegistryValue) RegisterHostResolver ¶
func (pr *ProcessRegistryValue) RegisterHostResolver(handler HostResolver)
type Properties ¶
type Properties interface { ProduceActor() Actor ProduceMailbox() Mailbox Supervisor() SupervisionStrategy RouterConfig() RouterConfig }
type Props ¶
type Props struct {
// contains filtered or unexported fields
}
func FromGroupRouter ¶
func FromGroupRouter(router GroupRouterConfig) Props
func FromInstance ¶
func FromProducer ¶
func FromProducer(actorProducer ActorProducer) Props
func (Props) ProduceActor ¶
func (Props) ProduceMailbox ¶
func (Props) RouterConfig ¶
func (props Props) RouterConfig() RouterConfig
func (Props) Supervisor ¶
func (props Props) Supervisor() SupervisionStrategy
func (Props) WithMailbox ¶
func (props Props) WithMailbox(mailbox MailboxProducer) Props
func (Props) WithPoolRouter ¶
func (props Props) WithPoolRouter(routerConfig PoolRouterConfig) Props
func (Props) WithSupervisor ¶
func (props Props) WithSupervisor(supervisor SupervisionStrategy) Props
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) ResultChannel ¶
func (ref *Response) ResultChannel() <-chan interface{}
func (*Response) ResultOrTimeout ¶
func (*Response) SendSystemMessage ¶
func (ref *Response) SendSystemMessage(message SystemMessage)
type Restarting ¶
type Restarting struct { }
user messages
func (*Restarting) Descriptor ¶
func (*Restarting) Descriptor() ([]byte, []int)
func (*Restarting) Marshal ¶
func (m *Restarting) Marshal() (data []byte, err error)
func (*Restarting) ProtoMessage ¶
func (*Restarting) ProtoMessage()
func (*Restarting) Reset ¶
func (m *Restarting) Reset()
func (*Restarting) Size ¶
func (m *Restarting) Size() (n int)
func (*Restarting) String ¶
func (m *Restarting) String() string
func (*Restarting) Unmarshal ¶
func (m *Restarting) Unmarshal(data []byte) error
type RoundRobinGroupRouter ¶
type RoundRobinGroupRouter struct {
// contains filtered or unexported fields
}
func (*RoundRobinGroupRouter) Create ¶
func (config *RoundRobinGroupRouter) Create() RouterState
func (*RoundRobinGroupRouter) GroupRouter ¶
func (config *RoundRobinGroupRouter) GroupRouter()
func (*RoundRobinGroupRouter) OnStarted ¶
func (config *RoundRobinGroupRouter) OnStarted(context Context, props Props, router RouterState)
type RoundRobinPoolRouter ¶
type RoundRobinPoolRouter struct {
// contains filtered or unexported fields
}
func (*RoundRobinPoolRouter) Create ¶
func (config *RoundRobinPoolRouter) Create() RouterState
func (*RoundRobinPoolRouter) OnStarted ¶
func (config *RoundRobinPoolRouter) OnStarted(context Context, props Props, router RouterState)
func (*RoundRobinPoolRouter) PoolRouter ¶
func (config *RoundRobinPoolRouter) PoolRouter()
type RoundRobinState ¶
type RoundRobinState struct {
// contains filtered or unexported fields
}
func (*RoundRobinState) Route ¶
func (state *RoundRobinState) Route(message interface{})
func (*RoundRobinState) SetRoutees ¶
func (state *RoundRobinState) SetRoutees(routees []*PID)
type RouterActorRef ¶
type RouterActorRef struct { ActorRef // contains filtered or unexported fields }
func (*RouterActorRef) Tell ¶
func (ref *RouterActorRef) Tell(message interface{})
type RouterConfig ¶
type RouterConfig interface { OnStarted(context Context, props Props, router RouterState) Create() RouterState }
type RouterState ¶
type RouterState interface { Route(message interface{}) SetRoutees(routees []*PID) }
type Started ¶
type Started struct { }
func (*Started) Descriptor ¶
func (*Started) ProtoMessage ¶
func (*Started) ProtoMessage()
type Stopped ¶
type Stopped struct { }
func (*Stopped) Descriptor ¶
func (*Stopped) ProtoMessage ¶
func (*Stopped) ProtoMessage()
type Stopping ¶
type Stopping struct { }
func (*Stopping) Descriptor ¶
func (*Stopping) ProtoMessage ¶
func (*Stopping) ProtoMessage()
type SupervisionStrategy ¶
func DefaultSupervisionStrategy ¶
func DefaultSupervisionStrategy() SupervisionStrategy
func NewOneForOneStrategy ¶
func NewOneForOneStrategy(maxNrOfRetries int, withinTimeRangeMilliseconds int, decider Decider) SupervisionStrategy
type SystemMessage ¶
type SystemMessage interface {
// contains filtered or unexported methods
}
type UnboundedBatchingMailbox ¶
type UnboundedBatchingMailbox struct {
// contains filtered or unexported fields
}
func (*UnboundedBatchingMailbox) PostSystemMessage ¶
func (mailbox *UnboundedBatchingMailbox) PostSystemMessage(message SystemMessage)
func (*UnboundedBatchingMailbox) PostUserMessage ¶
func (mailbox *UnboundedBatchingMailbox) PostUserMessage(message interface{})
func (*UnboundedBatchingMailbox) RegisterHandlers ¶
func (mailbox *UnboundedBatchingMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
func (*UnboundedBatchingMailbox) Resume ¶
func (mailbox *UnboundedBatchingMailbox) Resume()
func (*UnboundedBatchingMailbox) Suspend ¶
func (mailbox *UnboundedBatchingMailbox) Suspend()
type UnboundedMailbox ¶
type UnboundedMailbox struct {
// contains filtered or unexported fields
}
func (*UnboundedMailbox) PostSystemMessage ¶
func (mailbox *UnboundedMailbox) PostSystemMessage(message SystemMessage)
func (*UnboundedMailbox) PostUserMessage ¶
func (mailbox *UnboundedMailbox) PostUserMessage(message interface{})
func (*UnboundedMailbox) RegisterHandlers ¶
func (mailbox *UnboundedMailbox) RegisterHandlers(userInvoke func(interface{}), systemInvoke func(SystemMessage))
func (*UnboundedMailbox) Resume ¶
func (mailbox *UnboundedMailbox) Resume()
func (*UnboundedMailbox) Suspend ¶
func (mailbox *UnboundedMailbox) Suspend()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.