xx

package
v0.0.0-...-2b644c5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationOr

func DurationOr(a, b time.Duration) time.Duration

func Filter

func Filter(tables []string, f func(string) bool) []string

func Map

func Map(ss []string) map[string]bool

func MapKeys

func MapKeys(m map[string]bool) []string

func MaxBytes

func MaxBytes(b []byte, n int) []byte

func Or

func Or(a, b string) string

func OrInt

func OrInt(a, b int) int

func Purify

func Purify(ss []string) []string

func SliceContainsFold

func SliceContainsFold(ss []string, a string, emptyYes bool) (string, bool)

Types

type PosValue

type PosValue struct {
	BinName string
	Pos     int
}

func ParsePosition

func ParsePosition(v string) (p *PosValue, err error)

type TableFilter

type TableFilter struct {
	// IncludeTables or ExcludeTables should contain database name
	// Only a table which matches IncludeTables and dis-matches ExcludeTables will be processed
	// eg, ExcludeTables : ["*.canal"], ExcludeTables : ["mysql.*"]
	//     this will include all database's 'canal' table, except database 'mysql'
	// Default IncludeTables and ExcludeTables are empty, this will include all tables
	IncludeTables, ExcludeTables []string
	SyncMarkTable                string
}

func NewTableFilter

func NewTableFilter(tables []string, syncMarkTable string) (*TableFilter, error)

func (*TableFilter) Matches

func (c *TableFilter) Matches(key string) bool

Jump to

Keyboard shortcuts

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