Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ReadyCondition is used to indicate that Nodes and Pods are ready. ReadyCondition = Condition{ Type: "Ready", Status: "True", } // SucceededCondition is used to indicate that Pods have completed successfully and returned no errors. SucceededCondition = Condition{ Type: "Succeeded", Status: "True", } // FailedCondition is used to indicate that Pods have failed. FailedCondition = Condition{ Type: "Failed", Status: "True", } // HasIPStatusCondition is used to indicate that pods have ips available. HasIPStatusCondition = Condition{ Type: "HasIPStatus", Status: "True", } )
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource interface {
// Name returns the name of the resource
Name() string
// Selector returns the resource's Selector.
Selector() Selector
// Namespace returns the namespace where the resource lives in.
Namespace() string
}
Resource groups a set of method to identify a resource in a cluster.
func NewResource ¶
NewResource initializes a new resource.Resource using a kubernetes service implementation.
type Selector ¶
type Selector interface {
// String returns the selector represented in string format.
String() string
// Map returns the underlying selector's map.
Map() map[string]string
// Extend extends the underlying base map with the extension selector.
// NOTE: If a certain key already exists in the base map, it will be overwritten by the extension value.
Extend(extension Selector) Selector
// Set sets the given value to the given key. If the key already exists, it will be overwritten.
Set(key string, value string)
// Get gets the value at the given key. If the key doesn't exist, an empty value will be returned.
Get(key string) string
}
Selector is used to identify a certain resource.
func NewSelector ¶
NewSelector initializes a new Selector from the given map. If `nil` is passed as input, an empty selector will be returned.
Click to show internal directories.
Click to hide internal directories.