Documentation ¶
Index ¶
- Variables
- func BuildFromDockerLabels() (*core.Scheduler, error)
- func BuildFromFile(filename string) (*core.Scheduler, error)
- func BuildFromString(config string) (*core.Scheduler, error)
- type Config
- type DaemonCommand
- type ExecJobConfig
- type LocalJobConfig
- type RunJobConfig
- type RunServiceConfig
- type ValidateCommand
Constants ¶
This section is empty.
Variables ¶
View Source
var IsDockerEnv bool
Functions ¶
func BuildFromDockerLabels ¶
BuildFromDockerLabels builds a scheduler using the config from a docker labels
func BuildFromFile ¶
BuildFromFile builds a scheduler using the config from a file
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
Click to show internal directories.
Click to hide internal directories.