Documentation ¶
Index ¶
- type Catcher
- func (catcher *Catcher) ShouldNotSendOrReceive(pid *actor.PID) string
- func (catcher *Catcher) ShouldReceive(sender *actor.PID, msg interface{}) string
- func (catcher *Catcher) ShouldReceiveSysMsg(msg interface{}) string
- func (catcher *Catcher) ShouldSend(receiver *actor.PID, msg interface{}) string
- func (catcher *Catcher) ShouldSpawn(match string) string
- func (catcher *Catcher) Spawn(props *actor.Props, opts ...options.Options) (*actor.PID, error)
- type Context
- type Envelope
- type NullReceiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catcher ¶
type Catcher struct { // Channels for intercepted messages ChSystemInbound chan *Envelope ChUserInbound chan *Envelope ChUserOutbound chan *Envelope // Channels for intercepted spawning of children ChSpawning chan *actor.PID // One followed actor per catcher AssignedActor *actor.PID Options options.Options }
Catcher is the working horse of the interception mechanism. It seats in front of every tested actor and watches for messages and system events.
func (*Catcher) ShouldNotSendOrReceive ¶
func (*Catcher) ShouldReceive ¶
func (*Catcher) ShouldReceiveSysMsg ¶
func (*Catcher) ShouldSend ¶
func (*Catcher) ShouldSpawn ¶
type Context ¶
type Context struct { actor.Context // This is the original context to pass calls to // contains filtered or unexported fields }
This is a wrapper around a real actor.Context object to intercept calls for testing purposes. This should implement the actor.Context interface
func (*Context) SpawnNamed ¶
type NullReceiver ¶
type NullReceiver struct{}
func (*NullReceiver) Receive ¶
func (nr *NullReceiver) Receive(ctx actor.Context)
Click to show internal directories.
Click to hide internal directories.