coordinator

package
v0.0.0-...-c5dc566 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package coordinator coordinates the running of Labors within the system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

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

Coordinator handles coordination of executing Labors.

func New

func New(store work.Storage, cogInfo *work.CogInfo, maxReloads int) (*Coordinator, error)

New is the constructor for Coordinator.

func (*Coordinator) Add

func (c *Coordinator) Add(l *work.Labor) error

Add adds a Labor for processsing. Processing begins immediately if the state is set to NotStarted. If set to AdminNotStarted, Start() must be called to begin execution.

func (*Coordinator) Labor

func (c *Coordinator) Labor(id string) (*work.Labor, error)

Labor returns a running Labor.

func (*Coordinator) Signal

func (c *Coordinator) Signal(id string, signal work.Signal) error

Signal signals a Labor (Pause/Stop/Unpause/...).

func (*Coordinator) Start

func (c *Coordinator) Start(id string) error

Start begins processing of a Labor in the AdminNotStarted state.

Jump to

Keyboard shortcuts

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