sites

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachingClient

type CachingClient struct {
	Project  string
	Siteinfo *siteinfo.Client
	Sites    map[string][]string
	// contains filtered or unexported fields
}

CachingClient implements the maintenancestate.Sites interface.

func New

func New(project string) *CachingClient

func (*CachingClient) Machines

func (cc *CachingClient) Machines(site string) ([]string, error)

Machines takes a short site name parameter (e.g. abc02), and will return the machines (e.g., mlab1, mlab2) that the site contains.

func (*CachingClient) Reload

func (cc *CachingClient) Reload(ctx context.Context) error

Reload reloads CachingClient.Sites with fresh data from the siteinfo API. It is meant to be run periodically in some sort of loop.

Jump to

Keyboard shortcuts

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