gtid

package
v1.0.4-hotfix-2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set interface {
	Set(mysql.GTIDSet) error
	// compute set of self and other gtid set
	// 1. keep intersection of self and other gtid set
	// 2. keep complementary set of other gtid set except master identifications that not in self gtid
	// masters => master identification set, represents which db instances do write in one replicate group
	// example: self gtid set [xx:1-2, yy:1-3, xz:1-4], other gtid set [xx:1-4, yy:1-12, xy:1-3]. master ID set [xx]
	// => [xx:1-2, yy:1-3, xy:1-3]
	// more examples ref test cases
	Replace(other Set, masters []interface{}) error
	Clone() Set
	Origin() mysql.GTIDSet
	Equal(other Set) bool
	Contain(other Set) bool

	// Truncate truncates the current GTID sets until the `end` in-place.
	// NOTE: the original GTID sets should contain the end GTID sets, otherwise it's invalid.
	// like truncating `00c04543-f584-11e9-a765-0242ac120002:1-100` with `00c04543-f584-11e9-a765-0242ac120002:40-60`
	// should become `00c04543-f584-11e9-a765-0242ac120002:1-60`.
	Truncate(end Set) error

	String() string
}

Set provide gtid operations for syncer

func ParserGTID

func ParserGTID(flavor, gtidStr string) (Set, error)

ParserGTID parses GTID from string

Jump to

Keyboard shortcuts

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