Documentation
¶
Index ¶
- Variables
- func CacheConfigs() *cache.CacheConfigs
- func CenterHost() string
- func ClusterConfigs() *gzkwrapper.WorkerArgs
- func LoggerConfigs() *logger.Args
- func New(file string) error
- func PidFile() string
- func RetryStartup() bool
- func SaveServerConfig(data []byte) error
- func UseServerConfig() bool
- func WebSiteHost() string
- type Configuration
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrConfigFileNotFound is exported ErrConfigFileNotFound = errors.New("config file not found") //ErrConfigGenerateFailure is exported ErrConfigGenerateFailure = errors.New("config file generated failure") //ErrConfigFormatInvalid is exported ErrConfigFormatInvalid = errors.New("config file format invalid") //ErrConfigServerDataInvalid is exported ErrConfigServerDataInvalid = errors.New("config server data invalid") )
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Version string `yaml:"version" json:"version"` PidFile string `yaml:"pidfile" json:"pidfile"` RetryStartup bool `yaml:"retrystartup" json:"retrystartup"` UseServerConfig bool `yaml:"useserverconfig" json:"useserverconfig"` CenterHost string `yaml:"centerhost" json:"centerhost"` WebsiteHost string `yaml:"websitehost" json:"websitehost"` Cluster struct { Hosts string `yaml:"hosts" json:"hosts"` Root string `yaml:"root" json:"root"` Device string `yaml:"device" json:"device"` Runtime string `yaml:"runtime" json:"runtime"` OS string `yaml:"os" json:"os"` Platform string `yaml:"platform" json:"platform"` Pulse string `yaml:"pulse" json:"pulse"` Threshold int `yaml:"threshold" json:"threshold"` } `yaml:"cluster" json:"cluster"` API struct { Hosts []string `yaml:"hosts" json:"hosts"` EnableCors bool `yaml:"enablecors" json:"enablecors"` } `yaml:"api" json:"api"` Cache struct { MaxJobs int `yaml:"maxjobs" json:"maxjobs"` SaveDirectory string `yaml:"savedirectory" json:"savedirectory"` AutoClean bool `yaml:"autoclean" json:"autoclean"` CleanInterval string `yaml:"cleaninterval" json:"cleaninterval"` PullRecovery string `yaml:"pullrecovery" json:"pullrecovery"` } `yaml:"cache" json:"cache"` Logger struct { LogFile string `yaml:"logfile" json:"logfile"` LogLevel string `yaml:"loglevel" json:"loglevel"` LogSize int64 `yaml:"logsize" json:"logsize"` } `yaml:"logger" json:"logger"` }
Configuration is exported
var ( //SystemConfig is exported, global config object. SystemConfig *Configuration )
Click to show internal directories.
Click to hide internal directories.