connection

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(address string, log logr.Logger) (*grpc.ClientConn, error)

func GetControllerClient

func GetControllerClient(restConfig *rest.Config, scheme *runtime.Scheme) (ctrlClient.Client, error)

GetControllerClient - Returns a controller client which reads and writes directly to API server

Types

type ConnHandler

type ConnHandler interface {
	Verify(ctx context.Context) error
	GetConnection(clusterId string) (RemoteClusterClient, error)
}

ConnHandler - Interface

type MultiClusterClient

type MultiClusterClient interface {
	GetConnection(clusterId string) (RemoteClusterClient, error)
	GetClusterId() string
}

type PendingState

type PendingState struct {
	MaxPending int

	Log logr.Logger
	// contains filtered or unexported fields
}

pendingState type limits the number of pending requests by making sure there are no other requests for the same RG, otherwise a "pending" error is returned. Additionally, no more than maxPending requests are processed at a time without returning an "overload" error.

type RemoteClusterClient

type RemoteClusterClient interface {
	GetStorageClass(ctx context.Context, storageClassName string) (*storageV1.StorageClass, error)
	ListStorageClass(ctx context.Context) (*storageV1.StorageClassList, error)
	CreateStorageClass(ctx context.Context, storageClass *storageV1.StorageClass) error
	ListCustomResourceDefinitions(ctx context.Context) (*apiExtensionsv1.CustomResourceDefinitionList, error)
	GetCustomResourceDefinitions(ctx context.Context, crdName string) (*apiExtensionsv1.CustomResourceDefinition, error)
	GetPersistentVolume(ctx context.Context, persistentVolumeName string) (*corev1.PersistentVolume, error)
	CreatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
	UpdatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error
	GetPersistentVolumeClaim(ctx context.Context, namespace, claimName string) (*corev1.PersistentVolumeClaim, error)
	UpdatePersistentVolumeClaim(ctx context.Context, claim *corev1.PersistentVolumeClaim) error
	GetReplicationGroup(ctx context.Context, replicationGroupName string) (*repV1Alpha1.DellCSIReplicationGroup, error)
	UpdateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
	ListReplicationGroup(ctx context.Context) (*repV1Alpha1.DellCSIReplicationGroupList, error)
	CreateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error
}

RemoteClusterClient interface provides methods for creating, modifying, deleting objects on a remote k8s cluster

type RemoteK8sConnHandler

type RemoteK8sConnHandler struct {
	// contains filtered or unexported fields
}

func (*RemoteK8sConnHandler) AddOrUpdateConfig

func (k8sConnHandler *RemoteK8sConnHandler) AddOrUpdateConfig(clusterId string, config *rest.Config, log logr.Logger)

func (*RemoteK8sConnHandler) GetConnection

func (k8sConnHandler *RemoteK8sConnHandler) GetConnection(clusterId string) (RemoteClusterClient, error)

func (*RemoteK8sConnHandler) Verify

func (k8sConnHandler *RemoteK8sConnHandler) Verify(ctx context.Context) error

Verify if the connections have been established properly and all the required APIs are available on the remote cluster

type RemoteK8sControllerClient

type RemoteK8sControllerClient struct {
	ClusterID string
	Client    ctrlClient.Client
}

RemoteK8sControllerClient - Represents a single controller split client

func (*RemoteK8sControllerClient) CreatePersistentVolume

func (c *RemoteK8sControllerClient) CreatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error

CreatePersistentVolume

func (*RemoteK8sControllerClient) CreateReplicationGroup

func (c *RemoteK8sControllerClient) CreateReplicationGroup(ctx context.Context, group *repV1Alpha1.DellCSIReplicationGroup) error

CreateReplicationGroup

func (*RemoteK8sControllerClient) CreateStorageClass

func (c *RemoteK8sControllerClient) CreateStorageClass(ctx context.Context, storageClass *storageV1.StorageClass) error

CreateStorageClass

func (*RemoteK8sControllerClient) GetCustomResourceDefinitions

func (c *RemoteK8sControllerClient) GetCustomResourceDefinitions(ctx context.Context, crdName string) (*apiExtensionsv1.CustomResourceDefinition, error)

GetCustomResourceDefinitions

func (*RemoteK8sControllerClient) GetPersistentVolume

func (c *RemoteK8sControllerClient) GetPersistentVolume(ctx context.Context, persistentVolumeName string) (*corev1.PersistentVolume, error)

GetPersistentVolume

func (*RemoteK8sControllerClient) GetPersistentVolumeClaim

func (c *RemoteK8sControllerClient) GetPersistentVolumeClaim(ctx context.Context, namespace, claimName string) (*corev1.PersistentVolumeClaim, error)

GetPersistentVolumeClaim

func (*RemoteK8sControllerClient) GetReplicationGroup

func (c *RemoteK8sControllerClient) GetReplicationGroup(ctx context.Context, replicationGroupName string) (*repV1Alpha1.DellCSIReplicationGroup, error)

GetReplicationGroup

func (*RemoteK8sControllerClient) GetStorageClass

func (c *RemoteK8sControllerClient) GetStorageClass(ctx context.Context, storageClassName string) (*storageV1.StorageClass, error)

GetStorageClass

func (*RemoteK8sControllerClient) ListCustomResourceDefinitions

func (*RemoteK8sControllerClient) ListReplicationGroup

ListReplicationGroup

func (*RemoteK8sControllerClient) ListStorageClass

ListStorageClass

func (*RemoteK8sControllerClient) UpdatePersistentVolume

func (c *RemoteK8sControllerClient) UpdatePersistentVolume(ctx context.Context, volume *corev1.PersistentVolume) error

UpdatePersistentVolume

func (*RemoteK8sControllerClient) UpdatePersistentVolumeClaim

func (c *RemoteK8sControllerClient) UpdatePersistentVolumeClaim(ctx context.Context, claim *corev1.PersistentVolumeClaim) error

UpdatePersistentVolume

func (*RemoteK8sControllerClient) UpdateReplicationGroup

func (c *RemoteK8sControllerClient) UpdateReplicationGroup(ctx context.Context, replicationGroup *repV1Alpha1.DellCSIReplicationGroup) error

UpdateReplicationGroup

type RgIDType

type RgIDType string

func (RgIDType) CheckAndUpdatePendingState

func (rgID RgIDType) CheckAndUpdatePendingState(ps *PendingState) error

func (RgIDType) ClearPending

func (rgID RgIDType) ClearPending(ps *PendingState)

Jump to

Keyboard shortcuts

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