github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/actor/directive.go (about)

     1  package actor
     2  
     3  // Directive is an enum for supervision actions
     4  type Directive int
     5  
     6  // Directive determines how a supervisor should handle a faulting actor
     7  const (
     8  	// ResumeDirective instructs the supervisor to resume the actor and continue processing messages
     9  	ResumeDirective Directive = iota
    10  
    11  	// RestartDirective instructs the supervisor to discard the actor, replacing it with a new instance,
    12  	// before processing additional messages
    13  	RestartDirective
    14  
    15  	// StopDirective instructs the supervisor to stop the actor
    16  	StopDirective
    17  
    18  	// EscalateDirective instructs the supervisor to escalate handling of the failure to the actor'pids parent supervisor
    19  	EscalateDirective
    20  )