Documentation ¶
Index ¶
- func ConfigGetMinDiskSpaceScratch() uint64
- func ConvertLevelStringToUint32Mask(levels string) uint32
- func ConvertTagStringToUint32(tag string) uint32
- func GetGlobalConfigDictionary() (ret *templates.TemplateVarDictionary)
- func GetInterpolatedConfigString(s string) string
- type ConfigError
- type DebugOptions
- type LogFilter
- type LogFormat
- type LogRotate
- type LogTarget
- type MdnsSetup
- type PlatformReader
- type Plugin
- type RelayMQDriverConfig
- type StaticFileOp
- type SubstVars
- type YAMLMaestroConfig
- func (ysc *YAMLMaestroConfig) FillInDefaults()
- func (ysc *YAMLMaestroConfig) FinalizeConfig()
- func (ysc *YAMLMaestroConfig) GetDBPath() (ret string)
- func (ysc *YAMLMaestroConfig) GetHttpUnixSocket() (ret string)
- func (ysc *YAMLMaestroConfig) GetImagePath() (ret string)
- func (ysc *YAMLMaestroConfig) GetScratchPath() (ret string)
- func (ysc *YAMLMaestroConfig) GetSyslogSocket() (ret string)
- func (ysc *YAMLMaestroConfig) GetUnixLogSocket() (ret string)
- func (ysc *YAMLMaestroConfig) InterpolateAllStrings()
- func (ysc *YAMLMaestroConfig) LoadFromFile(file string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigGetMinDiskSpaceScratch ¶
func ConfigGetMinDiskSpaceScratch() uint64
func ConvertLevelStringToUint32Mask ¶
@param levels is a string of one or more comma separated value for levels, like: "warn, error"
func GetGlobalConfigDictionary ¶
func GetGlobalConfigDictionary() (ret *templates.TemplateVarDictionary)
func GetInterpolatedConfigString ¶
replaces the {{VAR}} macro strings with their appropriate names values Currently the config files supports: {{thisdir}} - the directory where the maestro exec resides {{cwd}} the 'current working directory' of the Maestro process
Types ¶
type ConfigError ¶
type ConfigError struct {
// contains filtered or unexported fields
}
ConfigError is the error type when there is an issue in the config parsing
type DebugOptions ¶
type DebugOptions struct { // PidFile if provided will write a file with the current PID PidFile string `yaml:"pid_file"` // KeepPids if true, will append the PID number instead of truncate and write KeepPids bool `yaml:"keep_pids"` // PidFileDara prints the current date/time next to the pid number in the file upod pid file creation PidFileDates bool `yaml:"pid_file_dates"` }
type LogFilter ¶
type LogFilter struct { Target string `yaml:"target,omitempty"` // target: "default", Levels string `yaml:"levels,omitempty"` Tag string `yaml:"tag,omitempty"` Pre string `yaml:"format_pre,omitempty" greaseAssign:"Format_pre"` Post string `yaml:"format_post,omitempty" greaseAssign:"Format_post"` PostFmtPreMsg string `yaml:"fmt_post_pre_msg,omitempty" greaseAssign:"Format_post_pre_msg"` }
type LogRotate ¶
type LogRotate struct { MaxFiles uint32 `yaml:"max_files,omitempty" greaseAssign:"Max_files"` RotateOnStart bool `yaml:"rotate_on_start,omitempty" greaseAssign:"Rotate_on_start"` MaxFileSize uint32 `yaml:"max_file_size,omitempty" greaseAssign:"Max_file_size"` MaxTotalSize uint64 `yaml:"max_total_size,omitempty" greaseAssign:"Max_total_size"` }
type LogTarget ¶
type LogTarget struct { File string `yaml:"file,omitempty" greaseAssign:"File"` TTY string `yaml:"tty,omitempty" greaseAssign:"TTY"` Format LogFormat `yaml:"format,omitempty"` Filters []LogFilter `yaml:"filters"` Rotate LogRotate `yaml:"rotate,omitempty" greaseAssign:"FileOpts"` ExampleFileOpts greasego.GreaseLibTargetFileOpts `greaseType:"FileOpts"` Delim string `yaml:"delim,omitempty" greaseAssign:"Delim"` FormatPre string `yaml:"format_pre,omitempty" greaseAssign:"Format_pre"` FormatTime string `yaml:"format_time,omitempty" greaseAssign:"Format_time"` FormatLevel string `yaml:"format_level,omitempty" greaseAssign:"Format_level"` FormatTag string `yaml:"format_tag,omitempty" greaseAssign:"Format_tag"` FormatOrigin string `yaml:"format_origin,omitempty" greaseAssign:"Format_origin"` FormatPost string `yaml:"format_post,omitempty" greaseAssign:"Format_post"` FormatPreMsg string `yaml:"format_pre_msg,omitempty" greaseAssign:"Format_pre_msg"` Name string `yaml:"name,omitempty"` Flag_json_escape_strings bool `yaml:"flag_json_escape_strings"` }
type MdnsSetup ¶
type MdnsSetup struct { Disable bool `yaml:"disable"` StaticRecords []*mdns.ConfigEntry `yaml:"static_records"` }
type PlatformReader ¶
type PlatformReader struct { Platform string `yaml:"platform"` // Opts is an optional PluginOpts config Opts *maestroSpecs.PluginOpts `yaml:"opts"` Params map[string]interface{} `yaml:"params,omitempty"` }
type Plugin ¶
type Plugin struct { // Id is an identifier used to call out this generic plugin in the // logging system and in errors. Generic plugins are plugins which are // not a platform or watchdog plugin. Id is like a name ID string `yaml:"id"` // A path to the plugin .so file Path string `yaml:"path"` // Opts is an optional PluginOpts config Opts *maestroSpecs.PluginOpts `yaml:"opts"` }
type RelayMQDriverConfig ¶
type RelayMQDriverConfig struct { // The RootCA option should be a PEM encoded root ca chain // Use this if the server's TLS certificate is not signed // by a certificate authority in the default list. If the // server is signed by a certificate authority in the default // list it can be omitted. // RootCA []byte RootCA string `yaml:"rootCA"` // The ServerName is also only required if the root ca chain // is not in the default list. This option should be omitted // if RootCA is not specified. It should match the common name // of the server's certificate. // ServerName string ServerName string `yaml:"server_name"` // This option can be used in place of the RootCA and ServerName // for servers that are not signed by a well known certificate // authority. It will skip the authentication for the server. It // is not recommended outside of a test environment. // valid values: 'true' 'false' or empty // This value is a string type so that the pre-processor can // assign it in maestro NoValidate string `yaml:"no_validate"` // This is the PEM encoded SSL client certificate. This is required // for all https based client connections. It provides the relay identity // to the server // ClientCertificate []byte ClientCertificate string `yaml:"client_cert"` // This is the PEM encoded SSL client private key. This is required // for all https based client connections. // ClientKey []byte ClientKey string `yaml:"client_key"` // This is the hostname or IP address of the relaymq server Host string `yaml:"host"` // This is the port of the relaymq server Port string `yaml:"port"` // If this flag is set, client library logging will be printed // valid values: 'true' 'false' or empty // This value is a string type so that the pre-processor can // assign it in maestro EnableLogging string `yaml:"logging"` // The prefetch limit describes how many messages can be delivered to // a client without first acknowledging previously received messages // For example, if this is set to 1 then the client would need to // call Ack() on each message they received before another would be // delivered. If this value is omitted or is <= 0 then the prefetch // limit will be set to whatever limit the server defines. The prefetch // limit cannot be greater than the server defined prefetch limit. If // the server is configured with a prefetch limit of 10, then the server // will delivery at most 10 messages to a client without first receiving // an ack for one of those messages PrefetchLimit int `yaml:"pre_fetch_limit"` // This is the queue name that this client should receive messages from. // This queue name is specific to a particular relay. If two relays // subscribe to the same queue name, these will actually be two different // queues QueueName string `yaml:"queue_name"` }
type StaticFileOp ¶
type YAMLMaestroConfig ¶
type YAMLMaestroConfig struct { UnixLogSocket string `yaml:"unixLogSocket"` SyslogSocket string `yaml:"sysLogSocket"` LinuxKernelLog bool `yaml:"linuxKernelLog"` LinuxKernelLogLegacy bool `yaml:"linuxKernelLogLegacy"` // ApiUnixDgramSocket string `yaml:"apiUnixDgramSocket"` // not used yet HttpUnixSocket string `yaml:"httpUnixSocket"` VarDefs []SubstVars `yaml:"var_defs"` RelayMQDriver *RelayMQDriverConfig `yaml:"relaymq"` TimeServer *time.ClientConfig `yaml:"time_server"` Mdns *MdnsSetup `yaml:"mdns"` Watchdog *maestroSpecs.WatchdogConfig `yaml:"watchdog"` Symphony *wwrmi.ClientConfig `yaml:"symphony"` SysStats *sysstats.StatsConfig `yaml:"sys_stats"` Tags []string `yaml:"tags"` Targets []LogTarget `yaml:"targets"` ClientId string `yaml:"clientId"` ConfigDBPath string `yaml:"configDBPath"` // where Maestro should look for it's database Stats maestroSpecs.StatsConfigPayload `yaml:"stats"` JobStarts []maestroSpecs.JobDefinitionPayload `yaml:"jobs"` ContainerTemplates []maestroSpecs.ContainerTemplatePayload `yaml:"container_templates"` ImagePath string `yaml:"imagePath"` // where we should place Job images ScratchPath string `yaml:"scratchPath"` // where we should place temporary file, downloads, etc. StaticFileGenerators []StaticFileOp `yaml:"static_file_generators"` PlatformReaders []PlatformReader `yaml:"platform_readers"` Plugins []Plugin `yaml:"plugins"` ConfigEnd bool `yaml:"config_end"` Network *maestroSpecs.NetworkConfigPayload `yaml:"network"` Processes *configs.ProcessesConfig `yaml:"processes"` DebugOpts *DebugOptions `yaml:"debug_opts"` }
func (*YAMLMaestroConfig) FillInDefaults ¶
func (ysc *YAMLMaestroConfig) FillInDefaults()
FillInDefaults goes through specific parts of the config and puts in defaults if strings were missing or empty.
func (*YAMLMaestroConfig) FinalizeConfig ¶
func (ysc *YAMLMaestroConfig) FinalizeConfig()
FinalizeConfig Interpolates all config strings and fills in defaults
func (*YAMLMaestroConfig) GetDBPath ¶
func (ysc *YAMLMaestroConfig) GetDBPath() (ret string)
func (*YAMLMaestroConfig) GetHttpUnixSocket ¶
func (ysc *YAMLMaestroConfig) GetHttpUnixSocket() (ret string)
func (*YAMLMaestroConfig) GetImagePath ¶
func (ysc *YAMLMaestroConfig) GetImagePath() (ret string)
func (*YAMLMaestroConfig) GetScratchPath ¶
func (ysc *YAMLMaestroConfig) GetScratchPath() (ret string)
func (*YAMLMaestroConfig) GetSyslogSocket ¶
func (ysc *YAMLMaestroConfig) GetSyslogSocket() (ret string)
func (*YAMLMaestroConfig) GetUnixLogSocket ¶
func (ysc *YAMLMaestroConfig) GetUnixLogSocket() (ret string)
func (*YAMLMaestroConfig) InterpolateAllStrings ¶
func (ysc *YAMLMaestroConfig) InterpolateAllStrings()
func (*YAMLMaestroConfig) LoadFromFile ¶
func (ysc *YAMLMaestroConfig) LoadFromFile(file string) error
LoadFromFile load the config file
Click to show internal directories.
Click to hide internal directories.