Documentation
¶
Index ¶
Constants ¶
View Source
const ( //Init happens before handshake AfterInit = After("init") //Core happens with core is up and running (also networking) AfterNet = After("net") //Default for startup commands that doesn't specify dependency AfterBoot = After("boot") ToTheEnd = After("----") )
View Source
const (
//ConfigSuffix config file ext
ConfigSuffix = ".toml"
)
Variables ¶
Functions ¶
func LoadSettings ¶
GetSettings loads main settings from a filename
Types ¶
type AppSettings ¶
type AppSettings struct { Main struct { MaxJobs int Include []string Network string LogLevel string } Globals Globals Sink map[string]SinkConfig Extension map[string]Extension Logging map[string]Logger Stats struct { //Interval is deprecated Interval int Redis struct { Enabled bool FlushInterval int //in seconds Address string } } }
Settings main agent settings
var Settings AppSettings
func (*AppSettings) GetIncludedSettings ¶
func (s *AppSettings) GetIncludedSettings() (partial *IncludedSettings, errors []error)
GetPartialSettings loads partial settings according to main configurations
func (*AppSettings) Validate ¶
func (s *AppSettings) Validate() []error
type Extension ¶
type Extension struct { //binary to execute Binary string //script search path Cwd string //(optional) Env variables Env map[string]string Args []string // contains filtered or unexported fields }
Extension cmd config
type IncludedSettings ¶
func (*IncludedSettings) GetStartupTree ¶
func (i *IncludedSettings) GetStartupTree() (StartupTree, []error)
type Logger ¶
type Logger struct { //logger type, now only 'db' and 'ac' are supported Type string //list of controlles base URLs Controllers []string //Process which levels Levels []int //Log address (for loggers that needs it) Address string //Flush interval (for loggers that needs it) FlushInt int //Flush batch size (for loggers that needs it) BatchSize int }
Logger settings
type Security ¶
type Security struct { CertificateAuthority string ClientCertificate string ClientCertificateKey string }
Security certificate path
type SinkConfig ¶
Controller url and certificates
type Startup ¶
type Startup struct { After []string RunningDelay int RunningMatch string RecurringPeriod int MaxRestart int Name string Args map[string]interface{} // contains filtered or unexported fields }
StartupCmd startup command config
type StartupSlice ¶
type StartupSlice []Startup
type StartupTree ¶
type StartupTree interface { //Services a list of sorted startup services based on service weights. Services() []Startup //Slice gets a slice of the sorted start up processes that are lying between a //certain weight range. e can be set to -1 which means (end of list) //[s, e[ Slice(s, e int64) StartupSlice }
Click to show internal directories.
Click to hide internal directories.