cli

package
v0.2.3-0...-20df97a Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsDockerEnv bool

Functions

func BuildFromDockerLabels

func BuildFromDockerLabels() (*core.Scheduler, error)

BuildFromDockerLabels builds a scheduler using the config from a docker labels

func BuildFromFile

func BuildFromFile(filename string) (*core.Scheduler, error)

BuildFromFile builds a scheduler using the config from a file

func BuildFromString

func BuildFromString(config string) (*core.Scheduler, error)

BuildFromString builds a scheduler using the config from a string

Types

type Config

type Config struct {
	Global struct {
		middlewares.SlackConfig `mapstructure:",squash"`
		middlewares.SaveConfig  `mapstructure:",squash"`
		middlewares.MailConfig  `mapstructure:",squash"`
	}
	ExecJobs    map[string]*ExecJobConfig    `gcfg:"job-exec" mapstructure:"job-exec,squash"`
	RunJobs     map[string]*RunJobConfig     `gcfg:"job-run" mapstructure:"job-run,squash"`
	ServiceJobs map[string]*RunServiceConfig `gcfg:"job-service-run" mapstructure:"job-service-run,squash"`
	LocalJobs   map[string]*LocalJobConfig   `gcfg:"job-local" mapstructure:"job-local,squash"`
}

Config contains the configuration

type DaemonCommand

type DaemonCommand struct {
	ConfigFile         string `long:"config" description:"configuration file" default:"/etc/ofelia.conf"`
	DockerLabelsConfig bool   `short:"d" long:"docker" description:"read configurations from docker labels"`
	// contains filtered or unexported fields
}

DaemonCommand daemon process

func (*DaemonCommand) Execute

func (c *DaemonCommand) Execute(args []string) error

Execute runs the daemon

type ExecJobConfig

type ExecJobConfig struct {
	core.ExecJob              `mapstructure:",squash"`
	middlewares.OverlapConfig `mapstructure:",squash"`
	middlewares.SlackConfig   `mapstructure:",squash"`
	middlewares.SaveConfig    `mapstructure:",squash"`
	middlewares.MailConfig    `mapstructure:",squash"`
}

ExecJobConfig contains all configuration params needed to build a ExecJob

func (*ExecJobConfig) GetLabel

func (c *ExecJobConfig) GetLabel() string

func (*ExecJobConfig) GetName

func (c *ExecJobConfig) GetName() string

type LocalJobConfig

type LocalJobConfig struct {
	core.LocalJob             `mapstructure:",squash"`
	middlewares.OverlapConfig `mapstructure:",squash"`
	middlewares.SlackConfig   `mapstructure:",squash"`
	middlewares.SaveConfig    `mapstructure:",squash"`
	middlewares.MailConfig    `mapstructure:",squash"`
}

LocalJobConfig contains all configuration params needed to build a RunJob

func (*LocalJobConfig) GetLabel

func (c *LocalJobConfig) GetLabel() string

type RunJobConfig

type RunJobConfig struct {
	core.RunJob               `mapstructure:",squash"`
	middlewares.OverlapConfig `mapstructure:",squash"`
	middlewares.SlackConfig   `mapstructure:",squash"`
	middlewares.SaveConfig    `mapstructure:",squash"`
	middlewares.MailConfig    `mapstructure:",squash"`
}

func (*RunJobConfig) GetLabel

func (c *RunJobConfig) GetLabel() string

type RunServiceConfig

type RunServiceConfig struct {
	core.RunServiceJob        `mapstructure:",squash"`
	middlewares.OverlapConfig `mapstructure:",squash"`
	middlewares.SlackConfig   `mapstructure:",squash"`
	middlewares.SaveConfig    `mapstructure:",squash"`
	middlewares.MailConfig    `mapstructure:",squash"`
}

RunServiceConfig contains all configuration params needed to build a RunJob

func (*RunServiceConfig) GetLabel

func (c *RunServiceConfig) GetLabel() string

type ValidateCommand

type ValidateCommand struct {
	ConfigFile string `long:"config" description:"configuration file" default:"/etc/ofelia.conf"`
}

ValidateCommand validates the config file

func (*ValidateCommand) Execute

func (c *ValidateCommand) Execute(args []string) error

Execute runs the validation command

Jump to

Keyboard shortcuts

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