sraplica

package
v0.0.0-...-ffdd182 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DestConfig *mysql.Config
View Source
var DestDb *sql.DB
View Source
var SourceConfig *mysql.Config

Functions

func Delete

func Delete(cLog *ChangeLog)

func ErrorLog

func ErrorLog(err error) error

func ErrorPanic

func ErrorPanic(err error)

ErrorPanic -

func GetDestConfig

func GetDestConfig() *mysql.Config

GetSourceConfig - gets config variables from environment variables or die

func GetSourceConfig

func GetSourceConfig() *mysql.Config

GetSourceConfig - gets config variables from environment variables or die

func InitDestDb

func InitDestDb() *sql.DB

func InitRaplication

func InitRaplication()

func InitSync

func InitSync()

func Insert

func Insert(cLog *ChangeLog)

func SchemaAltered

func SchemaAltered(b []byte)

func Update

func Update(cLog *ChangeLog)

Types

type AssociateArray

type AssociateArray map[string]interface{}

AssociateArray -

type ChangeLog

type ChangeLog struct {
	BinlogTimestamp uint32
	Keys            AssociateArray
	Timestamp       int64
	TableName       string
	ChangeType      string
	Columns         AssociateArray
}

ChangeLog -

type Column

type Column struct {
	Value  string
	Custom bool
}

type IndexedArray

type IndexedArray []interface{}

IndexedArray -

type MyEvent

type MyEvent struct {
	c.RowsEvent
}

MyEvent struct

type MyEventHandler

type MyEventHandler struct {
	c.DummyEventHandler
}

MyEventHandler struct

func (*MyEventHandler) OnDDL

func (h *MyEventHandler) OnDDL(nextPos m.Position, queryEvent *replication.QueryEvent) error

OnDDL will handle schema changes

func (*MyEventHandler) OnRow

func (h *MyEventHandler) OnRow(e *c.RowsEvent) error

type SensitiveTables

type SensitiveTables map[string]*Table
var Tables SensitiveTables

func GetTablesToFilter

func GetTablesToFilter(confDir string) SensitiveTables

type Table

type Table struct {
	Name string
	Cols map[string]*Column
}

Jump to

Keyboard shortcuts

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