util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmRunningInTest

func AmRunningInTest() bool

AmRunningInTest returns true if this binary is running under ginkgo

func ContainsRole

func ContainsRole(slice []common.MachineRoles, s common.MachineRoles) bool

func ContainsStatuses

func ContainsStatuses(machines []clusterv1alpha1.CnctMachine, ss []common.MachineStatusPhase) bool

func ContainsString

func ContainsString(slice []string, s string) bool

func GetClusterMachineList

func GetClusterMachineList(c client.Client, clusterName string) ([]clusterv1alpha1.CnctMachine, error)

func GetStatus

returns overall cluster status and api enpoint if available

func IsReadyForDeletion

func IsReadyForDeletion(machines []clusterv1alpha1.CnctMachine) bool

similar to GetStatus(), but returns true for whether its ok to proceed with machine deletion Deletion is ok when none of the machines in the cluster are in Creating or Upgrading state

func IsReadyForUpgrade

func IsReadyForUpgrade(machines []clusterv1alpha1.CnctMachine) (bool, error)

similar to GetStatus(), but returns true for whether its ok to proceed with machine upgrade Upgrade is ok when none of the machines in the cluster are in Creating state If some of the machines are in Error state, return an error

func IsValidKubernetesVersion

func IsValidKubernetesVersion(version string) bool

IsValidKubernetesVersion checks whether the version requested is supported by cma-ssh.

func KubernetesVersions

func KubernetesVersions() []string

KubernetesVersions() returns the list of all kubernetes versions cma-ssh supports.

func RemoveString

func RemoveString(slice []string, s string) (result []string)

func Retry

func Retry(attempts int, sleep time.Duration, fn func() error) error

Types

type ClusterToMachineMapper

type ClusterToMachineMapper struct {
	client.Client
}

A mapper that returns all the Registries

func (ClusterToMachineMapper) Map

type MachineToClusterMapper

type MachineToClusterMapper struct {
	client.Client
}

A mapper that returns all the Registries

func (MachineToClusterMapper) Map

type ZeroModTimeFileSystem

type ZeroModTimeFileSystem struct {
	Source http.FileSystem
}

ZeroModTimeFileSystem is an http.FileSystem wrapper. It exposes a filesystem exactly like Source, except all file modification times are changed to zero.

func (ZeroModTimeFileSystem) Open

func (fs ZeroModTimeFileSystem) Open(name string) (http.File, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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