model

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PutWalData

func PutWalData(data *WalData)

PutWalData putback data to pool

Types

type Operation

type Operation uint8

Operation type

const (
	// Insert operation
	Insert Operation = iota
	// Delete operation
	Delete
	// Update operation
	Update
	// Begin transaction
	Begin
	// Commit transaction
	Commit
	// Unknow operation
	Unknow
)

func (Operation) String

func (o Operation) String() string

type WalData

type WalData struct {
	OperationType Operation
	Schema        string
	Table         string
	Data          map[string]interface{}
	Timestamp     int64
	Pos           uint64
	Rule          *conf.Rule
}

WalData represent parsed wal log data

func NewWalData

func NewWalData() *WalData

NewWalData get data from pool

func Parse

func Parse(msg *pgx.WalMessage) (*WalData, error)

Parse test_decoding format wal to WalData

func (*WalData) Reset

func (d *WalData) Reset()

Reset for reuse

Jump to

Keyboard shortcuts

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