Documentation ¶
Index ¶
- type AckRecorder
- type ActorProxy
- func (proxy *ActorProxy) ProxyPID() *actor.PID
- func (proxy *ActorProxy) Send(ctx actor.SenderContext, req proto.Message)
- func (proxy *ActorProxy) SendAndAwait(ctx actor.SenderContext, req proto.Message, resEmpty proto.Message, ...) (proto.Message, error)
- func (proxy *ActorProxy) Underlying() *actor.PID
- type ActorUtil
- func (u *ActorUtil) Fail(ctx actor.Context, err error)
- func (u *ActorUtil) IsSystemMessage(m interface{}) bool
- func (u *ActorUtil) LogDebug(ctx actor.Context, msg string)
- func (u *ActorUtil) LogError(ctx actor.Context, msg string)
- func (u *ActorUtil) LogInfo(ctx actor.Context, msg string)
- func (u *ActorUtil) LogWarn(ctx actor.Context, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckRecorder ¶
type AckRecorder struct {
// contains filtered or unexported fields
}
AckRecorder helps to manage state of waiting Ack message
func (*AckRecorder) Ack ¶
func (ar *AckRecorder) Ack(id string) bool
Ack removes id from waiting list
func (*AckRecorder) AddToWaitList ¶
func (ar *AckRecorder) AddToWaitList(id string) bool
AddToWaitList adds id into waiting list
func (*AckRecorder) HasCompleted ¶
func (ar *AckRecorder) HasCompleted() bool
HasCompleted checks if waiting list is empty
type ActorProxy ¶
type ActorProxy struct {
// contains filtered or unexported fields
}
ActorProxy is proxy that captures messages sent to Parent() under test
func NewActorProxy ¶
func NewActorProxy(root actor.SpawnerContext, underlyingProps *actor.Props, customHandler func(ctx actor.Context)) *ActorProxy
NewActorProxy returns a new instance
func (*ActorProxy) ProxyPID ¶
func (proxy *ActorProxy) ProxyPID() *actor.PID
ProxyPID returns pid of proxy
func (*ActorProxy) Send ¶
func (proxy *ActorProxy) Send(ctx actor.SenderContext, req proto.Message)
Send sends a request via proxy
func (*ActorProxy) SendAndAwait ¶
func (proxy *ActorProxy) SendAndAwait(ctx actor.SenderContext, req proto.Message, resEmpty proto.Message, timeout time.Duration) (proto.Message, error)
SendAndAwait sends a request to underlying actor and wait for response
func (*ActorProxy) Underlying ¶
func (proxy *ActorProxy) Underlying() *actor.PID
Underlying returns PID under the test
type ActorUtil ¶
ActorUtil is utility for actor
func (*ActorUtil) IsSystemMessage ¶
IsSystemMessage returns if message is SystemMessage
Click to show internal directories.
Click to hide internal directories.