Documentation ¶
Index ¶
- func CloneMap(src map[string]interface{}) map[string]interface{}
- func CopyMap(src, dest map[string]interface{})
- func GetBool(dict map[string]interface{}, key string) (bool, error)
- func GetBoolOrDefault(dict map[string]interface{}, key string, defaultValue bool) (bool, error)
- func GetDuration(dict map[string]interface{}, key string) (time.Duration, error)
- func GetDurationOrDefault(dict map[string]interface{}, key string, defaultValue time.Duration) (time.Duration, error)
- func GetFloat64(dict map[string]interface{}, key string) (float64, error)
- func GetFloat64OrDefault(dict map[string]interface{}, key string, defaultValue float64) (float64, error)
- func GetInt(dict map[string]interface{}, key string) (int, error)
- func GetIntOrDefault(dict map[string]interface{}, key string, defaultValue int) (int, error)
- func GetMap(dict map[string]interface{}, key string) (map[string]interface{}, error)
- func GetMasterIPs(c clientset.Interface, addressType corev1.NodeAddressType) ([]string, error)
- func GetMasterName(c clientset.Interface) (string, error)
- func GetSchedulableUntainedNodes(c clientset.Interface) ([]corev1.Node, error)
- func GetSchedulableUntainedNodesNumber(c clientset.Interface) (int, error)
- func GetString(dict map[string]interface{}, key string) (string, error)
- func GetStringOrDefault(dict map[string]interface{}, key string, defaultValue string) (string, error)
- func IsErrKeyNotFound(err error) bool
- func IsNodeSchedulableAndUntainted(node *corev1.Node) bool
- func LogClusterNodes(c clientset.Interface) error
- func PrettyPrintJSON(data interface{}) (string, error)
- func RandomDNS1123String(length int) string
- func SSH(command string, node *v1.Node, stdin io.Reader) error
- type ErrKeyNotFound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyMap ¶
func CopyMap(src, dest map[string]interface{})
CopyMap copies values from one map to the other.
func GetBool ¶
GetBool tries to return value from map cast to bool type. If value doesn't exist, error is returned.
func GetBoolOrDefault ¶
GetBoolOrDefault tries to return value from map cast to bool type. If value doesn't exist default value is used.
func GetDuration ¶
GetDuration tries to return value from map cast to duration type. If value doesn't exist, error is returned.
func GetDurationOrDefault ¶
func GetDurationOrDefault(dict map[string]interface{}, key string, defaultValue time.Duration) (time.Duration, error)
GetDurationOrDefault tries to return value from map cast to duration type. If value doesn't exist default value is used.
func GetFloat64 ¶
GetFloat64 tries to return value from map cast to float64 type. If value doesn't exist, error is returned.
func GetFloat64OrDefault ¶
func GetFloat64OrDefault(dict map[string]interface{}, key string, defaultValue float64) (float64, error)
GetFloat64OrDefault tries to return value from map cast to float64 type. If value doesn't exist default value is used.
func GetInt ¶
GetInt tries to return value from map cast to int type. If value doesn't exist, error is returned.
func GetIntOrDefault ¶
GetIntOrDefault tries to return value from map cast to int type. If value doesn't exist default value is used.
func GetMap ¶
GetMap tries to return value from map of type map. If value doesn't exist, error is returned.
func GetMasterIPs ¶
GetMasterIPs returns master node ips of the given type.
func GetMasterName ¶
GetMasterName returns master node name.
func GetSchedulableUntainedNodes ¶
GetSchedulableUntainedNodes returns nodes in the cluster.
func GetSchedulableUntainedNodesNumber ¶
GetSchedulableUntainedNodesNumber returns number of nodes in the cluster.
func GetString ¶
GetString tries to return value from map cast to string type. If value doesn't exist, error is returned.
func GetStringOrDefault ¶
func GetStringOrDefault(dict map[string]interface{}, key string, defaultValue string) (string, error)
GetStringOrDefault tries to return value from map cast to string type. If value doesn't exist default value is used.
func IsErrKeyNotFound ¶
IsErrKeyNotFound returns true only if error type is ErrKeyNotFound.
func IsNodeSchedulableAndUntainted ¶
IsNodeSchedulableAndUntainted returns true whether node is schedulable and untainted.
func LogClusterNodes ¶
LogClusterNodes prints nodes information (name, internal ip, external ip) to log.
func PrettyPrintJSON ¶
PrettyPrintJSON converts given data into formatted json.
func RandomDNS1123String ¶
RandomDNS1123String generates random string of a given length.
Types ¶
type ErrKeyNotFound ¶
type ErrKeyNotFound struct {
// contains filtered or unexported fields
}
ErrKeyNotFound is returned when key doesn't exists in a map.
func (*ErrKeyNotFound) Error ¶
func (e *ErrKeyNotFound) Error() string
Erros is an error interface implementation.