Documentation ¶
Overview ¶
Package toreqold calls the previous Traffic Ops API major version.
This should never be imported by anything except toreq.
The toreq.Client will automatically fall back to the older client if necessary.
Index ¶
- Constants
- type TOClient
- func (cl *TOClient) APIVersion() string
- func (cl *TOClient) GetCDN(cdnName tc.CDNName) (tc.CDN, toclientlib.ReqInf, error)
- func (cl *TOClient) GetCDNDeliveryServices(cdnID int) ([]atscfg.DeliveryService, toclientlib.ReqInf, error)
- func (cl *TOClient) GetCDNSSLKeys(cdnName tc.CDNName) ([]tc.CDNSSLKeys, toclientlib.ReqInf, error)
- func (cl *TOClient) GetCDNs() ([]tc.CDN, toclientlib.ReqInf, error)
- func (cl *TOClient) GetCacheGroups() ([]tc.CacheGroupNullable, toclientlib.ReqInf, error)
- func (cl *TOClient) GetConfigFileParameters(configFile string) ([]tc.Parameter, toclientlib.ReqInf, error)
- func (cl *TOClient) GetDeliveryServiceRegexes() ([]tc.DeliveryServiceRegexes, toclientlib.ReqInf, error)
- func (cl *TOClient) GetDeliveryServiceRequiredCapabilitiesByID(dsIDs []int) (map[int]map[atscfg.ServerCapability]struct{}, toclientlib.ReqInf, error)
- func (cl *TOClient) GetDeliveryServiceServers(dsIDs []int, serverIDs []int) ([]tc.DeliveryServiceServer, toclientlib.ReqInf, error)
- func (cl *TOClient) GetGlobalParameters() ([]tc.Parameter, toclientlib.ReqInf, error)
- func (cl *TOClient) GetJobs() ([]tc.Job, toclientlib.ReqInf, error)
- func (cl *TOClient) GetParametersByName(paramName string) ([]tc.Parameter, toclientlib.ReqInf, error)
- func (cl *TOClient) GetProfileByName(profileName string) (tc.Profile, toclientlib.ReqInf, error)
- func (cl *TOClient) GetServerByHostName(serverHostName string) (*atscfg.Server, toclientlib.ReqInf, error)
- func (cl *TOClient) GetServerCapabilitiesByID(serverIDs []int) (map[int]map[atscfg.ServerCapability]struct{}, toclientlib.ReqInf, error)
- func (cl *TOClient) GetServerProfileParameters(profileName string) ([]tc.Parameter, toclientlib.ReqInf, error)
- func (cl *TOClient) GetServerUpdateStatus(cacheHostName tc.CacheName) (atscfg.ServerUpdateStatus, toclientlib.ReqInf, error)
- func (cl *TOClient) GetServers() ([]atscfg.Server, toclientlib.ReqInf, error)
- func (cl *TOClient) GetStatuses() ([]tc.Status, toclientlib.ReqInf, error)
- func (cl *TOClient) GetTopologies() ([]tc.Topology, toclientlib.ReqInf, error)
- func (cl *TOClient) GetURISigningKeys(dsName string) ([]byte, toclientlib.ReqInf, error)
- func (cl *TOClient) GetURLSigKeys(dsName string) (tc.URLSigKeys, toclientlib.ReqInf, error)
- func (cl *TOClient) HTTPClient() *http.Client
- func (cl *TOClient) SetServerUpdateStatus(cacheHostName tc.CacheName, updateStatus *bool, revalStatus *bool) (toclientlib.ReqInf, error)
- func (cl *TOClient) SetURL(newURL string)
- func (cl *TOClient) URL() string
Constants ¶
const DeliveryServiceServersAlwaysGetAll = true
DeliveryServiceServersAlwaysGetAll indicates whether to always get all delivery service servers from Traffic Ops, and cache all in a file (but still return to the caller only the objects they requested). This exists and is currently true, because with an ORT run, it's typically more efficient to get them all in a single request, and re-use that cache; than for every config file to get and cache its own unique set. If your use case is more efficient to only get the needed objects, for example if you're frequently requesting one file, set this false to get and cache the specific needed delivery services and servers.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TOClient ¶
type TOClient struct { NumRetries int // contains filtered or unexported fields }
func New ¶
func New(url *url.URL, user string, pass string, insecure bool, timeout time.Duration, userAgent string) (*TOClient, error)
New logs into Traffic Ops, returning the TOClient which contains the logged-in client.
func (*TOClient) APIVersion ¶
func (*TOClient) GetCDN ¶
func (cl *TOClient) GetCDN(cdnName tc.CDNName) (tc.CDN, toclientlib.ReqInf, error)
func (*TOClient) GetCDNDeliveryServices ¶
func (cl *TOClient) GetCDNDeliveryServices(cdnID int) ([]atscfg.DeliveryService, toclientlib.ReqInf, error)
GetCDNDeliveryServices returns the data, the Traffic Ops address, and any error.
func (*TOClient) GetCDNSSLKeys ¶
func (cl *TOClient) GetCDNSSLKeys(cdnName tc.CDNName) ([]tc.CDNSSLKeys, toclientlib.ReqInf, error)
func (*TOClient) GetCacheGroups ¶
func (cl *TOClient) GetCacheGroups() ([]tc.CacheGroupNullable, toclientlib.ReqInf, error)
func (*TOClient) GetConfigFileParameters ¶
func (cl *TOClient) GetConfigFileParameters(configFile string) ([]tc.Parameter, toclientlib.ReqInf, error)
func (*TOClient) GetDeliveryServiceRegexes ¶
func (cl *TOClient) GetDeliveryServiceRegexes() ([]tc.DeliveryServiceRegexes, toclientlib.ReqInf, error)
func (*TOClient) GetDeliveryServiceRequiredCapabilitiesByID ¶
func (*TOClient) GetDeliveryServiceServers ¶
func (*TOClient) GetGlobalParameters ¶
func (cl *TOClient) GetGlobalParameters() ([]tc.Parameter, toclientlib.ReqInf, error)
func (*TOClient) GetParametersByName ¶
func (cl *TOClient) GetParametersByName(paramName string) ([]tc.Parameter, toclientlib.ReqInf, error)
func (*TOClient) GetProfileByName ¶
func (cl *TOClient) GetProfileByName(profileName string) (tc.Profile, toclientlib.ReqInf, error)
func (*TOClient) GetServerByHostName ¶
func (cl *TOClient) GetServerByHostName(serverHostName string) (*atscfg.Server, toclientlib.ReqInf, error)
func (*TOClient) GetServerCapabilitiesByID ¶
func (*TOClient) GetServerProfileParameters ¶
func (cl *TOClient) GetServerProfileParameters(profileName string) ([]tc.Parameter, toclientlib.ReqInf, error)
func (*TOClient) GetServerUpdateStatus ¶
func (cl *TOClient) GetServerUpdateStatus(cacheHostName tc.CacheName) (atscfg.ServerUpdateStatus, toclientlib.ReqInf, error)
GetServerUpdateStatus returns the data, the Traffic Ops address, and any error.
func (*TOClient) GetServers ¶
func (cl *TOClient) GetServers() ([]atscfg.Server, toclientlib.ReqInf, error)
func (*TOClient) GetStatuses ¶
func (cl *TOClient) GetStatuses() ([]tc.Status, toclientlib.ReqInf, error)
func (*TOClient) GetTopologies ¶
func (cl *TOClient) GetTopologies() ([]tc.Topology, toclientlib.ReqInf, error)
GetTopologies returns the data, the Traffic Ops address, and any error.
func (*TOClient) GetURISigningKeys ¶
func (*TOClient) GetURLSigKeys ¶
func (cl *TOClient) GetURLSigKeys(dsName string) (tc.URLSigKeys, toclientlib.ReqInf, error)
func (*TOClient) HTTPClient ¶
func (*TOClient) SetServerUpdateStatus ¶
func (cl *TOClient) SetServerUpdateStatus(cacheHostName tc.CacheName, updateStatus *bool, revalStatus *bool) (toclientlib.ReqInf, error)
SetServerUpdateStatus sets the server's update status in Traffic Ops.