getdata

package
v5.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 14 Imported by: 0

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

View Source
const SystemInfoParamConfigFile = `global`

Variables

This section is empty.

Functions

func GetDataFuncs

func GetDataFuncs() map[string]func(config.TCCfg, io.Writer) error

func SetQueueRevalStatuses

func SetQueueRevalStatuses(cfg config.TCCfg) error

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

func WriteChkconfig(cfg config.TCCfg, output io.Writer) error

WriteChkconfig writes the chkconfig for cfg.CacheHostName to output. Note this is identical to /ort/serverName/chkconfig.

func WriteData

func WriteData(cfg config.TCCfg) error

func WritePackages

func WritePackages(cfg config.TCCfg, output io.Writer) error

WriteORTServerPackages writes the packages for serverName to output. Note this is identical to /ort/serverName/packages.

func WriteServerUpdateStatus

func WriteServerUpdateStatus(cfg config.TCCfg, output io.Writer) error

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

func WriteStatuses(cfg config.TCCfg, output io.Writer) error

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

func WriteSystemInfo(cfg config.TCCfg, output io.Writer) error

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

type ChkConfigEntry struct {
	Name string `json:"name"`
	Val  string `json:"value"`
}

func GetChkconfig

func GetChkconfig(cfg config.TCCfg) ([]ChkConfigEntry, error)

type Package

type Package struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

func GetPackages

func GetPackages(cfg config.TCCfg) ([]Package, error)

Jump to

Keyboard shortcuts

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