connector

package
v0.0.0-...-7c77b90 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsTestKubeClient bool = false

IsTestKubeClient .. global variable used during unit-tests to check whether a fake kube client object has to be instantiated

Functions

func CloseAllClusterWatchers

func CloseAllClusterWatchers()

CloseAllClusterWatchers close all channels

func GetKubeConfig

func GetKubeConfig(clustername string, level string, namespace string) ([]byte, error)

GetKubeConfig uses the connectivity client to get the kubeconfig based on the name of the clustername.

func HandleStatusUpdate

func HandleStatusUpdate(clusterId string, id string, v *v1alpha1.ResourceBundleState)

HandleStatusUpdate for an application in a cluster

func StopClusterWatcher

func StopClusterWatcher(clusterId string)

StopClusterWatcher stop watching a cluster

Types

type Connection

type Connection struct {
	Cid     string
	Clients map[string]*kubeclient.Client
	sync.Mutex
}

Connection is for a cluster

func (*Connection) GetClient

func (c *Connection) GetClient(cluster string, level string, namespace string) (*kubeclient.Client, error)

GetClient returns client for the cluster

func (*Connection) GetClientInternal

func (c *Connection) GetClientInternal(cluster string, level string, namespace string) (types.ClientProvider, error)

func (*Connection) GetStatusCR

func (c *Connection) GetStatusCR(label string) ([]byte, error)

GetStatusCR returns a status monitoring customer resource

func (*Connection) Init

func (c *Connection) Init(id interface{}) error

Init Connection for an app context

func (*Connection) RemoveClient

func (c *Connection) RemoveClient()

func (*Connection) StartClusterWatcher

func (c *Connection) StartClusterWatcher(clusterId string) error

StartClusterWatcher watches for CR configBytes - Kubectl file data

Jump to

Keyboard shortcuts

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