Documentation
¶
Overview ¶
Package replicationslot provides functions to manage the replication slot of a cnpg cluster
Index ¶
- func AreSameLsn(lsnList []string) bool
- func GetExpectedHAReplicationSlotsOnPod(ctx context.Context, crudClient client.Client, ...) ([]string, error)
- func GetReplicationSlotLsnsOnPod(ctx context.Context, crudClient client.Client, ...) ([]string, error)
- func GetReplicationSlotsOnPod(ctx context.Context, crudClient client.Client, ...) ([]string, error)
- func PrintReplicationSlots(ctx context.Context, crudClient client.Client, ...) string
- func ToggleHAReplicationSlots(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) error
- func ToggleSynchronizeReplicationSlots(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreSameLsn ¶
AreSameLsn returns true if all the LSN values inside a given list are the same
func GetExpectedHAReplicationSlotsOnPod ¶
func GetExpectedHAReplicationSlotsOnPod( ctx context.Context, crudClient client.Client, namespace, clusterName, podName string, ) ([]string, error)
GetExpectedHAReplicationSlotsOnPod returns a slice of replication slot names which should be present in a given pod
func GetReplicationSlotLsnsOnPod ¶
func GetReplicationSlotLsnsOnPod( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, namespace, clusterName, dbName string, pod corev1.Pod, ) ([]string, error)
GetReplicationSlotLsnsOnPod returns a slice containing the current restart_lsn values of each replication slot present in a given pod
func GetReplicationSlotsOnPod ¶
func GetReplicationSlotsOnPod( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, namespace, podName, dbName string, ) ([]string, error)
GetReplicationSlotsOnPod returns a slice containing the names of the current replication slots present in a given pod
func PrintReplicationSlots ¶
func PrintReplicationSlots( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, namespace, clusterName, dbName string, ) string
PrintReplicationSlots prints replications slots with their restart_lsn
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.