Documentation ¶
Overview ¶
Package action defines and interface for action Manager. Action manager manages the execution of an action. The manager can list the objects on which the actions will be performed and can optionally perform a check to verify if the action succeeded, if required.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // GetName returns the name of the Manager based on the target object. This // is used to set unique name to help identify the manager, such as in the // logs by setting the logger name. GetName(interface{}) (string, error) // GetObjects returns all the objects on which action should be run. GetObjects(context.Context) ([]interface{}, error) // Check checks if the action is needed anymore. Check(context.Context, interface{}) (bool, error) // Run runs the action on the given object. Run(context.Context, interface{}) error // Defer is executed at the end of run to execute once run ends. Defer(context.Context, interface{}) error }
Manager manages the actions to be executed on objects.
Click to show internal directories.
Click to hide internal directories.