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 PoisonPill RouterAddRoutee RouterRemoveRoutee RouterAdjustPoolSize RouterGetRoutees RouterRoutees Watch Unwatch Terminated
Index ¶
- Variables
- func AutoReceive(context Context)
- func MessageLogging(context Context)
- type Action
- type Actor
- type AddressResolver
- type AutoReceiveMessage
- type Context
- type DeadLetter
- type Decider
- type DefaultMailbox
- type Directive
- type Dispatcher
- type Failure
- type Future
- type Mailbox
- type MailboxProducer
- type MailboxQueue
- type MailboxRunner
- type MailboxStatistics
- type MessageInvoker
- type NotInfluenceReceiveTimeout
- type OneForOneStrategy
- type PID
- func (*PID) Descriptor() ([]byte, []int)
- func (pid *PID) Empty() bool
- func (this *PID) Equal(that interface{}) bool
- func (this *PID) GoString() string
- func (m *PID) Marshal() (dAtA []byte, err error)
- func (m *PID) MarshalTo(dAtA []byte) (int, error)
- func (*PID) ProtoMessage()
- func (pid *PID) Request(message interface{}, respondTo *PID)
- func (pid *PID) RequestFuture(message interface{}, timeout time.Duration) *Future
- func (m *PID) Reset()
- func (m *PID) Size() (n int)
- func (pid *PID) Stop()
- func (pid *PID) StopFuture() *Future
- func (pid *PID) String() string
- func (pid *PID) Tell(message interface{})
- func (m *PID) Unmarshal(dAtA []byte) error
- type PIDSet
- type PoisonPill
- func (*PoisonPill) AutoReceiveMessage()
- func (*PoisonPill) Descriptor() ([]byte, []int)
- func (this *PoisonPill) Equal(that interface{}) bool
- func (this *PoisonPill) GoString() string
- 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 (this *PoisonPill) String() string
- func (m *PoisonPill) Unmarshal(dAtA []byte) error
- type Predicate
- type Process
- type ProcessRegistryValue
- func (pr *ProcessRegistryValue) Add(process Process, id string) (*PID, bool)
- func (pr *ProcessRegistryValue) Get(pid *PID) (Process, bool)
- func (pr *ProcessRegistryValue) GetLocal(id string) (Process, bool)
- func (pr *ProcessRegistryValue) NextId() string
- func (pr *ProcessRegistryValue) RegisterAddressResolver(handler AddressResolver)
- func (pr *ProcessRegistryValue) Remove(pid *PID)
- type Producer
- type Props
- func (props Props) Dispatcher() Dispatcher
- func (props Props) ProduceActor() Actor
- func (props Props) ProduceMailbox() Mailbox
- func (props Props) Supervisor() SupervisorStrategy
- func (props Props) WithDispatcher(dispatcher Dispatcher) Props
- func (props Props) WithFunc(receive Receive) Props
- func (props Props) WithInstance(a Actor) Props
- func (props Props) WithMailbox(mailbox MailboxProducer) Props
- func (props Props) WithProducer(p Producer) Props
- func (props Props) WithReceivers(plugin ...Receive) Props
- func (props Props) WithSpawn(spawn Spawner) Props
- func (props Props) WithSupervisor(supervisor SupervisorStrategy) Props
- type Receive
- type ReceiveSystemMessage
- type ReceiveTimeout
- type ReceiveUserMessage
- type Restart
- type Restarting
- type ResumeMailbox
- type RouterAddRoutee
- func (*RouterAddRoutee) Descriptor() ([]byte, []int)
- func (this *RouterAddRoutee) Equal(that interface{}) bool
- func (m *RouterAddRoutee) GetPID() *PID
- func (this *RouterAddRoutee) GoString() string
- func (m *RouterAddRoutee) Marshal() (dAtA []byte, err error)
- func (m *RouterAddRoutee) MarshalTo(dAtA []byte) (int, error)
- func (*RouterAddRoutee) ProtoMessage()
- func (m *RouterAddRoutee) Reset()
- func (m *RouterAddRoutee) Size() (n int)
- func (this *RouterAddRoutee) String() string
- func (m *RouterAddRoutee) Unmarshal(dAtA []byte) error
- type RouterAdjustPoolSize
- func (*RouterAdjustPoolSize) Descriptor() ([]byte, []int)
- func (this *RouterAdjustPoolSize) Equal(that interface{}) bool
- func (this *RouterAdjustPoolSize) GoString() string
- func (m *RouterAdjustPoolSize) Marshal() (dAtA []byte, err error)
- func (m *RouterAdjustPoolSize) MarshalTo(dAtA []byte) (int, error)
- func (*RouterAdjustPoolSize) ProtoMessage()
- func (m *RouterAdjustPoolSize) Reset()
- func (m *RouterAdjustPoolSize) Size() (n int)
- func (this *RouterAdjustPoolSize) String() string
- func (m *RouterAdjustPoolSize) Unmarshal(dAtA []byte) error
- type RouterGetRoutees
- func (*RouterGetRoutees) Descriptor() ([]byte, []int)
- func (this *RouterGetRoutees) Equal(that interface{}) bool
- func (this *RouterGetRoutees) GoString() string
- func (m *RouterGetRoutees) Marshal() (dAtA []byte, err error)
- func (m *RouterGetRoutees) MarshalTo(dAtA []byte) (int, error)
- func (*RouterGetRoutees) ProtoMessage()
- func (m *RouterGetRoutees) Reset()
- func (m *RouterGetRoutees) Size() (n int)
- func (this *RouterGetRoutees) String() string
- func (m *RouterGetRoutees) Unmarshal(dAtA []byte) error
- type RouterRemoveRoutee
- func (*RouterRemoveRoutee) Descriptor() ([]byte, []int)
- func (this *RouterRemoveRoutee) Equal(that interface{}) bool
- func (m *RouterRemoveRoutee) GetPID() *PID
- func (this *RouterRemoveRoutee) GoString() string
- func (m *RouterRemoveRoutee) Marshal() (dAtA []byte, err error)
- func (m *RouterRemoveRoutee) MarshalTo(dAtA []byte) (int, error)
- func (*RouterRemoveRoutee) ProtoMessage()
- func (m *RouterRemoveRoutee) Reset()
- func (m *RouterRemoveRoutee) Size() (n int)
- func (this *RouterRemoveRoutee) String() string
- func (m *RouterRemoveRoutee) Unmarshal(dAtA []byte) error
- type RouterRoutees
- func (*RouterRoutees) Descriptor() ([]byte, []int)
- func (this *RouterRoutees) Equal(that interface{}) bool
- func (m *RouterRoutees) GetPIDs() []*PID
- func (this *RouterRoutees) GoString() string
- func (m *RouterRoutees) Marshal() (dAtA []byte, err error)
- func (m *RouterRoutees) MarshalTo(dAtA []byte) (int, error)
- func (*RouterRoutees) ProtoMessage()
- func (m *RouterRoutees) Reset()
- func (m *RouterRoutees) Size() (n int)
- func (this *RouterRoutees) String() string
- func (m *RouterRoutees) Unmarshal(dAtA []byte) error
- type Spawner
- type Started
- type Stop
- type Stopped
- type Stopping
- type Subscription
- type Supervisor
- type SupervisorStrategy
- type SuspendMailbox
- type SystemMessage
- type Terminated
- func (*Terminated) Descriptor() ([]byte, []int)
- func (this *Terminated) Equal(that interface{}) bool
- func (m *Terminated) GetWho() *PID
- func (this *Terminated) GoString() string
- func (m *Terminated) Marshal() (dAtA []byte, err error)
- func (m *Terminated) MarshalTo(dAtA []byte) (int, error)
- func (*Terminated) ProtoMessage()
- func (m *Terminated) Reset()
- func (m *Terminated) Size() (n int)
- func (this *Terminated) String() string
- func (*Terminated) SystemMessage()
- func (m *Terminated) Unmarshal(dAtA []byte) error
- type Unwatch
- func (*Unwatch) Descriptor() ([]byte, []int)
- func (this *Unwatch) Equal(that interface{}) bool
- func (m *Unwatch) GetWatcher() *PID
- func (this *Unwatch) GoString() string
- func (m *Unwatch) Marshal() (dAtA []byte, err error)
- func (m *Unwatch) MarshalTo(dAtA []byte) (int, error)
- func (*Unwatch) ProtoMessage()
- func (m *Unwatch) Reset()
- func (m *Unwatch) Size() (n int)
- func (this *Unwatch) String() string
- func (*Unwatch) SystemMessage()
- func (m *Unwatch) Unmarshal(dAtA []byte) error
- type Watch
- func (*Watch) Descriptor() ([]byte, []int)
- func (this *Watch) Equal(that interface{}) bool
- func (m *Watch) GetWatcher() *PID
- func (this *Watch) GoString() string
- func (m *Watch) Marshal() (dAtA []byte, err error)
- func (m *Watch) MarshalTo(dAtA []byte) (int, error)
- func (*Watch) ProtoMessage()
- func (m *Watch) Reset()
- func (m *Watch) Size() (n int)
- func (this *Watch) String() string
- func (*Watch) SystemMessage()
- func (m *Watch) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProtos = fmt.Errorf("proto: integer overflow") )
var (
ErrTimeout = errors.New("timeout")
)
var (
EventStream = &eventStream{}
)
var ( ProcessRegistry = &ProcessRegistryValue{ Address: localAddress, LocalPIDs: cmap.New(), } )
Functions ¶
func AutoReceive ¶
func AutoReceive(context Context)
func MessageLogging ¶
func MessageLogging(context Context)
Types ¶
type Actor ¶
type Actor interface {
Receive(Context)
}
Actor is the interface for actors, it defines the Receive method
type AddressResolver ¶
type AutoReceiveMessage ¶
type AutoReceiveMessage interface {
AutoReceiveMessage()
}
type Context ¶
type Context interface { // Watch registers the actor as a monitor for the specified PID Watch(*PID) // Unwatch unregisters the actor as a monitor for the specified PID Unwatch(*PID) // Message returns the current message to be processed Message() interface{} // SetReceiveTimeout sets the inactivity timeout, after which a ReceiveTimeout message will be sent to the actor. // A duration of less than 1ms will disable the inactivity timer. SetReceiveTimeout(d time.Duration) // ReceiveTimeout returns the current timeout ReceiveTimeout() time.Duration // Sender returns the PID of actor that sent currently processed message Sender() *PID // Become replaces the actors current Receive handler with a new handler Become(Receive) // BecomeStacked pushes a new Receive handler on the current handler stack BecomeStacked(Receive) // UnbecomeStacked reverts to the previous Receive handler UnbecomeStacked() // Self returns the PID for the current actor Self() *PID // Parent returns the PID for the current actors parent Parent() *PID // Spawn spawns a child actor using the given Props Spawn(Props) *PID // SpawnNamed spawns a named child actor using the given Props SpawnNamed(Props, string) *PID // Returns a slice of the current actors children Children() []*PID // Next performs the next middleware or base Receive handler Next() // Receive processes a custom user message synchronously Receive(interface{}) // Stash stashes the current message on a stack for reprocessing when the actor restarts Stash() // Respond sends a response to the to the current `Sender` Respond(response interface{}) // Actor returns the actor associated with this context Actor() Actor }
type DeadLetter ¶
type DefaultMailbox ¶
type DefaultMailbox struct {
// contains filtered or unexported fields
}
func (*DefaultMailbox) ConsumeSystemMessages ¶
func (m *DefaultMailbox) ConsumeSystemMessages() bool
func (*DefaultMailbox) PostSystemMessage ¶
func (m *DefaultMailbox) PostSystemMessage(message SystemMessage)
func (*DefaultMailbox) PostUserMessage ¶
func (m *DefaultMailbox) PostUserMessage(message interface{})
func (*DefaultMailbox) RegisterHandlers ¶
func (m *DefaultMailbox) RegisterHandlers(invoker MessageInvoker, dispatcher Dispatcher)
type Dispatcher ¶
type Dispatcher interface { Schedule(runner MailboxRunner) Throughput() int }
func NewDefaultDispatcher ¶
func NewDefaultDispatcher(throughput int) Dispatcher
type Failure ¶
type Failure struct { Who *PID Reason interface{} }
func (*Failure) SystemMessage ¶
func (*Failure) SystemMessage()
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
func (*Future) ContinueWith ¶
type Mailbox ¶
type Mailbox interface { PostUserMessage(message interface{}) PostSystemMessage(message SystemMessage) RegisterHandlers(invoker MessageInvoker, dispatcher Dispatcher) }
type MailboxProducer ¶
type MailboxProducer func() Mailbox
func NewBoundedMailbox ¶
func NewBoundedMailbox(size int, mailboxStats ...MailboxStatistics) MailboxProducer
NewBoundedMailbox creates an unbounded mailbox
func NewUnboundedLockfreeMailbox ¶
func NewUnboundedLockfreeMailbox(mailboxStats ...MailboxStatistics) MailboxProducer
NewUnboundedLockfreeMailbox creates an unbounded, lock-free mailbox
func NewUnboundedMailbox ¶
func NewUnboundedMailbox(mailboxStats ...MailboxStatistics) MailboxProducer
NewUnboundedMailbox creates an unbounded mailbox
type MailboxQueue ¶
type MailboxQueue interface { Push(interface{}) Pop() interface{} }
type MailboxRunner ¶
type MailboxRunner func()
type MailboxStatistics ¶
type MailboxStatistics interface { MailboxStarted() MessagePosted(message interface{}) MessageReceived(message interface{}) MailboxEmpty() }
type MessageInvoker ¶
type MessageInvoker interface { InvokeSystemMessage(SystemMessage) InvokeUserMessage(interface{}) }
type NotInfluenceReceiveTimeout ¶
type NotInfluenceReceiveTimeout interface {
NotInfluenceReceiveTimeout()
}
type OneForOneStrategy ¶
type OneForOneStrategy struct {
// contains filtered or unexported fields
}
func (*OneForOneStrategy) HandleFailure ¶
func (strategy *OneForOneStrategy) HandleFailure(supervisor Supervisor, child *PID, reason interface{})
type PID ¶
type PID struct { Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` Id string `protobuf:"bytes,2,opt,name=Id,proto3" json:"Id,omitempty"` }
func NewLocalPID ¶
NewLocalPID returns a new instance of the PID struct with the address preset
func (*PID) Descriptor ¶
func (*PID) ProtoMessage ¶
func (*PID) ProtoMessage()
func (*PID) RequestFuture ¶
RequestFuture sends a message to a given PID and returns a Future
func (*PID) StopFuture ¶
type PoisonPill ¶
type PoisonPill struct { }
user messages
func (*PoisonPill) AutoReceiveMessage ¶
func (*PoisonPill) AutoReceiveMessage()
func (*PoisonPill) Descriptor ¶
func (*PoisonPill) Descriptor() ([]byte, []int)
func (*PoisonPill) Equal ¶
func (this *PoisonPill) Equal(that interface{}) bool
func (*PoisonPill) GoString ¶
func (this *PoisonPill) GoString() string
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 (this *PoisonPill) String() string
func (*PoisonPill) Unmarshal ¶
func (m *PoisonPill) Unmarshal(dAtA []byte) error
type Process ¶
type Process interface { SendUserMessage(pid *PID, message interface{}, sender *PID) SendSystemMessage(pid *PID, message SystemMessage) }
Process is an interface that defines the base contract for interaction of actors
type ProcessRegistryValue ¶
type ProcessRegistryValue struct { Address string LocalPIDs cmap.ConcurrentMap RemoteHandlers []AddressResolver SequenceID uint64 }
func (*ProcessRegistryValue) Add ¶
func (pr *ProcessRegistryValue) Add(process Process, id string) (*PID, bool)
func (*ProcessRegistryValue) GetLocal ¶
func (pr *ProcessRegistryValue) GetLocal(id string) (Process, bool)
func (*ProcessRegistryValue) NextId ¶
func (pr *ProcessRegistryValue) NextId() string
func (*ProcessRegistryValue) RegisterAddressResolver ¶
func (pr *ProcessRegistryValue) RegisterAddressResolver(handler AddressResolver)
func (*ProcessRegistryValue) Remove ¶
func (pr *ProcessRegistryValue) Remove(pid *PID)
type Props ¶
type Props struct {
// contains filtered or unexported fields
}
Props or properties of an actor, it defines how the actor should be created
func FromInstance ¶
func FromProducer ¶
func (Props) Dispatcher ¶
func (props Props) Dispatcher() Dispatcher
func (Props) ProduceActor ¶
func (Props) ProduceMailbox ¶
func (Props) Supervisor ¶
func (props Props) Supervisor() SupervisorStrategy
func (Props) WithDispatcher ¶
func (props Props) WithDispatcher(dispatcher Dispatcher) Props
func (Props) WithInstance ¶
func (Props) WithMailbox ¶
func (props Props) WithMailbox(mailbox MailboxProducer) Props
func (Props) WithProducer ¶
func (Props) WithReceivers ¶
func (Props) WithSupervisor ¶
func (props Props) WithSupervisor(supervisor SupervisorStrategy) Props
type ReceiveSystemMessage ¶
type ReceiveSystemMessage func(SystemMessage)
type ReceiveTimeout ¶
type ReceiveTimeout struct{}
type ReceiveUserMessage ¶
type ReceiveUserMessage func(interface{})
type Restart ¶
type Restart struct{}
TODO: add cause and action?
func (*Restart) SystemMessage ¶
func (*Restart) SystemMessage()
type Restarting ¶
type Restarting struct{}
func (*Restarting) AutoReceiveMessage ¶
func (*Restarting) AutoReceiveMessage()
type ResumeMailbox ¶
type ResumeMailbox struct{}
func (*ResumeMailbox) SystemMessage ¶
func (*ResumeMailbox) SystemMessage()
type RouterAddRoutee ¶
type RouterAddRoutee struct {
PID *PID `protobuf:"bytes,1,opt,name=PID" json:"PID,omitempty"`
}
router management messages
func (*RouterAddRoutee) Descriptor ¶
func (*RouterAddRoutee) Descriptor() ([]byte, []int)
func (*RouterAddRoutee) Equal ¶
func (this *RouterAddRoutee) Equal(that interface{}) bool
func (*RouterAddRoutee) GetPID ¶
func (m *RouterAddRoutee) GetPID() *PID
func (*RouterAddRoutee) GoString ¶
func (this *RouterAddRoutee) GoString() string
func (*RouterAddRoutee) Marshal ¶
func (m *RouterAddRoutee) Marshal() (dAtA []byte, err error)
func (*RouterAddRoutee) ProtoMessage ¶
func (*RouterAddRoutee) ProtoMessage()
func (*RouterAddRoutee) Reset ¶
func (m *RouterAddRoutee) Reset()
func (*RouterAddRoutee) Size ¶
func (m *RouterAddRoutee) Size() (n int)
func (*RouterAddRoutee) String ¶
func (this *RouterAddRoutee) String() string
func (*RouterAddRoutee) Unmarshal ¶
func (m *RouterAddRoutee) Unmarshal(dAtA []byte) error
type RouterAdjustPoolSize ¶
type RouterAdjustPoolSize struct {
Change int32 `protobuf:"varint,1,opt,name=change,proto3" json:"change,omitempty"`
}
func (*RouterAdjustPoolSize) Descriptor ¶
func (*RouterAdjustPoolSize) Descriptor() ([]byte, []int)
func (*RouterAdjustPoolSize) Equal ¶
func (this *RouterAdjustPoolSize) Equal(that interface{}) bool
func (*RouterAdjustPoolSize) GoString ¶
func (this *RouterAdjustPoolSize) GoString() string
func (*RouterAdjustPoolSize) Marshal ¶
func (m *RouterAdjustPoolSize) Marshal() (dAtA []byte, err error)
func (*RouterAdjustPoolSize) MarshalTo ¶
func (m *RouterAdjustPoolSize) MarshalTo(dAtA []byte) (int, error)
func (*RouterAdjustPoolSize) ProtoMessage ¶
func (*RouterAdjustPoolSize) ProtoMessage()
func (*RouterAdjustPoolSize) Reset ¶
func (m *RouterAdjustPoolSize) Reset()
func (*RouterAdjustPoolSize) Size ¶
func (m *RouterAdjustPoolSize) Size() (n int)
func (*RouterAdjustPoolSize) String ¶
func (this *RouterAdjustPoolSize) String() string
func (*RouterAdjustPoolSize) Unmarshal ¶
func (m *RouterAdjustPoolSize) Unmarshal(dAtA []byte) error
type RouterGetRoutees ¶
type RouterGetRoutees struct { }
func (*RouterGetRoutees) Descriptor ¶
func (*RouterGetRoutees) Descriptor() ([]byte, []int)
func (*RouterGetRoutees) Equal ¶
func (this *RouterGetRoutees) Equal(that interface{}) bool
func (*RouterGetRoutees) GoString ¶
func (this *RouterGetRoutees) GoString() string
func (*RouterGetRoutees) Marshal ¶
func (m *RouterGetRoutees) Marshal() (dAtA []byte, err error)
func (*RouterGetRoutees) ProtoMessage ¶
func (*RouterGetRoutees) ProtoMessage()
func (*RouterGetRoutees) Reset ¶
func (m *RouterGetRoutees) Reset()
func (*RouterGetRoutees) Size ¶
func (m *RouterGetRoutees) Size() (n int)
func (*RouterGetRoutees) String ¶
func (this *RouterGetRoutees) String() string
func (*RouterGetRoutees) Unmarshal ¶
func (m *RouterGetRoutees) Unmarshal(dAtA []byte) error
type RouterRemoveRoutee ¶
type RouterRemoveRoutee struct {
PID *PID `protobuf:"bytes,1,opt,name=PID" json:"PID,omitempty"`
}
func (*RouterRemoveRoutee) Descriptor ¶
func (*RouterRemoveRoutee) Descriptor() ([]byte, []int)
func (*RouterRemoveRoutee) Equal ¶
func (this *RouterRemoveRoutee) Equal(that interface{}) bool
func (*RouterRemoveRoutee) GetPID ¶
func (m *RouterRemoveRoutee) GetPID() *PID
func (*RouterRemoveRoutee) GoString ¶
func (this *RouterRemoveRoutee) GoString() string
func (*RouterRemoveRoutee) Marshal ¶
func (m *RouterRemoveRoutee) Marshal() (dAtA []byte, err error)
func (*RouterRemoveRoutee) MarshalTo ¶
func (m *RouterRemoveRoutee) MarshalTo(dAtA []byte) (int, error)
func (*RouterRemoveRoutee) ProtoMessage ¶
func (*RouterRemoveRoutee) ProtoMessage()
func (*RouterRemoveRoutee) Reset ¶
func (m *RouterRemoveRoutee) Reset()
func (*RouterRemoveRoutee) Size ¶
func (m *RouterRemoveRoutee) Size() (n int)
func (*RouterRemoveRoutee) String ¶
func (this *RouterRemoveRoutee) String() string
func (*RouterRemoveRoutee) Unmarshal ¶
func (m *RouterRemoveRoutee) Unmarshal(dAtA []byte) error
type RouterRoutees ¶
type RouterRoutees struct {
PIDs []*PID `protobuf:"bytes,1,rep,name=PIDs" json:"PIDs,omitempty"`
}
func (*RouterRoutees) Descriptor ¶
func (*RouterRoutees) Descriptor() ([]byte, []int)
func (*RouterRoutees) Equal ¶
func (this *RouterRoutees) Equal(that interface{}) bool
func (*RouterRoutees) GetPIDs ¶
func (m *RouterRoutees) GetPIDs() []*PID
func (*RouterRoutees) GoString ¶
func (this *RouterRoutees) GoString() string
func (*RouterRoutees) Marshal ¶
func (m *RouterRoutees) Marshal() (dAtA []byte, err error)
func (*RouterRoutees) ProtoMessage ¶
func (*RouterRoutees) ProtoMessage()
func (*RouterRoutees) Reset ¶
func (m *RouterRoutees) Reset()
func (*RouterRoutees) Size ¶
func (m *RouterRoutees) Size() (n int)
func (*RouterRoutees) String ¶
func (this *RouterRoutees) String() string
func (*RouterRoutees) Unmarshal ¶
func (m *RouterRoutees) Unmarshal(dAtA []byte) error
type Started ¶
type Started struct{}
func (*Started) AutoReceiveMessage ¶
func (*Started) AutoReceiveMessage()
type Stop ¶
type Stop struct{}
TODO: add cause and action?
func (*Stop) SystemMessage ¶
func (*Stop) SystemMessage()
type Stopped ¶
type Stopped struct{}
func (*Stopped) AutoReceiveMessage ¶
func (*Stopped) AutoReceiveMessage()
type Stopping ¶
type Stopping struct{}
func (*Stopping) AutoReceiveMessage ¶
func (*Stopping) AutoReceiveMessage()
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
type Supervisor ¶
type SupervisorStrategy ¶
type SupervisorStrategy interface {
HandleFailure(supervisor Supervisor, child *PID, cause interface{})
}
TODO: as we dont allow remote children or remote SupervisionStrategy Instead of letting the parent keep track of child restart stats. this info could actually go into each actor, sending it back to the parent as part of the Failure message
func DefaultSupervisionStrategy ¶
func DefaultSupervisionStrategy() SupervisorStrategy
func NewOneForOneStrategy ¶
func NewOneForOneStrategy(maxNrOfRetries int, withinTimeRangeMilliseconds int, decider Decider) SupervisorStrategy
type SuspendMailbox ¶
type SuspendMailbox struct{}
func (*SuspendMailbox) SystemMessage ¶
func (*SuspendMailbox) SystemMessage()
type SystemMessage ¶
type SystemMessage interface {
SystemMessage()
}
SystemMessage is a special type of messages passed to control the actor lifecycles
type Terminated ¶
type Terminated struct { Who *PID `protobuf:"bytes,1,opt,name=who" json:"who,omitempty"` AddressTerminated bool `protobuf:"varint,2,opt,name=AddressTerminated,proto3" json:"AddressTerminated,omitempty"` }
func (*Terminated) Descriptor ¶
func (*Terminated) Descriptor() ([]byte, []int)
func (*Terminated) Equal ¶
func (this *Terminated) Equal(that interface{}) bool
func (*Terminated) GetWho ¶
func (m *Terminated) GetWho() *PID
func (*Terminated) GoString ¶
func (this *Terminated) GoString() string
func (*Terminated) Marshal ¶
func (m *Terminated) Marshal() (dAtA []byte, err error)
func (*Terminated) ProtoMessage ¶
func (*Terminated) ProtoMessage()
func (*Terminated) Reset ¶
func (m *Terminated) Reset()
func (*Terminated) Size ¶
func (m *Terminated) Size() (n int)
func (*Terminated) String ¶
func (this *Terminated) String() string
func (*Terminated) SystemMessage ¶
func (*Terminated) SystemMessage()
func (*Terminated) Unmarshal ¶
func (m *Terminated) Unmarshal(dAtA []byte) error
type Unwatch ¶
type Unwatch struct {
Watcher *PID `protobuf:"bytes,1,opt,name=watcher" json:"watcher,omitempty"`
}
func (*Unwatch) Descriptor ¶
func (*Unwatch) GetWatcher ¶
func (*Unwatch) ProtoMessage ¶
func (*Unwatch) ProtoMessage()
func (*Unwatch) SystemMessage ¶
func (*Unwatch) SystemMessage()
type Watch ¶
type Watch struct {
Watcher *PID `protobuf:"bytes,1,opt,name=watcher" json:"watcher,omitempty"`
}
system messages
func (*Watch) Descriptor ¶
func (*Watch) GetWatcher ¶
func (*Watch) ProtoMessage ¶
func (*Watch) ProtoMessage()
func (*Watch) SystemMessage ¶
func (*Watch) SystemMessage()
Source Files ¶
- actor.go
- behaviorstack.go
- bounded_mailbox.go
- context.go
- deadletter.go
- dispatcher.go
- event_stream.go
- futures.go
- local_process.go
- mailbox.go
- mailbox_queue.go
- messages.go
- pid.go
- pidset.go
- process.go
- process_registry.go
- props.go
- protos.pb.go
- receivers.go
- spawn.go
- supervision.go
- unbounded_lock_free_mailbox.go
- unbounded_mailbox.go