Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Behavior ¶
type Behavior = map[os.Signal]Termination
Behavior defines the relation between each supported signal and a custom type of framework termination.
type Octopus ¶
type Octopus struct {
// contains filtered or unexported fields
}
Octopus runs a framework consisting of multiple concurrent tasks.
type Option ¶
type Option func(*Octopus)
Option defines an Octopus option.
func WithBehavior ¶
func WithBehavior(behavior map[os.Signal]Termination) Option
WithBehavior sets the behavior of Octopus with respect to each input signal. The map values are customizable and their meaning is defined by the caller.
func WithBlockedTasks ¶
WithBlockedTasks defines the blocked tasks that Octopus will run. These tasks will be executed only once the framework is done: - when a supported signal is received; - when the context expires.
type Termination ¶
type Termination string
Termination defines the type of workflow termination.
const ( // Canceled defines the termination upon expired context. Canceled Termination = "Canceled" // Unexpected defines the Unexpected termination. Unexpected Termination = "Unexpected" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.