Skip to content

tubing-data/tubing-cdc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tubing-cdc

Lightweight MySQL binlog CDC on go-mysql canal: a small TubingCDC API, optional binlog position persistence (Badger + Redis), and pluggable handlers and sinks. The long-term target is alignment with the DBLog paper (watermarks and chunked snapshots); today the implementation is binlog-only phase 1.

Quick start

Table names must be fully qualified as database.table.

import tubingcdc "tubing-cdc"

cfg := &tubingcdc.Configs{
    Address:  "127.0.0.1:3306",
    Username: "cdc_user",
    Password: "secret",
    Tables:   []string{"mydb.orders", "mydb.customers"},
}

cdc, err := tubingcdc.NewTubingCDC(cfg)
if err != nil {
    // handle error
}
defer cdc.Close()

if err := cdc.Run(); err != nil {
    // handle error
}

Use RunFrom(mysql.Position) to resume from a stored binlog position.

About

CDC library for implementaiton of DBLog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors