Documentation
¶
Index ¶
- Constants
- func HasAnyKey(labels map[string]string, filters map[string]string) bool
- func LabelsMatch(labels map[string]string, filter map[string]string) bool
- func NewLabelValue() (string, error)
- func RemoveLabels(client Client, cluster *Cluster, removeLabels []string) (map[string]string, error)
- type Client
- type Cluster
Constants ¶
View Source
const ( // EnvGKEProject the environment variable for the GKE project EnvGKEProject = "GKE_PROJECT" // EnvGKERegion the environment variable for the GKE region EnvGKERegion = "GKE_REGION" )
Variables ¶
This section is empty.
Functions ¶
func LabelsMatch ¶
LabelsMatch returns true if the filter labels are contained in the label map
func NewLabelValue ¶
NewLabelValue returns a cluster safe unique label we can use for locking
Types ¶
type Client ¶
type Client interface {
// List lists the clusters in the current context - which is usually a project or user id etc
List() ([]*Cluster, error)
// ListFilter lists the clusters with the matching label filters
ListFilter(strings map[string]string) ([]*Cluster, error)
// Connect connects to the given cluster - returning an error if the connection cannot be made
Connect(cluster *Cluster) error
// String returns a text representation of the client
String() string
// SetClusterLabels adds labels to the given cluster
SetClusterLabels(cluster *Cluster, labels map[string]string) error
// Get looks up a given cluster by name returning nil if its not found
Get(name string) (*Cluster, error)
Delete(cluster *Cluster) error
}
Client represents a kubernetes cluster provider
type Cluster ¶
Cluster represents a cluster
func GetCluster ¶
GetCluster gets a cluster by listing the clusters
func ListFilter ¶
ListFilter lists the clusters with a filter
Click to show internal directories.
Click to hide internal directories.