cloudnativepg

package
v0.0.0-...-8ae82f3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCluster

func DefaultCluster(meta metav1.Object, gvk schema.GroupVersionKind) *cnpgv1.Cluster

func NewCluster

nolint:gocognit NewCluster returns a new Cluster

Types

type Builder

type Builder interface {
	Build(context.Context, *v1alpha1.StorageNode, *v1alpha1.StorageProvider) *cnpgv1.Cluster
}

Builder build CloudNativePG Cluster from different parameters

type CloudNativePG

type CloudNativePG interface {
	Builder
	Getter
	Setter
}

CloudNativePG interface contains setter and getter

func NewCloudNativePGClient

func NewCloudNativePGClient(c client.Client) CloudNativePG

NewCloudNativePGClient creates a new CloudNativePG client

type ClusterBuilder

type ClusterBuilder interface {
	SetName(name string) ClusterBuilder
	SetNamespace(namespace string) ClusterBuilder
	SetDescription(description string) ClusterBuilder
	SetInstances(n int) ClusterBuilder
	SetImageName(name string) ClusterBuilder
	SetImagePullPolicy(p string) ClusterBuilder
	SetPostgresUID(u int64) ClusterBuilder
	SetPostgresGID(g int64) ClusterBuilder
	SetMinSyncReplicas(n int) ClusterBuilder
	SetMaxSyncReplicas(n int) ClusterBuilder
	SetReplicaClusterEnabled(e bool) ClusterBuilder
	SetReplicaClusterSource(s string) ClusterBuilder
	SetSuperuserSecret(s string) ClusterBuilder
	SetEnableSuperuserAccess(e *bool) ClusterBuilder
	SetCertificates(serverCASecret, serverTLSSecret, replicationTLSSecret, clientCASecret string, serverAltDNSNames []string) ClusterBuilder
	SetStorageSize(s string) ClusterBuilder
	SetMaxStartDelay(d int32) ClusterBuilder
	SetMaxStopDelay(d int32) ClusterBuilder
	SetMaxSwitchoverDelay(d int32) ClusterBuilder
	SetFailoverDelay(d int32) ClusterBuilder
	SetPrimaryUpdateStrategy(s string) ClusterBuilder
	SetPrimaryUpdateMethod(m string) ClusterBuilder
	SetBackupRetentionPolicy(r string) ClusterBuilder
	SetBackupTarget(t string) ClusterBuilder
	SetLogLevel(l string) ClusterBuilder
	Build() *cnpgv1.Cluster
}

func NewClusterBuilder

func NewClusterBuilder(meta metav1.Object, gvk schema.GroupVersionKind) ClusterBuilder

NewClusterBuilder returns a ClusterBuilder

type Getter

type Getter interface {
	GetClusterByNamespacedName(context.Context, types.NamespacedName) (*cnpgv1.Cluster, error)
}

Getter get CloudNativePG Cluster from different parameters

type Setter

type Setter interface {
	Create(context.Context, *cnpgv1.Cluster) error
	Update(context.Context, *cnpgv1.Cluster) error
	Delete(context.Context, *cnpgv1.Cluster) error
}

Setter set CloudNativePG Cluster from different parameters

Jump to

Keyboard shortcuts

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