123456789101112131415161718192021222324 |
- package ruleEngine
- import "sparrow/pkg/protocol"
- // Ref a actor reference
- type Ref interface {
- // get actor id
- GetActorId() string
- // tell actor a message
- Tell(msg protocol.ActorMsg)
- // tell actor a message with high priority
- TellWithHighPriority(msg protocol.ActorMsg)
- }
- // Ctx a actor context
- type Ctx interface {
- Ref
- GetSelf() string
- GetParentRef() Ref
- TellActor(actorId string, msg protocol.ActorMsg)
- Stop(actorId string) error
- GetOrCreateChildActor(actorId string, dispatcherName string, create Creator) (Ref, error)
- BroadcastChildren(msg protocol.ActorMsg) error
- }
|