collector

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector concern is - register in Consul the task (/tasks/) - register in Consul the workflow if task is workflow (/workflows/) - register in Consul the executions for initial steps if task is workflow (/executions/) - register in Consul the execution for task if non workflow task

func NewCollector

func NewCollector(consulClient *api.Client) *Collector

NewCollector creates a Collector

func (*Collector) RegisterTask

func (c *Collector) RegisterTask(targetID string, taskType tasks.TaskType) (string, error)

RegisterTask register a new Task of a given type.

The task id is returned. Basically this is a shorthand for RegisterTaskWithData(targetID, taskType, nil)

func (*Collector) RegisterTaskWithData

func (c *Collector) RegisterTaskWithData(targetID string, taskType tasks.TaskType, data map[string]string) (string, error)

RegisterTaskWithData register a new Task of a given type with some data

The task id is returned.

func (*Collector) ResumeTask

func (c *Collector) ResumeTask(taskID string) error

ResumeTask allows to resume a task previously failed

Jump to

Keyboard shortcuts

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