msg

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: GPL-2.0 Imports: 2 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 {
	Statement string
	AST       ast.StmtNode
}

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