cdcutil

package
v1.1.0-beta.0...-abef9b1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CDCPrefix is the prefix of CDC information in etcd.
	CDCPrefix = "/tidb/cdc/"
	// ChangefeedPath is the path of changefeed information in etcd.
	ChangefeedPath = "/changefeed/info/"
	// CDCPrefixV61 is the prefix of CDC information in etcd.
	CDCPrefixV61 = "/tidb/cdc/changefeed/info/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CDCNameSet

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

CDCNameSet saves CDC changefeed's information. nameSet maps `cluster/namespace` to `changefeed`s

func GetIncompatibleChangefeedsWithSafeTS

func GetIncompatibleChangefeedsWithSafeTS(ctx context.Context, cli *clientv3.Client, safeTS uint64) (*CDCNameSet, error)

GetIncompatibleChangefeedsWithSafeTS gets CDC changefeed that may not compatible with the safe ts and wraps them to a map.

func GetRunningChangefeeds

func GetRunningChangefeeds(ctx context.Context, cli *clientv3.Client) (*CDCNameSet, error)

GetRunningChangefeeds gets CDC changefeed information and wraps them to a map for CDC >= v6.2, the etcd key format is /tidb/cdc/<clusterID>/<namespace>/changefeed/info/<changefeedID> for CDC <= v6.1, the etcd key format is /tidb/cdc/changefeed/info/<changefeedID>

func (*CDCNameSet) Empty

func (s *CDCNameSet) Empty() bool

Empty that the nameSet is empty means no changefeed exists.

func (*CDCNameSet) MessageToUser

func (s *CDCNameSet) MessageToUser() string

MessageToUser convert the map `nameSet` to a readable message to user.

Jump to

Keyboard shortcuts

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