Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrTimeout = errors.New("timeout")
)
Defines errors.
var Main = New("main")
Main defines the main exit. This exit should be used by the main program. Libraries should create their own exit.
Functions ¶
This section is empty.
Types ¶
type Exit ¶
type Exit struct { Name string // contains filtered or unexported fields }
Exit defines an exit that contains multiple SignalChans.
func (*Exit) AfterAll ¶
AfterAll registers a callback function that is called after all actors has exited.
func (*Exit) AfterEach ¶
AfterEach registers a callback function that is called after each actor that has exited.
func (*Exit) Exit ¶
Exit sends an ErrChan through all the previously generated SignalChans and waits until all returned an error or nil. The received errors will be returned in an error report.
func (*Exit) ExitOn ¶
ExitOn blocks until the process receives one of the provided signals and than calls Exit.
func (*Exit) HasTimeout ¶
HasTimeout returns true if a timeout is set.
func (*Exit) SetTimeout ¶
SetTimeout sets a timeout for the actors to end during the exit process.
type Reply ¶
type Reply chan error
Reply defines a channel of errors that can be used to deliver back an error after an actor has shut down.
type Report ¶
type Report struct { ExitName string // contains filtered or unexported fields }
Report defines the report of the exit process. It contains map of all signal names with their returned error.
type Signal ¶
Signal defines an exit signal signal for a single actor.
func (*Signal) AfterExit ¶
AfterExit registers a callback function that is called after the exit has been performed.
func (*Signal) HasTimeout ¶
HasTimeout returns true if a timeout is set.
func (*Signal) SetTimeout ¶
SetTimeout sets the timeout for this specific exit signal to complete. If no or zero timeout is set, the exit process can last forever.