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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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