manager

package
v0.0.0-...-57f92f0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobName   = "job"
	BackupJob = "backupJob"
)

Variables

View Source
var (
	MonitoringPeriod     = time.Second * 2
	MonitoringMaxRetries = 3
	CleanupPeriod        = time.Minute * 2
)
View Source
var (
	KeepBadReplicasPeriod = time.Hour * 2
)

Functions

func CronUpdate

func CronUpdate(jobs []*types.RecurringJob) types.Event

func Monitor

func Monitor(getController types.GetController) types.BeginMonitoring

func New

func NewControllerError

func NewControllerError(err error) error

func RunJobs

func RunJobs(volume *types.VolumeInfo, ctrl types.Controller, settings types.Settings, ch chan types.Event)

func Send

func Send(c chan<- types.Event, e types.Event) bool

func TimeEvent

func TimeEvent() types.Event

func ValidateJobs

func ValidateJobs(jobs []*types.RecurringJob) error

Types

type ControllerError

type ControllerError interface {
	Cause() error
}

type Errs

type Errs []error

func (Errs) Error

func (errs Errs) Error() string

type Task

type Task interface {
	Run() error
}

func BackupTask

func BackupTask(runner *jobRunner, job *types.RecurringJob, si *types.SettingsInfo) Task

func SnapshotTask

func SnapshotTask(runner *jobRunner, job *types.RecurringJob, _ *types.SettingsInfo) Task

type Ticker

type Ticker interface {
	Start() Ticker
	Stop() Ticker
	NewTick() types.Event
}

func NewTicker

func NewTicker(interval time.Duration, ch chan types.Event) Ticker

Jump to

Keyboard shortcuts

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