runner

package
v0.0.0-...-b89fbfb Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 14 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 ConfigOptions

type ConfigOptions struct {
	PathsCSV       string        // Comma-separated config location URLs
	BackupConfig   string        // Raw backup config
	Format         string        // json or yaml
	RefreshTimeout time.Duration // How often to refresh config
}

ConfigOptions for fetching job configs for the runner

func NewConfigOptionsWithFlags

func NewConfigOptionsWithFlags() *ConfigOptions

NewConfigOptionsWithFlags returns ConfigOptions initialized with command line flags.

type Runner

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

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

func New

func New(cfgOptions *ConfigOptions, globalJobsCfg *jobs.GlobalConfig) (*Runner, error)

New runner according to the config

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, logger *zap.Logger)

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