workflow

package
v3.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPostActivityHook

func RegisterPostActivityHook(activityHook ActivityHook)

RegisterPostActivityHook registers an ActivityHook in the list of ActivityHooks that will be triggered after a workflow activity

func RegisterPreActivityHook

func RegisterPreActivityHook(activityHook ActivityHook)

RegisterPreActivityHook registers an ActivityHook in the list of ActivityHooks that will be triggered before a workflow activity

Types

type ActivityHook

type ActivityHook func(ctx context.Context, cfg config.Configuration, taskID, deploymentID, target string, activity builder.Activity)

An ActivityHook is a function that could be registered as pre or post activity hook and which is called respectively just before or after a workflow activity TaskExecution

type Dispatcher

type Dispatcher struct {
	WorkerPool chan chan *taskExecution
	// contains filtered or unexported fields
}

Dispatcher concern is polling executions task and dispatch them across available workers It has to acquire a lock on the execution task as other distributed dispatchers can try to do the same If it gets the lock, it instantiates an execution task and push it to workers pool If it receives a message from shutdown channel, it has to spread the shutdown to workers

func NewDispatcher

func NewDispatcher(cfg config.Configuration, shutdownCh chan struct{}, client *api.Client, wg *sync.WaitGroup) *Dispatcher

NewDispatcher create a new Dispatcher with a given number of workers

func (*Dispatcher) Run

func (d *Dispatcher) Run()

Run creates workers and polls new task executions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL