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 Foo
Index ¶
- Variables
- func NewActorCell(props Props, parent *PID) *actorCell
- func RequestResponsePID() (*PID, *Response)
- type Actor
- type ActorProducer
- type ActorRef
- type Context
- type DeadLetterActorRef
- type Decider
- type Directive
- type Foo
- 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
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 ProcessRegistry = &ProcessRegistryValue{ Host: "nonhost", LocalPids: make(map[string]ActorRef), RemoteHandlers: make([]HostResolver, 0), }
Functions ¶
func NewActorCell ¶
func RequestResponsePID ¶
Types ¶
type ActorProducer ¶
type ActorProducer func() Actor
type ActorRef ¶
type ActorRef interface {
Tell(message interface{})
SendSystemMessage(message SystemMessage)
Stop()
}
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 Foo ¶
type Foo struct {
}
func (*Foo) Descriptor ¶
func (*Foo) ProtoMessage ¶
func (*Foo) ProtoMessage()
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 NewBoundedMailbox ¶
func NewBoundedMailbox(throughput int, size 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 NewLocalPID ¶
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) SendSystemMessage ¶
func (ref *RouterActorRef) SendSystemMessage(message SystemMessage)
func (*RouterActorRef) Stop ¶
func (ref *RouterActorRef) Stop()
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
}
Click to show internal directories.
Click to hide internal directories.