Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { Set(jobID string, runner Runner) Get(jobID string) Runner Remove(jobID string) Items() map[string]Runner Count() int }
Repo is a small wrapper around a concurrent map that provides the ability to store and retrieve Runners in a thread-safe way.
type Return ¶
type Return struct { AtomReturn atom.Return // Final atom.Return Determines if/how chain continues running. Tries uint // Number of tries this run, not including any previous tries }
Return ...
type Runner ¶
type Runner interface { // Run runs the job, blocking until it has completed or when Stop is called. // If the job fails, Run will retry it as many times as the job is configured // to be retried. When the job successfully completes, or reaches the maximum number // of retry attempts, Run returns the final state of the job. Run(ctx context.Context) Return // Stop stops the job if it's running. The job is responsible for stopping // quickly because Stop blocks while waiting for the job to stop. Stop(ctx context.Context) error }
A Runner runs and manages one job in a job chain. The job must implement the job.Job interface.
Click to show internal directories.
Click to hide internal directories.