types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runbook

type Runbook struct {
	Targets map[string]Target
	Tasks   map[string]*Task
}

A Runbook describes how to perform a series of tasks

type Target

type Target interface {
	Analyze() error
	ConcurrencyLimit() int
	Handle(context.Context, TaskConfig) error
	NewTaskConfig(class string) (TaskConfig, error)
	Start() error
	Stop() error
}

A Target executes tasks

type TargetFactory

type TargetFactory interface {
	NewTarget() Target
}

A TargetFactory instantiates new targets

type Targets

type Targets map[string]Target

Targets maps target IDs to targets

type Task

type Task struct {
	Target  string
	After   []string
	Message string
	Config  TaskConfig
}

Task contains data common to all tasks

type TaskConfig

type TaskConfig interface {
	Check() error
}

A TaskConfig contains task-specific data

type Tasks

type Tasks map[string]*Task

Tasks maps task IDs to tasks

Jump to

Keyboard shortcuts

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