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 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 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"` 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.