syncsequences

package
v1.28.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 11 Imported by: 0 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

Overview

Package syncsequences contains the implementation of the kubectl cnpg subscription sync-sequences command

Package syncsequences contains the implementation of the kubectl cnpg subscription sync-sequences command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSyncScript

func CreateSyncScript(source, destination SequenceMap, offset int) string

CreateSyncScript creates a SQL script to synchronize the sequences in the destination database with the status of the source database

func NewCmd

func NewCmd() *cobra.Command

NewCmd initializes the subscription create command

Types

type SequenceMap

type SequenceMap map[string]*int

SequenceMap is a map between a qualified sequence name and its current value

func GetSequenceStatus

func GetSequenceStatus(ctx context.Context, clusterName string, connectionString string) (SequenceMap, error)

GetSequenceStatus gets the status of the sequences while being connected to a pod of a cluster to the specified connection string

type SequenceStatus

type SequenceStatus struct {
	// The name of the sequence
	Name string `json:"sq_name"`

	// The namespace where the sequence is defined
	Namespace string `json:"sq_namespace"`

	// The last value emitted from the sequence
	Value *int `json:"sq_value"`
}

SequenceStatus represent the status of a sequence in a certain moment

func (*SequenceStatus) QualifiedName

func (status *SequenceStatus) QualifiedName() string

QualifiedName gets the qualified name of this sequence

Jump to

Keyboard shortcuts

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