replicator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Replicator

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

func New

func New(cfg *config.Config) *Replicator

func (*Replicator) Finish

func (r *Replicator) Finish()

func (*Replicator) GenerateChDDL

func (r *Replicator) GenerateChDDL() error

GenerateChDDL generates ClickHouse table DDLs TODO: refactor me

func (*Replicator) GetTablesToSync

func (r *Replicator) GetTablesToSync() ([]config.PgTableName, error)

func (*Replicator) HandleMessage

func (r *Replicator) HandleMessage(lsn dbtypes.LSN, msg message.Message) error

HandleMessage processes the incoming wal message

func (*Replicator) Init

func (r *Replicator) Init() error

func (*Replicator) PreparePgTables

func (r *Replicator) PreparePgTables() error

func (*Replicator) PrintTablesLSN

func (r *Replicator) PrintTablesLSN()

Print all replicated tables LSN

func (*Replicator) Run

func (r *Replicator) Run() error

func (*Replicator) State

func (r *Replicator) State() StateValue

func (*Replicator) SyncTables

func (r *Replicator) SyncTables(syncTables []config.PgTableName, async bool) error

type StateValue

type StateValue uint32
const (
	StateInit StateValue = iota
	StateWorking
	StatePaused
	StatePausing
	StateShuttingDown
)

Jump to

Keyboard shortcuts

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