mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWriter io.Writer = os.Stdout

Functions

This section is empty.

Types

type CDC

type CDC struct {
	Options Options
	// contains filtered or unexported fields
}

func NewCDC

func NewCDC(options *Options) (*CDC, error)

func (*CDC) Listen

func (cdc *CDC) Listen() error

type Options

type Options struct {
	Host     string // default, "127.0.0.1"
	Port     int    // default, 3306
	User     string // default, root
	Password string
	Database string
	Tables   []Table
	Flavor   string // flavor is mysql or mariadb, default mysql
	ServerID uint32
}

type Table

type Table struct {
	Name        string
	HandlerFunc TableHandlerFunc
}

type TableHandlerFunc

type TableHandlerFunc func(oldItem map[string]interface{}, newItem map[string]interface{}, table string)

Jump to

Keyboard shortcuts

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