Versions in this module Expand all Collapse all v0 v0.9.1 Jan 22, 2019 Changes in this version + var ErrIntOverflowProtos = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthProtos = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrNameExists = errors.New("spawn: name exists") + var ErrTimeout = errors.New("future: timeout") + var ProcessRegistry = &ProcessRegistryValue + func SetLogLevel(level log.Level) + func SetOptions(opts ...optionFn) + func UnwrapEnvelope(message interface{}) (ReadonlyMessageHeader, interface{}, *PID) + func WithDeadLetterSubscriber(fn func(evt interface{})) optionFn + func WithSupervisorSubscriber(fn func(evt interface{})) optionFn + type Actor interface + Receive func(c Context) + type ActorFunc func(c Context) + func (f ActorFunc) Receive(c Context) + type AddressResolver func(*PID) (Process, bool) + type AutoReceiveMessage interface + AutoReceiveMessage func() + type Context interface + Actor func() Actor + AwaitFuture func(f *Future, continuation func(res interface{}, err error)) + Children func() []*PID + Message func() interface{} + MessageHeader func() ReadonlyMessageHeader + Parent func() *PID + PopBehavior func() + PushBehavior func(behavior ActorFunc) + ReceiveTimeout func() time.Duration + Request func(pid *PID, message interface{}) + RequestFuture func(pid *PID, message interface{}, timeout time.Duration) *Future + Respond func(response interface{}) + Self func() *PID + Sender func() *PID + SetBehavior func(behavior ActorFunc) + SetReceiveTimeout func(d time.Duration) + Spawn func(props *Props) *PID + SpawnNamed func(props *Props, id string) (*PID, error) + SpawnPrefix func(props *Props, prefix string) *PID + Stash func() + Tell func(pid *PID, message interface{}) + Unwatch func(pid *PID) + Watch func(pid *PID) + type DeadLetterEvent struct + Message interface{} + PID *PID + Sender *PID + type DeciderFunc func(reason interface{}) Directive + type Directive int + const EscalateDirective + const RestartDirective + const ResumeDirective + const StopDirective + func DefaultDecider(_ interface{}) Directive + func (i Directive) String() string + type Failure struct + Message interface{} + Reason interface{} + RestartStats *RestartStatistics + Who *PID + func (*Failure) SystemMessage() + type Future struct + func NewFuture(d time.Duration) *Future + func (f *Future) PID() *PID + func (f *Future) PipeTo(pids ...*PID) + func (f *Future) Result() (interface{}, error) + func (f *Future) Wait() error + type InboundMiddleware func(next ActorFunc) ActorFunc + type MessageEnvelope struct + Header messageHeader + Message interface{} + Sender *PID + func (me *MessageEnvelope) GetHeader(key string) string + func (me *MessageEnvelope) SetHeader(key string, value string) + type MessageProducer interface + Request func(pid *PID, message interface{}, respondTo *PID) + RequestFuture func(pid *PID, message interface{}, timeout time.Duration) *Future + Tell func(pid *PID, message interface{}) + var EmptyContext MessageProducer = &rootMessageProducer{} + type NotInfluenceReceiveTimeout interface + NotInfluenceReceiveTimeout func() + type OutboundMiddleware func(next SenderFunc) SenderFunc + type PID struct + Address string + Id string + func NewLocalPID(id string) *PID + func NewPID(address, id string) *PID + func Spawn(props *Props) *PID + func SpawnNamed(props *Props, name string) (*PID, error) + func SpawnPrefix(props *Props, prefix string) (*PID, error) + func (*PID) Descriptor() ([]byte, []int) + func (*PID) ProtoMessage() + func (m *PID) GetAddress() string + func (m *PID) GetId() string + func (m *PID) Marshal() (dAtA []byte, err error) + func (m *PID) MarshalTo(dAtA []byte) (int, error) + func (m *PID) Reset() + func (m *PID) Size() (n int) + func (m *PID) Unmarshal(dAtA []byte) error + func (pid *PID) GracefulStop() + func (pid *PID) Request(message interface{}, respondTo *PID) + func (pid *PID) RequestFuture(message interface{}, timeout time.Duration) *Future + func (pid *PID) Stop() + func (pid *PID) StopFuture() *Future + func (pid *PID) String() string + func (pid *PID) Tell(message interface{}) + func (this *PID) Equal(that interface{}) bool + type PIDSet struct + func NewPIDSet(pids ...*PID) *PIDSet + func (p *PIDSet) Add(v *PID) + func (p *PIDSet) Clear() + func (p *PIDSet) Contains(v *PID) bool + func (p *PIDSet) Empty() bool + func (p *PIDSet) ForEach(f func(i int, pid PID)) + func (p *PIDSet) Len() int + func (p *PIDSet) Remove(v *PID) bool + func (p *PIDSet) Values() []PID + type PoisonPill struct + func (*PoisonPill) AutoReceiveMessage() + func (*PoisonPill) Descriptor() ([]byte, []int) + func (*PoisonPill) ProtoMessage() + func (m *PoisonPill) Marshal() (dAtA []byte, err error) + func (m *PoisonPill) MarshalTo(dAtA []byte) (int, error) + func (m *PoisonPill) Reset() + func (m *PoisonPill) Size() (n int) + func (m *PoisonPill) Unmarshal(dAtA []byte) error + func (this *PoisonPill) Equal(that interface{}) bool + func (this *PoisonPill) String() string + type Process interface + SendSystemMessage func(pid *PID, message interface{}) + SendUserMessage func(pid *PID, message interface{}) + Stop func(pid *PID) + type ProcessRegistryValue struct + Address string + LocalPIDs cmap.ConcurrentMap + RemoteHandlers []AddressResolver + SequenceID uint64 + 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 func() Actor + type Props struct + func FromFunc(f ActorFunc) *Props + func FromInstance(template Actor) *Props + func FromProducer(actorProducer Producer) *Props + func FromSpawnFunc(spawn SpawnFunc) *Props + func (props *Props) WithDispatcher(dispatcher mailbox.Dispatcher) *Props + func (props *Props) WithFunc(f ActorFunc) *Props + func (props *Props) WithGuardian(guardian SupervisorStrategy) *Props + func (props *Props) WithInstance(a Actor) *Props + func (props *Props) WithMailbox(mailbox mailbox.Producer) *Props + func (props *Props) WithMiddleware(middleware ...InboundMiddleware) *Props + func (props *Props) WithOutboundMiddleware(middleware ...OutboundMiddleware) *Props + func (props *Props) WithProducer(p Producer) *Props + func (props *Props) WithSpawnFunc(spawn SpawnFunc) *Props + func (props *Props) WithSupervisor(supervisor SupervisorStrategy) *Props + type ReadonlyMessageHeader interface + Get func(key string) string + Keys func() []string + Length func() int + ToMap func() map[string]string + type ReceiveTimeout struct + type Restart struct + func (*Restart) SystemMessage() + type RestartStatistics struct + func NewRestartStatistics() *RestartStatistics + func (rs *RestartStatistics) Fail() + func (rs *RestartStatistics) FailureCount() int + func (rs *RestartStatistics) NumberOfFailures(withinDuration time.Duration) int + func (rs *RestartStatistics) Reset() + type Restarting struct + func (*Restarting) AutoReceiveMessage() + type SenderFunc func(c Context, target *PID, envelope *MessageEnvelope) + type SpawnFunc func(id string, props *Props, parent *PID) (*PID, error) + var DefaultSpawner SpawnFunc = spawn + type Started struct + func (*Started) SystemMessage() + type Stop struct + func (*Stop) Descriptor() ([]byte, []int) + func (*Stop) ProtoMessage() + func (*Stop) SystemMessage() + func (m *Stop) Marshal() (dAtA []byte, err error) + func (m *Stop) MarshalTo(dAtA []byte) (int, error) + func (m *Stop) Reset() + func (m *Stop) Size() (n int) + func (m *Stop) Unmarshal(dAtA []byte) error + func (this *Stop) Equal(that interface{}) bool + func (this *Stop) String() string + type Stopped struct + func (*Stopped) AutoReceiveMessage() + type Stopping struct + func (*Stopping) AutoReceiveMessage() + type Supervisor interface + Children func() []*PID + EscalateFailure func(reason interface{}, message interface{}) + RestartChildren func(pids ...*PID) + ResumeChildren func(pids ...*PID) + StopChildren func(pids ...*PID) + type SupervisorEvent struct + Child *PID + Directive Directive + Reason interface{} + type SupervisorStrategy interface + HandleFailure func(supervisor Supervisor, child *PID, rs *RestartStatistics, reason interface{}, ...) + func DefaultSupervisorStrategy() SupervisorStrategy + func NewAllForOneStrategy(maxNrOfRetries int, withinDuration time.Duration, decider DeciderFunc) SupervisorStrategy + func NewExponentialBackoffStrategy(backoffWindow time.Duration, initialBackoff time.Duration) SupervisorStrategy + func NewOneForOneStrategy(maxNrOfRetries int, withinDuration time.Duration, decider DeciderFunc) SupervisorStrategy + func NewRestartingStrategy() SupervisorStrategy + func RestartingSupervisorStrategy() SupervisorStrategy + type SystemMessage interface + SystemMessage func() + type Terminated struct + AddressTerminated bool + Who *PID + func (*Terminated) Descriptor() ([]byte, []int) + func (*Terminated) ProtoMessage() + func (*Terminated) SystemMessage() + func (m *Terminated) GetAddressTerminated() bool + func (m *Terminated) GetWho() *PID + func (m *Terminated) Marshal() (dAtA []byte, err error) + func (m *Terminated) MarshalTo(dAtA []byte) (int, error) + func (m *Terminated) Reset() + func (m *Terminated) Size() (n int) + func (m *Terminated) Unmarshal(dAtA []byte) error + func (this *Terminated) Equal(that interface{}) bool + func (this *Terminated) String() string + type Unwatch struct + Watcher *PID + func (*Unwatch) Descriptor() ([]byte, []int) + func (*Unwatch) ProtoMessage() + func (*Unwatch) SystemMessage() + func (m *Unwatch) GetWatcher() *PID + func (m *Unwatch) Marshal() (dAtA []byte, err error) + func (m *Unwatch) MarshalTo(dAtA []byte) (int, error) + func (m *Unwatch) Reset() + func (m *Unwatch) Size() (n int) + func (m *Unwatch) Unmarshal(dAtA []byte) error + func (this *Unwatch) Equal(that interface{}) bool + func (this *Unwatch) String() string + type Watch struct + Watcher *PID + func (*Watch) Descriptor() ([]byte, []int) + func (*Watch) ProtoMessage() + func (*Watch) SystemMessage() + func (m *Watch) GetWatcher() *PID + func (m *Watch) Marshal() (dAtA []byte, err error) + func (m *Watch) MarshalTo(dAtA []byte) (int, error) + func (m *Watch) Reset() + func (m *Watch) Size() (n int) + func (m *Watch) Unmarshal(dAtA []byte) error + func (this *Watch) Equal(that interface{}) bool + func (this *Watch) String() string