Documentation ¶
Overview ¶
runner package contains the implementation of a queue of tasks that can perfom actions against a remote api-server
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeState ¶
func (*FakeState) GetContext ¶
func (*FakeState) SkipWaitCurrentStatus ¶ added in v0.3.0
func (s *FakeState) SkipWaitCurrentStatus(*unstructured.Unstructured) bool
type State ¶
type State interface { // GetContext return the Context where to execute task GetContext() context.Context // SendEvent is used for sending back status updates for the current task SendEvent(event.Event) // SkipWaitCurrentStatus return if the object has to be skipped for waiting. // Return true if for some reasons is knowns that the object cannot be watched SkipWaitCurrentStatus(*unstructured.Unstructured) bool }
State encapsulate the state of the run for sharing data between different tasks execution
type Task ¶
type Task interface { // Run is used to execute the action implemented by the Task, progress in the task // is expected to be communicated through State Run(State) }
Task provides abstractions that a Task must implement to be able to be used by a Runner
type TaskRunner ¶
type TaskRunner interface { // RunWithQueue will start to execute all the tasks that will be found in the channel RunWithQueue(State, <-chan Task) error }
TaskRunner provides abstraction for a TaskRunner implementation
func NewTaskRunner ¶
func NewTaskRunner() TaskRunner
NewTaskRunner return an implementation of TaskRunner
Click to show internal directories.
Click to hide internal directories.