config

package
v6.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigFile             = "/etc/trafficcontrol-cache-config/tm-health-client.json"
	DefaultLogDirectory           = "/var/log/trafficcontrol-cache-config"
	DefaultLogFile                = "tm-health-client.log"
	DefaultTrafficServerConfigDir = "/opt/trafficserver/etc/trafficserver"
	DefaultTrafficServerBinDir    = "/opt/trafficserver/bin"
	DefaultTmUpdateCycles         = 10
)

Variables

This section is empty.

Functions

func GetRequestTimeout

func GetRequestTimeout() time.Duration

func GetTMPollingInterval

func GetTMPollingInterval() time.Duration

func GetTrafficMonitors

func GetTrafficMonitors(cfg *Cfg) error

func LoadConfig

func LoadConfig(cfg *Cfg) (bool, error)

func ReadCredentials

func ReadCredentials(cfg *Cfg) error

func UpdateConfig

func UpdateConfig(cfg *Cfg, newCfg *Cfg)

func Usage

func Usage()

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
	TOUrl                   string
	TOUser                  string
	TmPollIntervalSeconds   string          `json:"tm-poll-interval-seconds"`
	TmUpdateCycles          int             `json:"tm-update-cycles"`
	TrafficServerConfigDir  string          `json:"trafficserver-config-dir"`
	TrafficServerBinDir     string          `json:"trafficserver-bin-dir"`
	TrafficMonitors         map[string]bool `json:"trafficmonitors,omitempty"`
	HealthClientConfigFile  util.ConfigFile
}

func GetConfig

func GetConfig() (Cfg, error, bool)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL