cronenberg

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cronenberg provides interfaces and types for running external processes repeatedly at specific times.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron interface {
	Start()
	Stop()
	Manage(Runner) error
	Count() int
}

Cron is an interface that manages a collection of Runners, running them according to their Jobs' schedules.

type Job

type Job struct {
	Name        string            `yaml:"name"`
	Description string            `yaml:"description,omitempty"`
	Command     string            `yaml:"command"`
	When        string            `yaml:"when"`
	Lock        bool              `yaml:"lock,omitempty"`
	Env         map[string]string `yaml:"env,omitempty"`
}

Job is a data value that models a process that we want to run repeatedly.

type JobService

type JobService interface {
	All() []*Job
}

JobService is an interface that describes an API for loading Jobs.

type Logger

type Logger interface {
	Info(string, string)
	Error(string, string)
}

Logger is an interface that describes a simple logging API.

type Runner

type Runner interface {
	Run()
	Spec() string
	Name() string
	Env() map[string]string
}

Runner is an interface that wraps a Job and allows it to be run.

Directories

Path Synopsis
Package cron provides mechanisms for using the upstream cron package.
Package cron provides mechanisms for using the upstream cron package.
Package fs provides functions for working with the file system as well as services that specifically deal with the file system.
Package fs provides functions for working with the file system as well as services that specifically deal with the file system.

Jump to

Keyboard shortcuts

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