Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoContainerWithChadburnEnabled = errors.New("Couldn't find containers with label 'chadburn.enabled=true'")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Global struct { middlewares.SlackConfig `mapstructure:",squash"` middlewares.SaveConfig `mapstructure:",squash"` middlewares.MailConfig `mapstructure:",squash"` middlewares.GotifyConfig `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"` // contains filtered or unexported fields }
Config contains the configuration
func BuildFromFile ¶
BuildFromFile builds a scheduler using the config from a file
func BuildFromString ¶
BuildFromString builds a scheduler using the config from a string
func (*Config) InitializeApp ¶
Call this only once at app init
type DaemonCommand ¶
type DaemonCommand struct { ConfigFile string `long:"config" description:"configuration file" default:"/etc/chadburn.conf"` Logger core.Logger // contains filtered or unexported fields }
DaemonCommand daemon process
func (*DaemonCommand) Execute ¶
func (c *DaemonCommand) Execute(args []string) error
Execute runs the daemon
type DockerHandler ¶
type DockerHandler struct {
// contains filtered or unexported fields
}
func NewDockerHandler ¶
func NewDockerHandler(notifier dockerLabelsUpdate, logger core.Logger) (*DockerHandler, error)
func (*DockerHandler) GetDockerLabels ¶
func (c *DockerHandler) GetDockerLabels() (map[string]map[string]string, error)
func (*DockerHandler) GetInternalDockerClient ¶
func (c *DockerHandler) GetInternalDockerClient() *docker.Client
TODO: Implement an interface so the code does not have to use third parties directly
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"` middlewares.GotifyConfig `mapstructure:",squash"` }
ExecJobConfig contains all configuration params needed to build a ExecJob
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"` middlewares.GotifyConfig `mapstructure:",squash"` }
LocalJobConfig contains all configuration params needed to build a RunJob
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"` middlewares.GotifyConfig `mapstructure:",squash"` }
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"` middlewares.GotifyConfig `mapstructure:",squash"` }
RunServiceConfig contains all configuration params needed to build a RunJob
type ValidateCommand ¶
type ValidateCommand struct { ConfigFile string `long:"config" description:"configuration file" default:"/etc/chadburn.conf"` Logger core.Logger }
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.