Documentation ¶
Index ¶
- Constants
- func AttachPosFile(rail miso.Rail) error
- func BootstrapServer(args []string)
- func DetachPosFile(rail miso.Rail)
- func FlushPosFile()
- func HasAnyEventHandler() bool
- func NewStreamer(c miso.Rail, syncer *replication.BinlogSyncer) (*replication.BinlogStreamer, error)
- func OnEventReceived(handler EventHandler)
- func PostServerBootstrap(rail miso.Rail) error
- func PreServerBootstrap(rail miso.Rail) error
- func PrepareSync(rail miso.Rail) (*replication.BinlogSyncer, error)
- func PumpEvents(c miso.Rail, syncer *replication.BinlogSyncer, ...) error
- func ResetTableInfoCache(c miso.Rail, schema string, table string)
- func SetGlobalExclude(r *regexp.Regexp)
- func SetGlobalInclude(r *regexp.Regexp)
- type ColumnInfo
- type Condition
- type DataChangeEvent
- type EventHandler
- type EventMapping
- type EventPumpConfig
- type Filter
- type GlobalFilter
- type Mapper
- type Pipeline
- type Record
- type RecordColumn
- type StreamEvent
- type StreamEventColumn
- type TableInfo
Constants ¶
View Source
const ( PropSyncServerId = "sync.server-id" PropSyncHost = "sync.host" PropSyncPort = "sync.port" PropSyncUser = "sync.user" PropSyncPassword = "sync.password" PropSyncPosFile = "sync.pos.file" TypeInsert = "INS" TypeUpdate = "UPD" TypeDelete = "DEL" )
Variables ¶
This section is empty.
Functions ¶
func AttachPosFile ¶ added in v0.0.5
func BootstrapServer ¶ added in v0.0.7
func BootstrapServer(args []string)
func DetachPosFile ¶ added in v0.0.6
func FlushPosFile ¶ added in v0.0.6
func FlushPosFile()
func HasAnyEventHandler ¶
func HasAnyEventHandler() bool
func NewStreamer ¶
func NewStreamer(c miso.Rail, syncer *replication.BinlogSyncer) (*replication.BinlogStreamer, error)
func OnEventReceived ¶
func OnEventReceived(handler EventHandler)
func PostServerBootstrap ¶
func PreServerBootstrap ¶
func PrepareSync ¶
func PrepareSync(rail miso.Rail) (*replication.BinlogSyncer, error)
func PumpEvents ¶
func PumpEvents(c miso.Rail, syncer *replication.BinlogSyncer, streamer *replication.BinlogStreamer) error
func SetGlobalExclude ¶
func SetGlobalInclude ¶
Types ¶
type ColumnInfo ¶
type DataChangeEvent ¶
type DataChangeEvent struct { Timestamp uint32 `json:"timestamp"` // epoch time second Schema string `json:"schema"` Table string `json:"table"` Type string `json:"type"` // INS-INSERT, UPD-UPDATE, DEL-DELETE Records []Record `json:"records"` Columns []RecordColumn `json:"columns"` }
func (DataChangeEvent) PrintRecord ¶
func (d DataChangeEvent) PrintRecord(r Record) string
func (DataChangeEvent) String ¶
func (d DataChangeEvent) String() string
type EventHandler ¶
type EventHandler func(c miso.Rail, dce DataChangeEvent) error
type EventMapping ¶
type EventPumpConfig ¶
type EventPumpConfig struct { Filter GlobalFilter `mapstructure:"filter"` Pipelines []Pipeline `mapstructure:"pipeline"` }
func LoadConfig ¶
func LoadConfig() EventPumpConfig
type Filter ¶
func NewFilters ¶
type GlobalFilter ¶
type Mapper ¶
type Mapper interface {
MapEvent(DataChangeEvent) ([]any, error)
}
type Record ¶
type Record struct { Before []interface{} `json:"before"` After []interface{} `json:"after"` }
type RecordColumn ¶
type StreamEvent ¶
type StreamEventColumn ¶
Click to show internal directories.
Click to hide internal directories.