Documentation
¶
Index ¶
- Constants
- func GetRequestTimeout() time.Duration
- func GetTMPollingInterval() time.Duration
- func GetTOLoginDispersion(dispersionFactor int) time.Duration
- func GetTrafficMonitors(cfg *Cfg) error
- func LoadConfig(cfg *Cfg) (bool, error)
- func ReadCredentials(cfg *Cfg, updating bool) error
- func UpdateConfig(cfg *Cfg, newCfg *Cfg)
- func Usage()
- type Cfg
- type LogCfg
Constants ¶
View Source
const ( DefaultPollStateJSONLog = "/var/log/trafficcontrol/poll-state.json" DefaultConfigFile = "/etc/trafficcontrol/tc-health-client.json" DefaultLogDirectory = "/var/log/trafficcontrol" DefaultLogFile = "tc-health-client.log" DefaultTOLoginDispersionFactor = 90 DefaultTrafficServerConfigDir = "/opt/trafficserver/etc/trafficserver" DefaultTrafficServerBinDir = "/opt/trafficserver/bin" DefaultMarkupPollThreshold = 1 )
Variables ¶
This section is empty.
Functions ¶
func GetRequestTimeout ¶
func GetTMPollingInterval ¶
func GetTOLoginDispersion ¶
func GetTrafficMonitors ¶
func LoadConfig ¶
func ReadCredentials ¶
*
- ReadCredentials *
- cfg - the existing config
- updating - when true, existing credentials may be updated from the credential file
func UpdateConfig ¶
Types ¶
type Cfg ¶
type Cfg struct {
CDNName string `json:"cdn-name"`
EnableActiveMarkdowns bool `json:"enable-active-markdowns"`
ReasonCode string `json:"reason-code"`
TOCredentialFile string `json:"to-credential-file"`
TORequestTimeOutSeconds string `json:"to-request-timeout-seconds"`
TOPass string `json:"to-pass"`
TOUrl string `json:"to-url"`
TOUser string `json:"to-user"`
TmProxyURL string `json:"tm-proxy-url"`
TmPollIntervalSeconds string `json:"tm-poll-interval-seconds"`
TOLoginDispersionFactor int `json:"to-login-dispersion-factor"`
MarkUpPollThreshold int `json:"markup-poll-threshold"`
TrafficServerConfigDir string `json:"trafficserver-config-dir"`
TrafficServerBinDir string `json:"trafficserver-bin-dir"`
PollStateJSONLog string `json:"poll-state-json-log"`
EnablePollStateLog bool `json:"enable-poll-state-log"`
TrafficMonitors map[string]bool `json:"trafficmonitors,omitempty"`
HealthClientConfigFile util.ConfigFile
CredentialFile util.ConfigFile
ParsedProxyURL *url.URL
}
type LogCfg ¶
type LogCfg struct {
LogLocationErr string
LogLocationDebug string
LogLocationInfo string
LogLocationWarn string
}
func (LogCfg) DebugLog ¶
func (lcfg LogCfg) DebugLog() log.LogLocation
func (LogCfg) ErrorLog ¶
func (lcfg LogCfg) ErrorLog() log.LogLocation
func (LogCfg) EventLog ¶
func (lcfg LogCfg) EventLog() log.LogLocation
func (LogCfg) InfoLog ¶
func (lcfg LogCfg) InfoLog() log.LogLocation
func (LogCfg) WarningLog ¶
func (lcfg LogCfg) WarningLog() log.LogLocation
Click to show internal directories.
Click to hide internal directories.