minion

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2016 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EtcdMinionSpace = "/gru/minion"

Minions keyspace in etcd

Variables

This section is empty.

Functions

func EtcdUnmarshalTask

func EtcdUnmarshalTask(node *etcdclient.Node) (*task.Task, error)

Unmarshals task from etcd

Types

type Minion

type Minion interface {
	// Returns the unique identifier of a minion
	ID() uuid.UUID

	// Sets the name of the minion
	SetName(string) error

	// Sets the time the minion was last seen
	SetLastseen(int64) error

	// Sets a classifier for the minion
	SetClassifier(*classifier.Classifier) error

	// Listens for new tasks and processes them
	TaskListener(c chan<- *task.Task) error

	// Runs new tasks as received by the TaskListener
	TaskRunner(c <-chan *task.Task) error

	// Saves the result of a task
	SaveTaskResult(t *task.Task) error

	// Start serving
	Serve() error

	// Stops the minion
	Stop() error
}

func NewEtcdMinion

func NewEtcdMinion(name string, cfg etcdclient.Config) Minion

Creates a new etcd minion

Jump to

Keyboard shortcuts

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