msg

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgDML MsgType = "dml"
	MsgDDL MsgType = "ddl"
	MsgCtl MsgType = "ctl" // control operate

	InsertAction  ActionType = "insert"
	UpdateAction  ActionType = "update"
	DeleteAction  ActionType = "delete"
	ReplaceAction ActionType = "replace"

	MysqlPlugin PluginName = "Mysql"
	MongoPlugin PluginName = "Mongo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType added in v0.3.0

type ActionType string

type DDLMsg added in v0.3.0

type DDLMsg struct {
}

type DMLMsg added in v0.3.0

type DMLMsg struct {
	Action ActionType
	Data   map[string]interface{}
	Old    map[string]interface{}
}

type Msg

type Msg struct {
	Database            string
	Table               string
	Type                MsgType
	DmlMsg              *DMLMsg
	DdlMsg              *DDLMsg
	PluginName          PluginName
	ResumeToken         *WatchId `bson:"_id"`
	Timestamp           time.Time
	InputContext        interface{}
	AfterCommitCallback MsgCallbackFunc
}

type MsgCallbackFunc added in v0.3.0

type MsgCallbackFunc func(m *Msg) error

type MsgType added in v0.3.0

type MsgType string

type PluginName added in v0.3.2

type PluginName string

type WatchId

type WatchId struct {
	Data string `bson:"_data"`
}

Jump to

Keyboard shortcuts

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