Documentation ¶
Index ¶
- Variables
- func UnwrapEnvelope(message interface{}) (ReadonlyMessageHeader, interface{}, *PID)
- func UnwrapEnvelopeMessage(message interface{}) interface{}
- type Actor
- type ActorProcess
- type ActorSystem
- type AutoReceiveMessage
- type Config
- type ConfigOption
- type Context
- type ContextDecoratorFunc
- type DeadLetterEvent
- type DeadLetterResponse
- func (*DeadLetterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeadLetterResponse) GetTarget() *PID
- func (*DeadLetterResponse) ProtoMessage()
- func (x *DeadLetterResponse) ProtoReflect() protoreflect.Message
- func (x *DeadLetterResponse) Reset()
- func (x *DeadLetterResponse) String() string
- type Dispatcher
- type EventMessage
- type EventStream
- type Failure
- type Future
- type Handler
- type Invoker
- type Mailbox
- type MailboxMiddleware
- type MailboxProducer
- type MessageEnvelope
- type NotInfluenceReceiveTimeout
- type PID
- func (*PID) Descriptor() ([]byte, []int)deprecated
- func (pid *PID) Equal(other *PID) bool
- func (x *PID) GetAddress() string
- func (x *PID) GetID() string
- func (x *PID) GetRequestId() uint32
- func (*PID) ProtoMessage()
- func (x *PID) ProtoReflect() protoreflect.Message
- func (x *PID) Reset()
- func (x *PID) String() string
- type 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) Get(index int) *PID
- func (p *PIDSet) Len() int
- func (p *PIDSet) Remove(v *PID) bool
- func (p *PIDSet) Values() []*PID
- type PoisonPill
- type Process
- type ProcessRegistry
- type Producer
- type ProducerWithActorSystem
- type Props
- type PropsOption
- func WithFunc(f ReceiveFunc) PropsOption
- func WithMailbox(mailbox MailboxProducer) PropsOption
- func WithProducer(p Producer) PropsOption
- func WithReceiverMiddleware(middleware ...ReceiverMiddleware) PropsOption
- func WithSenderMiddleware(middleware ...SenderMiddleware) PropsOption
- func WithSpawnFunc(spawn SpawnFunc) PropsOption
- func WithSpawnMiddleware(middleware ...SpawnMiddleware) PropsOption
- type ReadonlyMessageHeader
- type ReceiveFunc
- type ReceiveTimeout
- type ReceiverContext
- type ReceiverFunc
- type ReceiverMiddleware
- type Restart
- type Restarting
- type ResumeMailbox
- type RootContext
- func (rc *RootContext) Actor() Actor
- func (rc *RootContext) ActorSystem() *ActorSystem
- func (rc *RootContext) Envelope() *MessageEnvelope
- func (rc *RootContext) Logger() *slog.Logger
- 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, envelope *MessageEnvelope) (*MessageEnvelope, error)
- func (rc *RootContext) Self() *PID
- func (rc *RootContext) Send(pid *PID, envelope *MessageEnvelope)
- 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) WithHeaders(headers map[string]string) *RootContext
- func (rc *RootContext) WithSenderMiddleware(middleware ...SenderMiddleware) *RootContext
- func (rc *RootContext) WithSpawnMiddleware(middleware ...SpawnMiddleware) *RootContext
- type SenderContext
- type SenderFunc
- type SenderMiddleware
- type SliceMap
- type SpawnFunc
- type SpawnMiddleware
- type SpawnerContext
- type Started
- type Stop
- type Stopped
- type Stopping
- type Subscription
- type SuspendMailbox
- type SystemMessage
- type Terminated
- func (*Terminated) Descriptor() ([]byte, []int)deprecated
- func (x *Terminated) GetWho() *PID
- func (x *Terminated) GetWhy() TerminatedReason
- func (*Terminated) ProtoMessage()
- func (x *Terminated) ProtoReflect() protoreflect.Message
- func (x *Terminated) Reset()
- func (x *Terminated) String() string
- func (*Terminated) SystemMessage()
- type TerminatedReason
- func (TerminatedReason) Descriptor() protoreflect.EnumDescriptor
- func (x TerminatedReason) Enum() *TerminatedReason
- func (TerminatedReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x TerminatedReason) Number() protoreflect.EnumNumber
- func (x TerminatedReason) String() string
- func (TerminatedReason) Type() protoreflect.EnumType
- type Unwatch
- type Watch
Constants ¶
This section is empty.
Variables ¶
var ( TerminatedReason_name = map[int32]string{ 0: "Stopped", 1: "AddressTerminated", 2: "NotFound", } TerminatedReason_value = map[string]int32{ "Stopped": 0, "AddressTerminated": 1, "NotFound": 2, } )
Enum value maps for TerminatedReason.
var ( // ErrNameExists is the error used when an existing name is used for spawning an actor. ErrNameExists = errors.New("spawn: name exists") // ErrTimeout is the error used when a future times out before receiving a result. ErrTimeout = errors.New("future: timeout") // ErrDeadLetter is meaning you request to a unreachable PID. ErrDeadLetter = errors.New("future: dead letter") )
var EmptyMessageHeader = make(messageHeader)
var File_actor_proto protoreflect.FileDescriptor
Functions ¶
func UnwrapEnvelope ¶
func UnwrapEnvelope(message interface{}) (ReadonlyMessageHeader, interface{}, *PID)
func UnwrapEnvelopeMessage ¶
func UnwrapEnvelopeMessage(message interface{}) interface{}
Types ¶
type Actor ¶
type Actor interface {
Receive(c Context)
}
Actor is the interface that defines the Receive method.
Receive is sent messages to be processed from the mailbox associated with the instance of the actor
type ActorProcess ¶
type ActorProcess struct {
// contains filtered or unexported fields
}
func NewActorProcess ¶
func NewActorProcess(mailbox Mailbox) *ActorProcess
func (*ActorProcess) SendSystemMessage ¶
func (ref *ActorProcess) SendSystemMessage(_ *PID, message SystemMessage)
func (*ActorProcess) SendUserMessage ¶
func (ref *ActorProcess) SendUserMessage(_ *PID, message *MessageEnvelope)
func (*ActorProcess) Stop ¶
func (ref *ActorProcess) Stop(pid *PID)
type ActorSystem ¶
type ActorSystem struct { ProcessRegistry *ProcessRegistry Root *RootContext EventStream *EventStream DeadLetter *deadLetter Config *Config ID string // contains filtered or unexported fields }
func NewActorSystem ¶
func NewActorSystem(opts ...ConfigOption) *ActorSystem
func NewActorSystemWithConfig ¶
func NewActorSystemWithConfig(config *Config) *ActorSystem
func (*ActorSystem) Address ¶
func (as *ActorSystem) Address() string
func (*ActorSystem) IsStopped ¶
func (as *ActorSystem) IsStopped() bool
func (*ActorSystem) Logger ¶
func (as *ActorSystem) Logger() *slog.Logger
func (*ActorSystem) NewLocalPID ¶
func (as *ActorSystem) NewLocalPID(id string) *PID
func (*ActorSystem) Shutdown ¶
func (as *ActorSystem) Shutdown()
type AutoReceiveMessage ¶
type AutoReceiveMessage interface {
AutoReceiveMessage()
}
An AutoReceiveMessage is a special kind of user message that will be handled in some way automatically by the actor
type Config ¶
type Config struct {
LoggerFactory func(system *ActorSystem) *slog.Logger
}
func Configure ¶
func Configure(options ...ConfigOption) *Config
type ConfigOption ¶
type ConfigOption func(config *Config)
func WithLoggerFactory ¶
func WithLoggerFactory(factory func(system *ActorSystem) *slog.Logger) ConfigOption
WithLoggerFactory sets the logger factory to use for the actor system
type ContextDecoratorFunc ¶
type DeadLetterEvent ¶
DeadLetterEvent 当有消息发送给一个不存在的 PID 时。 发布事件给所有的订阅者
func (*DeadLetterEvent) EventMessage ¶
func (d *DeadLetterEvent) EventMessage()
type DeadLetterResponse ¶
type DeadLetterResponse struct { Target *PID `protobuf:"bytes,1,opt,name=Target,proto3" json:"Target,omitempty"` // contains filtered or unexported fields }
func (*DeadLetterResponse) Descriptor
deprecated
func (*DeadLetterResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeadLetterResponse.ProtoReflect.Descriptor instead.
func (*DeadLetterResponse) GetTarget ¶
func (x *DeadLetterResponse) GetTarget() *PID
func (*DeadLetterResponse) ProtoMessage ¶
func (*DeadLetterResponse) ProtoMessage()
func (*DeadLetterResponse) ProtoReflect ¶
func (x *DeadLetterResponse) ProtoReflect() protoreflect.Message
func (*DeadLetterResponse) Reset ¶
func (x *DeadLetterResponse) Reset()
func (*DeadLetterResponse) String ¶
func (x *DeadLetterResponse) String() string
type Dispatcher ¶
type Dispatcher interface { Schedule(fn func()) Throughput() int }
func NewDefaultDispatcher ¶
func NewDefaultDispatcher(throughput int) Dispatcher
func NewSynchronizedDispatcher ¶
func NewSynchronizedDispatcher(throughput int) Dispatcher
type EventMessage ¶
type EventMessage interface {
EventMessage()
}
type EventStream ¶
func NewEventStream ¶
func NewEventStream() *EventStream
func (*EventStream) Length ¶
func (es *EventStream) Length() int
func (*EventStream) Publish ¶
func (es *EventStream) Publish(evt EventMessage)
func (*EventStream) Subscribe ¶
func (es *EventStream) Subscribe(handler Handler) *Subscription
Subscribe the given handler to the EventStream
func (*EventStream) Unsubscribe ¶
func (es *EventStream) Unsubscribe(sub *Subscription)
type Failure ¶
type Failure struct { Who *PID Reason interface{} //RestartStats *RestartStatistics Message interface{} }
Failure message is sent to an actor parent when an exception is thrown by one of its methods
func (*Failure) SystemMessage ¶
func (*Failure) SystemMessage()
type Future ¶
type Future struct {
// contains filtered or unexported fields
}
func NewFuture ¶
func NewFuture(actorSystem *ActorSystem, d time.Duration) *Future
NewFuture creates and returns a new actor.Future with a timeout of duration d.
func (*Future) Result ¶
func (f *Future) Result() (*MessageEnvelope, error)
Result waits for the future to resolve.
type Handler ¶
type Handler func(evt EventMessage)
Handler defines a callback function that must be pass when subscribing.
type Invoker ¶
type Invoker interface { InvokeSystemMessage(message SystemMessage) InvokeUserMessage(envelope *MessageEnvelope) EscalateFailure(reason interface{}, message interface{}) }
Invoker is the interface used by a mailbox to forward messages for processing
type Mailbox ¶
type Mailbox interface { Start() Count() int PostUserMessage(message *MessageEnvelope) PostSystemMessage(message SystemMessage) RegisterHandlers(invoker Invoker, dispatcher Dispatcher) }
type MailboxMiddleware ¶
type MailboxMiddleware interface { MailboxStarted() MessagePosted(message interface{}) MessageReceived(message interface{}) MailboxEmpty() }
MailboxMiddleware is an interface for intercepting messages and events in the mailbox
type MailboxProducer ¶
type MailboxProducer func() Mailbox
MailboxProducer is a function which creates a new mailbox
func UnboundedLockfree ¶
func UnboundedLockfree(mailboxStats ...MailboxMiddleware) MailboxProducer
UnboundedLockfree returns a producer which creates an unbounded, lock-free mailbox. This mailbox is cheaper to allocate, but has a slower throughput than the plain Unbounded mailbox.
type MessageEnvelope ¶
type MessageEnvelope struct { Header messageHeader Message interface{} Sender *PID }
func PoisonPillMessage ¶
func PoisonPillMessage() *MessageEnvelope
func WrapEnvelopWithSender ¶
func WrapEnvelopWithSender(message interface{}, sender *PID) *MessageEnvelope
func WrapEnvelope ¶
func WrapEnvelope(message interface{}) *MessageEnvelope
func (*MessageEnvelope) GetHeader ¶
func (envelope *MessageEnvelope) GetHeader(key string) string
func (*MessageEnvelope) SetHeader ¶
func (envelope *MessageEnvelope) SetHeader(key string, value string)
type NotInfluenceReceiveTimeout ¶
type NotInfluenceReceiveTimeout interface {
NotInfluenceReceiveTimeout()
}
NotInfluenceReceiveTimeout messages will not reset the ReceiveTimeout timer of an actor that receives the message
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"` RequestId uint32 `protobuf:"varint,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
func (*PID) Descriptor
deprecated
func (*PID) GetAddress ¶
func (*PID) GetRequestId ¶
func (*PID) ProtoMessage ¶
func (*PID) ProtoMessage()
func (*PID) ProtoReflect ¶
func (x *PID) ProtoReflect() protoreflect.Message
type PIDSet ¶
type PIDSet struct {
// contains filtered or unexported fields
}
type PoisonPill ¶
type PoisonPill struct {
// contains filtered or unexported fields
}
user messages
func (*PoisonPill) AutoReceiveMessage ¶
func (*PoisonPill) AutoReceiveMessage()
func (*PoisonPill) Descriptor
deprecated
func (*PoisonPill) Descriptor() ([]byte, []int)
Deprecated: Use PoisonPill.ProtoReflect.Descriptor instead.
func (*PoisonPill) ProtoMessage ¶
func (*PoisonPill) ProtoMessage()
func (*PoisonPill) ProtoReflect ¶
func (x *PoisonPill) ProtoReflect() protoreflect.Message
func (*PoisonPill) Reset ¶
func (x *PoisonPill) Reset()
func (*PoisonPill) String ¶
func (x *PoisonPill) String() string
type Process ¶
type Process interface { SendUserMessage(pid *PID, envelope *MessageEnvelope) SendSystemMessage(pid *PID, message SystemMessage) Stop(pid *PID) }
A Process is an interface that defines the base contract for interaction of actors
type ProcessRegistry ¶
type ProcessRegistry struct { SequenceID uint64 ActorSystem *ActorSystem Address string LocalPIDs *SliceMap // contains filtered or unexported fields }
ProcessRegistry
@Description: 存储管理actor
func NewProcessRegistry ¶
func NewProcessRegistry(actorSystem *ActorSystem) *ProcessRegistry
func (*ProcessRegistry) Add ¶
func (pr *ProcessRegistry) Add(process Process, id string) (*PID, bool)
func (*ProcessRegistry) NextId ¶
func (pr *ProcessRegistry) NextId() string
func (*ProcessRegistry) Remove ¶
func (pr *ProcessRegistry) Remove(pid *PID)
type ProducerWithActorSystem ¶
type ProducerWithActorSystem func(system *ActorSystem) Actor
The ProducerWithActorSystem type is a function that creates a new actor
type Props ¶
type Props struct {
// contains filtered or unexported fields
}
func PropsFromFunc ¶
func PropsFromFunc(f ReceiveFunc, opts ...PropsOption) *Props
PropsFromFunc creates a props with the given receive func assigned as the actor producer.
func PropsFromProducer ¶
func PropsFromProducer(producer Producer, opts ...PropsOption) *Props
PropsFromProducer creates a props with the given actor producer assigned.
func (*Props) Configure ¶
func (props *Props) Configure(opts ...PropsOption) *Props
type PropsOption ¶
type PropsOption func(props *Props)
func WithFunc ¶
func WithFunc(f ReceiveFunc) PropsOption
func WithMailbox ¶
func WithMailbox(mailbox MailboxProducer) PropsOption
func WithProducer ¶
func WithProducer(p Producer) PropsOption
func WithReceiverMiddleware ¶
func WithReceiverMiddleware(middleware ...ReceiverMiddleware) PropsOption
func WithSenderMiddleware ¶
func WithSenderMiddleware(middleware ...SenderMiddleware) PropsOption
func WithSpawnFunc ¶
func WithSpawnFunc(spawn SpawnFunc) PropsOption
func WithSpawnMiddleware ¶
func WithSpawnMiddleware(middleware ...SpawnMiddleware) PropsOption
type ReadonlyMessageHeader ¶
type ReceiveFunc ¶
type ReceiveFunc func(c Context)
The ReceiveFunc type is an adapter to allow the use of ordinary functions as actors to process messages
type ReceiveTimeout ¶
type ReceiveTimeout struct{}
A ReceiveTimeout message is sent to an actor after the Context.ReceiveTimeout duration has expired
func (*ReceiveTimeout) SystemMessage ¶
func (*ReceiveTimeout) SystemMessage()
type ReceiverContext ¶
type ReceiverContext interface {
// contains filtered or unexported methods
}
type ReceiverFunc ¶
type ReceiverFunc func(c ReceiverContext, envelope *MessageEnvelope)
type ReceiverMiddleware ¶
type ReceiverMiddleware func(next ReceiverFunc) ReceiverFunc
type Restart ¶
type Restart struct{}
Restart is message sent by the actor system to control the lifecycle of an actor
func (*Restart) SystemMessage ¶
func (*Restart) SystemMessage()
type Restarting ¶
type Restarting struct{}
A Restarting message is sent to an actor when the actor is being restarted by the system due to a failure
func (*Restarting) AutoReceiveMessage ¶
func (*Restarting) AutoReceiveMessage()
type ResumeMailbox ¶
type ResumeMailbox struct{}
ResumeMailbox is message sent by the actor system to resume mailbox processing.
This will not be forwarded to the Receive method
func (*ResumeMailbox) SystemMessage ¶
func (*ResumeMailbox) SystemMessage()
type RootContext ¶
type RootContext struct {
// contains filtered or unexported fields
}
func NewRootContext ¶
func NewRootContext(actorSystem *ActorSystem, header map[string]string, middleware ...SenderMiddleware) *RootContext
func (*RootContext) Actor ¶
func (rc *RootContext) Actor() Actor
func (*RootContext) ActorSystem ¶
func (rc *RootContext) ActorSystem() *ActorSystem
func (*RootContext) Envelope ¶
func (rc *RootContext) Envelope() *MessageEnvelope
func (*RootContext) Logger ¶
func (rc *RootContext) Logger() *slog.Logger
func (*RootContext) MessageHeader ¶
func (rc *RootContext) MessageHeader() ReadonlyMessageHeader
func (*RootContext) Parent ¶
func (rc *RootContext) Parent() *PID
func (*RootContext) Poison ¶
func (rc *RootContext) Poison(pid *PID)
func (*RootContext) PoisonFuture ¶
func (rc *RootContext) PoisonFuture(pid *PID) *Future
PoisonFuture will tell actor to stop after processing current user messages in mailbox, and return its future.
func (*RootContext) Request ¶
func (rc *RootContext) Request(pid *PID, envelope *MessageEnvelope) (*MessageEnvelope, error)
Request
@Description: @receiver rc @param pid @param message message's type cannot be MessageEnvelope @return *MessageEnvelope @return error
func (*RootContext) Self ¶
func (rc *RootContext) Self() *PID
func (*RootContext) Send ¶
func (rc *RootContext) Send(pid *PID, envelope *MessageEnvelope)
func (*RootContext) Sender ¶
func (rc *RootContext) Sender() *PID
func (*RootContext) Spawn ¶
func (rc *RootContext) Spawn(props *Props) *PID
func (*RootContext) SpawnNamed ¶
func (rc *RootContext) SpawnNamed(props *Props, name string) (*PID, error)
func (*RootContext) SpawnPrefix ¶
func (rc *RootContext) SpawnPrefix(props *Props, prefix string) *PID
func (*RootContext) Stop ¶
func (rc *RootContext) Stop(pid *PID)
func (*RootContext) StopFuture ¶
func (rc *RootContext) StopFuture(pid *PID) *Future
StopFuture will stop actor immediately regardless of existing user messages in mailbox, and return its future.
func (*RootContext) WithHeaders ¶
func (rc *RootContext) WithHeaders(headers map[string]string) *RootContext
func (*RootContext) WithSenderMiddleware ¶
func (rc *RootContext) WithSenderMiddleware(middleware ...SenderMiddleware) *RootContext
func (*RootContext) WithSpawnMiddleware ¶
func (rc *RootContext) WithSpawnMiddleware(middleware ...SpawnMiddleware) *RootContext
type SenderContext ¶
type SenderContext interface {
// contains filtered or unexported methods
}
type SenderFunc ¶
type SenderFunc func(c SenderContext, target *PID, envelope *MessageEnvelope)
type SenderMiddleware ¶
type SenderMiddleware func(next SenderFunc) SenderFunc
type SliceMap ¶
type SliceMap struct {
LocalPIDs []cmap.ConcurrentMap
}
type SpawnFunc ¶
type SpawnFunc func(actorSystem *ActorSystem, id string, props *Props, parentContext SpawnerContext) (*PID, error)
var DefaultSpawner SpawnFunc = defaultSpawner
DefaultSpawner this is a hacking way to allow Proto.Router access default spawner func.
type SpawnMiddleware ¶
type SpawnerContext ¶
type SpawnerContext interface {
// contains filtered or unexported methods
}
type Started ¶
type Started struct{}
A Started message is sent to an actor once it has been started and ready to begin receiving messages.
func (*Started) SystemMessage ¶
func (*Started) SystemMessage()
type Stop ¶
type Stop struct {
// contains filtered or unexported fields
}
func (*Stop) Descriptor
deprecated
func (*Stop) ProtoMessage ¶
func (*Stop) ProtoMessage()
func (*Stop) ProtoReflect ¶
func (x *Stop) ProtoReflect() protoreflect.Message
func (*Stop) SystemMessage ¶
func (*Stop) SystemMessage()
type Stopped ¶
type Stopped struct{}
A Stopped message is sent to the actor once it has been stopped. A stopped actor will receive no further messages
func (*Stopped) AutoReceiveMessage ¶
func (*Stopped) AutoReceiveMessage()
type Stopping ¶
type Stopping struct{}
A Stopping message is sent to an actor prior to the actor being stopped
func (*Stopping) AutoReceiveMessage ¶
func (*Stopping) AutoReceiveMessage()
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription is returned from the Subscribe function.
This value and can be passed to Unsubscribe when the observer is no longer interested in receiving messages
func (*Subscription) Activate ¶
func (s *Subscription) Activate() bool
func (*Subscription) IsActive ¶
func (s *Subscription) IsActive() bool
type SuspendMailbox ¶
type SuspendMailbox struct{}
SuspendMailbox is message sent by the actor system to suspend mailbox processing.
This will not be forwarded to the Receive method
func (*SuspendMailbox) SystemMessage ¶
func (*SuspendMailbox) SystemMessage()
type SystemMessage ¶
type SystemMessage interface {
SystemMessage()
}
A SystemMessage message is reserved for specific lifecycle messages used by the actor system
type Terminated ¶
type Terminated struct { Who *PID `protobuf:"bytes,1,opt,name=who,proto3" json:"who,omitempty"` Why TerminatedReason `protobuf:"varint,2,opt,name=Why,proto3,enum=actor.TerminatedReason" json:"Why,omitempty"` // contains filtered or unexported fields }
func (*Terminated) Descriptor
deprecated
func (*Terminated) Descriptor() ([]byte, []int)
Deprecated: Use Terminated.ProtoReflect.Descriptor instead.
func (*Terminated) GetWho ¶
func (x *Terminated) GetWho() *PID
func (*Terminated) GetWhy ¶
func (x *Terminated) GetWhy() TerminatedReason
func (*Terminated) ProtoMessage ¶
func (*Terminated) ProtoMessage()
func (*Terminated) ProtoReflect ¶
func (x *Terminated) ProtoReflect() protoreflect.Message
func (*Terminated) Reset ¶
func (x *Terminated) Reset()
func (*Terminated) String ¶
func (x *Terminated) String() string
func (*Terminated) SystemMessage ¶
func (*Terminated) SystemMessage()
type TerminatedReason ¶
type TerminatedReason int32
const ( TerminatedReason_Stopped TerminatedReason = 0 TerminatedReason_AddressTerminated TerminatedReason = 1 TerminatedReason_NotFound TerminatedReason = 2 )
func (TerminatedReason) Descriptor ¶
func (TerminatedReason) Descriptor() protoreflect.EnumDescriptor
func (TerminatedReason) Enum ¶
func (x TerminatedReason) Enum() *TerminatedReason
func (TerminatedReason) EnumDescriptor
deprecated
func (TerminatedReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use TerminatedReason.Descriptor instead.
func (TerminatedReason) Number ¶
func (x TerminatedReason) Number() protoreflect.EnumNumber
func (TerminatedReason) String ¶
func (x TerminatedReason) String() string
func (TerminatedReason) Type ¶
func (TerminatedReason) Type() protoreflect.EnumType
type Unwatch ¶
type Unwatch struct { Watcher *PID `protobuf:"bytes,1,opt,name=Watcher,proto3" json:"Watcher,omitempty"` // contains filtered or unexported fields }
func (*Unwatch) Descriptor
deprecated
func (*Unwatch) GetWatcher ¶
func (*Unwatch) ProtoMessage ¶
func (*Unwatch) ProtoMessage()
func (*Unwatch) ProtoReflect ¶
func (x *Unwatch) ProtoReflect() protoreflect.Message
func (*Unwatch) SystemMessage ¶
func (*Unwatch) SystemMessage()
type Watch ¶
type Watch struct { Watcher *PID `protobuf:"bytes,1,opt,name=Watcher,proto3" json:"Watcher,omitempty"` // contains filtered or unexported fields }
system messages
func (*Watch) Descriptor
deprecated
func (*Watch) GetWatcher ¶
func (*Watch) ProtoMessage ¶
func (*Watch) ProtoMessage()
func (*Watch) ProtoReflect ¶
func (x *Watch) ProtoReflect() protoreflect.Message
func (*Watch) SystemMessage ¶
func (*Watch) SystemMessage()
Source Files ¶
- actor.pb.go
- actor_context.go
- actor_context_ext.go
- actor_process.go
- config.go
- config_opt.go
- context.go
- deadletter.go
- dispatcher.go
- errors.go
- event_stream.go
- facade.go
- func.go
- future.go
- generate.go
- mailbox.go
- message_envolope.go
- messages.go
- middleware_chain.go
- pid.go
- pidset.go
- process_register.go
- props.go
- props_opts.go
- root_context.go
- system.go
- unbounded_lock_free.go