Documentation ¶
Index ¶
- Variables
- type Config
- type ConfigBuilder
- func (cb *ConfigBuilder) Build() (Config, error)
- func (cb *ConfigBuilder) FromYAML(yamlFilename string) *ConfigBuilder
- func (cb *ConfigBuilder) WithDefaultConnection(cnx tasks.Connection) *ConfigBuilder
- func (cb *ConfigBuilder) WithLogfile(filename string) *ConfigBuilder
- func (cb *ConfigBuilder) WithMaxWorkers(value int) *ConfigBuilder
- func (cb *ConfigBuilder) WithTask(task YamlTask) *ConfigBuilder
- func (cb *ConfigBuilder) WithYAML(yamlString string) *ConfigBuilder
- type YamlLoader
- type YamlTask
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigWorkersDefault int = 2
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DeclaredTasks []YamlTask `yaml:"tasks"` MaxWorkers int `yaml:"workers"` Logfile string `yaml:"logfile"` Connections tasks.Connections `yaml:"connections"` DefaultConnection tasks.Connection }
func (*Config) ConfigureConnections ¶
func (c *Config) ConfigureConnections()
func (*Config) ConfigureWorkers ¶
func (c *Config) ConfigureWorkers()
type ConfigBuilder ¶
type ConfigBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶ added in v0.6.1
func NewBuilder() *ConfigBuilder
func (*ConfigBuilder) Build ¶
func (cb *ConfigBuilder) Build() (Config, error)
func (*ConfigBuilder) FromYAML ¶
func (cb *ConfigBuilder) FromYAML(yamlFilename string) *ConfigBuilder
func (*ConfigBuilder) WithDefaultConnection ¶
func (cb *ConfigBuilder) WithDefaultConnection(cnx tasks.Connection) *ConfigBuilder
func (*ConfigBuilder) WithLogfile ¶
func (cb *ConfigBuilder) WithLogfile(filename string) *ConfigBuilder
func (*ConfigBuilder) WithMaxWorkers ¶
func (cb *ConfigBuilder) WithMaxWorkers(value int) *ConfigBuilder
func (*ConfigBuilder) WithTask ¶
func (cb *ConfigBuilder) WithTask(task YamlTask) *ConfigBuilder
func (*ConfigBuilder) WithYAML ¶
func (cb *ConfigBuilder) WithYAML(yamlString string) *ConfigBuilder
type YamlLoader ¶ added in v0.6.1
type YamlTask ¶
type YamlTask struct { ID int `yaml:"id"` Type string `yaml:"type,omitempty"` Name string `yaml:"name,omitempty"` Command string `yaml:"command"` File string `yaml:"file"` URI string `yaml:"uri,omitempty"` Connection string `yaml:"connection,omitempty"` Depends []int `yaml:"depends_on,omitempty"` Loader YamlLoader `yaml:"loaded,omitempty"` }
Click to show internal directories.
Click to hide internal directories.