runner

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package runner [responsible for updating the config and managing jobs accordingly]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigPaths    []string          // Comma-separated config location URLs
	BackupConfig   []byte            // Raw backup config
	RefreshTimeout time.Duration     // How often to refresh config
	Format         string            // json or yaml
	Global         jobs.GlobalConfig // meant to pass cmdline and other args to every job
}

Config for the job runner

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes jobs according to the (fetched from remote) configuration

func New

func New(cfg *Config, debug bool) (*Runner, error)

New runner according to the config

func (*Runner) Run

func (r *Runner) Run(ctx context.Context)

Run the runner and block until Stop() is called

Directories

Path Synopsis
Package config [used for configuring the package]
Package config [used for configuring the package]

Jump to

Keyboard shortcuts

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