dsi

package
v0.0.0-...-ed4b1df Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionInfoName

func ConnectionInfoName(dsiName string) string

func GetPodsWithLabels

func GetPodsWithLabels(ctx context.Context, c runtimeClient.Client,
	namespace string, label map[string]string) (*corev1.PodList, error)

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

Determines readiness of pods by looking at container statuses

func NPodsReady

func NPodsReady(l *corev1.PodList) int

NPodsReady returns number ready pods in the given PodList.

func NewK8sClient

func NewK8sClient(ds, kubeconfig string) (client.Client, error)

func WaitForDeletion

func WaitForDeletion(ctx context.Context, instance runtimeClient.Object, c runtimeClient.Client)

func WaitForPodDeletion

func WaitForPodDeletion(ctx context.Context, pod *corev1.Pod, c runtimeClient.Client)

func WaitForReadiness

func WaitForReadiness(ctx context.Context, instance runtimeClient.Object, c runtimeClient.Client)

func WaitForReplicaReadiness

func WaitForReplicaReadiness(ctx context.Context, instance runtimeClient.Object,
	c runtimeClient.Client, replicas int)

WaitForReplicaReadiness waits until the given number of ReplicaPods report as ready.

Types

type DSIAccountValidator

type DSIAccountValidator interface {
	UserExists(ctx context.Context, username string) (bool, error)
}

type DSIClient

TODO: Create implementations for Data interface to generalize test data input

func NewClient

func NewClient(ds, port string, sbData map[string]string) (DSIClient, error)

func NewClientForURL

func NewClientForURL(ds, host, port, sslmode string, sbData map[string]string) (DSIClient, error)

type DSICollectionValidator

type DSICollectionValidator interface {
	CollectionExists(ctx context.Context, collection string) bool
}

type DSIConfigurationValidator

type DSIConfigurationValidator interface {
	CheckParameter(ctx context.Context, parameter, value string) error
}

type DSIDeleter

type DSIDeleter interface {
	Delete(ctx context.Context, entity, data string) error
}

type DSIReader

type DSIReader interface {
	Read(ctx context.Context, entity string) (string, error)
}

type DSIWriter

type DSIWriter interface {
	Write(ctx context.Context, entity, data string) error
}

type Object

type Object interface {
	ClusterStatus() string
	runtimeClient.Object
	GetClientObject() runtimeClient.Object
}

func New

func New(ds, namespace, name string, replicas int32) (Object, error)

type PodsGetter

type PodsGetter interface {
	Pods(context.Context, runtimeClient.Client) ([]corev1.Pod, error)
}

type StatefulSetGetter

type StatefulSetGetter interface {
	StatefulSet(context.Context, runtimeClient.Client) (*appsv1.StatefulSet, error)
}

type TolerationsSetter

type TolerationsSetter interface {
	SetTolerations(...corev1.Toleration)
}

type WithPodAntiAffinity

type WithPodAntiAffinity interface {
	AddRequiredPodAntiAffinityTerm(antiAffinityTerm corev1.PodAffinityTerm)
	AddPreferredPodAntiAffinityTerm(weight int, antiAffinityTerm corev1.PodAffinityTerm)
}

Jump to

Keyboard shortcuts

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