river

package
v0.0.0-...-eb4e2cc Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2015 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(e *canal.RowsEvent) *map[string]interface{}

Types

type Config

type Config struct {
	DataDir string       `json:"dataDir"`
	Mysql   *MysqlConfig `json:"mysql"`
	Rules   []*Rule      `json:"rules"`
}

func NewConfig

func NewConfig(data []byte) (*Config, error)

func NewConfigWithFile

func NewConfigWithFile(name string) (*Config, error)

type MysqlConfig

type MysqlConfig struct {
	ServerId     uint32              `json:"serverId"`
	Addr         string              `json:"addr"`
	User         string              `json:"user"`
	Pass         string              `json:"pass"`
	DumpExec     string              `json:"mysqldump"`
	Dbs          []string            `json:"dbs"`
	IgnoreTables map[string][]string `json:"ignoreTables"`
}

type River

type River struct {
	// contains filtered or unexported fields
}

func NewRiver

func NewRiver(c *Config) (*River, error)

func (*River) Close

func (r *River) Close()

func (*River) Run

func (r *River) Run() error

type Row

type Row struct {
	Old     []interface{}
	Changed map[int]interface{}
}

type Rule

type Rule struct {
	Db     string `json:"db"`
	Table  string `json:"table"`
	Url    string `json:"url"`
	Method string `json:"method"`
}

Jump to

Keyboard shortcuts

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