Documentation
¶
Index ¶
- func CreateNamespaceIfNotExists(client client.Client, namespace string) error
- func GetAllKubernetesNodeIPAddresses(ctx context.Context, cli client.Client) (map[string]string, error)
- func GetClient(restConfig *rest.Config) (client.Client, error)
- func NewResourceLock(namespace, lockName string, restConfig *rest.Config) (resourcelock.Interface, error)
- func RunLeaderElection(ctx context.Context, wg *sync.WaitGroup, lock resourcelock.Interface)
- func WaitForLock(ctx context.Context, namespace string, lockName string, ...) error
- type NamespacedClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespaceIfNotExists ¶
func CreateNamespaceIfNotExists(client client.Client, namespace string) error
func GetAllKubernetesNodeIPAddresses ¶
func GetAllKubernetesNodeIPAddresses(ctx context.Context, cli client.Client) (map[string]string, error)
GetAllKubernetesNodeIPAddresses returns a mapping of IPAddress -> node_name
func GetClient ¶
func GetClient(restConfig *rest.Config) (client.Client, error)
GetClient returns a controller-runtime client with cass-operator API defined
func NewResourceLock ¶
func NewResourceLock(namespace, lockName string, restConfig *rest.Config) (resourcelock.Interface, error)
func RunLeaderElection ¶
func RunLeaderElection(ctx context.Context, wg *sync.WaitGroup, lock resourcelock.Interface)
func WaitForLock ¶
func WaitForLock(ctx context.Context, namespace string, lockName string, client *NamespacedClient) error
Types ¶
type NamespacedClient ¶
type NamespacedClient struct {
client.Client
Config *rest.Config
Namespace string
}
NamespacedClient encapsulates namespacedClient with public namespace and restConfig
func GetClientInNamespace ¶
func GetClientInNamespace(restConfig *rest.Config, namespace string) (NamespacedClient, error)
Click to show internal directories.
Click to hide internal directories.