Versions in this module Expand all Collapse all v0 v0.0.1 Oct 25, 2020 Changes in this version + const PH + var EmptyMessageHeader = make(messageHeader) + var EmptyRootContext = &RootContext + 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 Put_PID(i interface{}) + func SetLogLevel(level log.Level) + func SetOptions(opts ...optionFn) + func UnwrapEnvelope(message interface{}) (ReadonlyMessageHeader, interface{}, *PID) + func UnwrapEnvelopeMessage(message interface{}) interface + 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 ActorProcess struct + func NewActorProcess(mailbox mailbox.Mailbox) *ActorProcess + func (ref *ActorProcess) SendSystemMessage(pid *PID, message interface{}) + func (ref *ActorProcess) SendUserMessage(pid *PID, message interface{}) + func (ref *ActorProcess) Stop(pid *PID) + type AddressResolver func(*PID) (Process, bool) + type AutoReceiveMessage interface + AutoReceiveMessage func() + type Behavior []ActorFunc + func NewBehavior() Behavior + func (b *Behavior) Become(receive ActorFunc) + func (b *Behavior) BecomeStacked(receive ActorFunc) + func (b *Behavior) Receive(context Context) + func (b *Behavior) UnbecomeStacked() + type Context interface + type ContextDecorator func(next ContextDecoratorFunc) ContextDecoratorFunc + type ContextDecoratorFunc func(ctx Context) Context + 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(f ActorFunc) ActorFunc + type MessageEnvelope struct + Header messageHeader + Message interface{} + Sender *PID + func WrapEnvelope(message interface{}) *MessageEnvelope + func (me *MessageEnvelope) GetHeader(key string) string + func (me *MessageEnvelope) SetHeader(key string, value string) + type NotInfluenceReceiveTimeout interface + NotInfluenceReceiveTimeout func() + type OutboundMiddleware func(next SenderFunc) SenderFunc + type PID struct + Address string + Id string + func Clone_PID_Slice(dst []*PID, src []*PID) []*PID + func Get_PID() *PID + func NewLocalPID(id string) *PID + func NewPID(address, id string) *PID + func New_PID() *PID + func Spawn(props *Props) *PID + func SpawnNamed(props *Props, name string) (*PID, error) + func SpawnPrefix(props *Props, prefix string) *PID + func UnwrapEnvelopeSender(message interface{}) *PID + func (*PID) Descriptor() ([]byte, []int) + func (*PID) ProtoMessage() + func (m *PID) Clone() *PID + 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) ResetEx() + func (m *PID) Size() (n int) + func (m *PID) Unmarshal(dAtA []byte) error + func (pid *PID) GracefulPoison() + func (pid *PID) GracefulStop() + func (pid *PID) Poison() + func (pid *PID) PoisonFuture() *Future + 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) Clone() *PIDSet + 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 FromProducer(actorProducer Producer) *Props + func FromSpawnFunc(spawn SpawnFunc) *Props + func PropsFromFunc(f ActorFunc) *Props + func PropsFromProducer(producer Producer) *Props + func (props *Props) WithContextDecorator(contextDecorator ...ContextDecorator) *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) 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) WithReceiverMiddleware(middleware ...ReceiverMiddleware) *Props + func (props *Props) WithSenderMiddleware(middleware ...SenderMiddleware) *Props + func (props *Props) WithSpawnFunc(spawn SpawnFunc) *Props + func (props *Props) WithSpawnMiddleware(middleware ...SpawnMiddleware) *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 + func UnwrapEnvelopeHeader(message interface{}) ReadonlyMessageHeader + type ReceiveTimeout struct + type ReceiverContext interface + type ReceiverFunc func(c ReceiverContext, envelope *MessageEnvelope) + type ReceiverMiddleware func(next ReceiverFunc) ReceiverFunc + 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 RootContext struct + func NewRootContext(header map[string]string, middleware ...SenderMiddleware) *RootContext + func (rc *RootContext) Actor() Actor + func (rc *RootContext) Message() interface{} + func (rc *RootContext) MessageHeader() ReadonlyMessageHeader + func (rc *RootContext) Parent() *PID + func (rc *RootContext) Poison(pid *PID) + func (rc *RootContext) PoisonFuture(pid *PID) *Future + func (rc *RootContext) Request(pid *PID, message interface{}) + func (rc *RootContext) RequestFuture(pid *PID, message interface{}, timeout time.Duration) *Future + func (rc *RootContext) RequestWithCustomSender(pid *PID, message interface{}, sender *PID) + func (rc *RootContext) Self() *PID + func (rc *RootContext) Send(pid *PID, message interface{}) + func (rc *RootContext) Sender() *PID + func (rc *RootContext) Spawn(props *Props) *PID + func (rc *RootContext) SpawnNamed(props *Props, name string) (*PID, error) + func (rc *RootContext) SpawnPrefix(props *Props, prefix string) *PID + func (rc *RootContext) Stop(pid *PID) + func (rc *RootContext) StopFuture(pid *PID) *Future + func (rc *RootContext) WithGuardian(guardian SupervisorStrategy) *RootContext + func (rc *RootContext) WithHeaders(headers map[string]string) *RootContext + func (rc *RootContext) WithSenderMiddleware(middleware ...SenderMiddleware) *RootContext + func (rc *RootContext) WithSpawnMiddleware(middleware ...SpawnMiddleware) *RootContext + func (rc RootContext) Copy() *RootContext + type SenderContext interface + type SenderFunc func(c SenderContext, target *PID, envelope *MessageEnvelope) + type SenderMiddleware func(next SenderFunc) SenderFunc + type SpawnFunc func(id string, props *Props, parentContext SpawnerContext) (*PID, error) + var DefaultSpawner SpawnFunc = defaultSpawner + type SpawnMiddleware func(next SpawnFunc) SpawnFunc + type SpawnerContext interface + 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