utility

package
v0.0.0-...-948e253 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConsumerData []ConsumerDataStruct

ConsumerData 发送到consumer 的数据结构

View Source
var ConsumerDataChan = make(chan []ConsumerDataStruct, 1000)

ConsumerDataChan 发送数据的通道

View Source
var KeepPos = false

KeepPos 是否保存binlog 位置

View Source
var PosChan = make(chan WorkingInfo, 100)

PosChan working_info 表信息

Functions

This section is empty.

Types

type ColumnData

type ColumnData struct {
	Name  string
	Type  int
	Value interface{}
}

ColumnData Column Data Struct

type ConsumerDataStruct

type ConsumerDataStruct struct {
	Action           string
	BinlogFile       string
	BinlogPos        uint32
	EventTimestamp   uint32
	Schema           string
	Table            string
	Query            string
	ColumnData       [][]ColumnData
	ColumnDataBefore [][]ColumnData
}

ConsumerDataStruct 发送到redis consumer 中的数据结构

type PosInfo

type PosInfo struct {
	BinlogFile     string `json:"binlogfile"`
	BinlogPos      uint32 `json:"binlogpos"`
	EventTimestamp uint32 `json:"eventtimestamp"`
}

PosInfo 持久化的mysql pos信息

type WorkingInfo

type WorkingInfo struct {
	SID       int    `db:"sid"`
	MysqlAddr string `db:"mysql_addr"`
	FileName  string `db:"file_name"`
	Position  uint32 `db:"position"`
	Timestamp uint32 `db:"timestamp"`
}

WorkingInfo 保存解析

Jump to

Keyboard shortcuts

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