Documentation ¶
Overview ¶
package getdata gets and posts non-config data from Traffic Ops which is related to config generation and needed by ORT. For example, the --get-data, --set-queue-status, and --set-reval-status arguments.
Index ¶
- Constants
- func GetDataFuncs() map[string]func(config.TCCfg, io.Writer) error
- func SetQueueRevalStatuses(cfg config.TCCfg) error
- func SetUpdateStatus(cfg config.TCCfg, serverName tc.CacheName, queue bool, revalPending bool) error
- func WriteChkconfig(cfg config.TCCfg, output io.Writer) error
- func WriteData(cfg config.TCCfg) error
- func WritePackages(cfg config.TCCfg, output io.Writer) error
- func WriteServerUpdateStatus(cfg config.TCCfg, output io.Writer) error
- func WriteStatuses(cfg config.TCCfg, output io.Writer) error
- func WriteSystemInfo(cfg config.TCCfg, output io.Writer) error
- type ChkConfigEntry
- type Package
Constants ¶
const SystemInfoParamConfigFile = `global`
Variables ¶
This section is empty.
Functions ¶
func SetQueueRevalStatuses ¶
func SetUpdateStatus ¶
func SetUpdateStatus(cfg config.TCCfg, serverName tc.CacheName, queue bool, revalPending bool) error
SetUpdateStatus sets the queue and reval status of serverName in Traffic Ops.
func WriteChkconfig ¶
WriteChkconfig writes the chkconfig for cfg.CacheHostName to output. Note this is identical to /ort/serverName/chkconfig.
func WritePackages ¶
WriteORTServerPackages writes the packages for serverName to output. Note this is identical to /ort/serverName/packages.
func WriteServerUpdateStatus ¶
WriteUpdateStatus writes the Traffic Ops server update status to output. Note this is identical to /api/1.x/servers/name/update_status except it omits the '[]' wrapper.
func WriteStatuses ¶
WriteStatuses writes the Traffic Ops statuses to output. Note this is identical to /api/1.x/statuses except it omits the '{response:' wrapper.
func WriteSystemInfo ¶
WriteSystemInfo writes the "system info" to output.
This is the same info at /api/1.x/system/info, which is actually just all Parameters with the config_file 'global'. Note this is different than the more common "global parameters", which usually refers to all Parameters on the Profile named 'GLOBAL'.
This is identical to the /api/1.x/system/info endpoint, except it does not include a '{response: {parameters:' wrapper.
Types ¶
type ChkConfigEntry ¶
func GetChkconfig ¶
func GetChkconfig(cfg config.TCCfg) ([]ChkConfigEntry, error)