butt

package
v0.0.0-...-d04577e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "development"

Version will be set through build flags used to print version via cmd.

Functions

func RunSchedule

func RunSchedule(fn string, prettyLog bool, httpPort string, supressLogs bool, logLevel string)

RunSchedule is the main entry entrypoint of butt.

func TUI

func TUI(httpPort string)

TUI is the main entrypoint for the butt ui.

Types

type JobRun

type JobRun struct {
	Status      int       `json:"status"`
	Log         string    `json:"log"`
	Name        string    `json:"name"`
	TriggeredAt time.Time `json:"triggered_at"`
	TriggeredBy string    `json:"triggered_by"`
	Triggered   []string  `json:"triggered,omitempty"`
}

JobRun holds information about a job execution.

type JobSpec

type JobSpec struct {
	Cron     string      `yaml:"cron,omitempty" json:"cron,omitempty"`
	Command  stringArray `yaml:"command" json:"command"`
	Triggers []string    `yaml:"triggers,omitempty" json:"triggers,omitempty"`
	Name     string      `json:"name"`
	Retries  int         `yaml:"retries,omitempty" json:"retries,omitempty"`
	// contains filtered or unexported fields
}

JobSpec holds specifications and metadata of a job.

type Schedule

type Schedule struct {
	Jobs map[string]*JobSpec `yaml:"jobs" json:"jobs"`
}

Schedule defines specs of a job schedule.

func (*Schedule) Run

func (s *Schedule) Run(surpressLogs bool)

Run a Schedule based on its specs.

func (*Schedule) Validate

func (s *Schedule) Validate() error

Validate Schedule spec and logic.

Jump to

Keyboard shortcuts

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