Documentation ¶
Overview ¶
Package status implements the status command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
API defines the subset of fields returned from a taskcluster api definition, that are required to determine the service's name and ping endpoint.
See https://docs.taskcluster.net/manual/integrations/tools/references#api-references for more information.
type APIEntry ¶
APIEntry defines the subset of fields in a specific taskcluster api endpoint (such as ping) for establishing the endpoint name (function) and url path
See https://docs.taskcluster.net/manual/integrations/tools/references#api-references for more information.
type CachedURLs ¶
type CachedURLs struct { LastUpdated time.Time `json:"lastUpdated"` PingURLs PingURLs `json:"pingURLs"` }
CachedURLs defines the json data format of the cache.json file used for caching the ping urls (see above)
func ReadCachedURLsFile ¶
func ReadCachedURLsFile(cache *configdir.Config, cachePath string) (cachedURLs *CachedURLs, err error)
ReadCachedURLsFile returns a *CachedURLs based on the contents of the file with the given path.
type PingResponse ¶
PingResponse defines the data format of the http response from the ping url endpoints
type PingURLs ¶
PingURLs maps a service name (e.g. "queue") to the http ping endpoint of that service
func NewPingURLs ¶
NewPingURLs returns the ping URLs to use. The caller does not need to be concerned about whether these URLs are retrieved from a local cache, or from querying web services.
func RefreshCache ¶
func RefreshCache(manifestURL string, cache *configdir.Config, cachePath string) (pingURLs PingURLs, err error)
RefreshCache will scrape the manifest url for a dictionary of taskcluster services, and cache the results in file at path.
func ScrapePingURLs ¶
ScrapePingURLs queries manifestURL to return a manifest of services, which are then queried to fetch ping URLs for taskcluster services
func (PingURLs) Cache ¶
func (p PingURLs) Cache(cache *configdir.Config, cachePath string) (cachedURLs *CachedURLs, err error)
Cache writes the pingURLs p to a file at path (replacing if it exists already, and creating parent folders, if required), using the current time for the retrieval timestamp.