Documentation ¶
Index ¶
- Constants
- func DeserializeMySQLBinlogPosition(p utils.MySQLBinlogPosition) (gomysql.Position, gomysql.MysqlGTIDSet, error)
- func IsPositionStoreEvent(schema string, tableName string) bool
- func NewMongoPositionStore(pipelineName string, conn *config.MongoConnConfig, pos *config.MongoPosition) (*mongoPositionStore, error)
- func NewMySQLBinlogDBPositionStore(pipelineName string, dbConfig *utils.DBConfig, annotation string, ...) (*mysqlBinlogDBPositionStore, error)
- func NewMySQLTableDBPositionStore(name string, dbConfig *utils.DBConfig, annotation string) (*mysqlTableDBPositionStore, error)
- func PrepareMetaRepo(db *sql.DB, annotation string) error
- func SerializeMySQLBinlogPosition(pos gomysql.Position, gtidSet gomysql.MysqlGTIDSet) utils.MySQLBinlogPosition
- type ISerializablePosition
- type MongoPosition
- type MongoPositionStore
- type MySQLPositionStore
- type MySQLTablePosition
- type MySQLTablePositionState
- func (tablePositionState *MySQLTablePositionState) Get() interface{}
- func (tablePositionState *MySQLTablePositionState) GetCurrent(sourceName string) (MySQLTablePosition, bool)
- func (tablePositionState *MySQLTablePositionState) GetMaxMin(sourceName string) (MySQLTablePosition, MySQLTablePosition, bool)
- func (tablePositionState *MySQLTablePositionState) GetRaw() string
- func (tablePositionState *MySQLTablePositionState) GetStartBinlogPos() (utils.MySQLBinlogPosition, bool)
- func (tablePositionState *MySQLTablePositionState) Put(pos interface{})
- func (tablePositionState *MySQLTablePositionState) PutCurrent(sourceName string, pos MySQLTablePosition)
- func (tablePositionState *MySQLTablePositionState) PutMaxMin(sourceName string, max MySQLTablePosition, min MySQLTablePosition)
- func (tablePositionState *MySQLTablePositionState) PutRaw(pos string)
- func (tablePositionState *MySQLTablePositionState) PutStartBinlogPos(p utils.MySQLBinlogPosition)
- func (tablePositionState *MySQLTablePositionState) Stage() config.InputMode
- func (tablePositionState *MySQLTablePositionState) ToJSON() (string, error)
- type MySQLTablePositionStore
- type PipelineGravityMySQLPosition
- func (p *PipelineGravityMySQLPosition) Get() interface{}
- func (p *PipelineGravityMySQLPosition) GetRaw() string
- func (p *PipelineGravityMySQLPosition) Put(pos interface{})
- func (p *PipelineGravityMySQLPosition) PutRaw(pos string)
- func (p *PipelineGravityMySQLPosition) Stage() config.InputMode
- func (p *PipelineGravityMySQLPosition) String() string
- type Position
- type PositionStore
Constants ¶
View Source
const ( PlainString = "string" PlainInt = "int" PlainBytes = "bytes" SQLNullInt64 = "sqlNullInt64" SQLNullString = "sqlNullString" SQLNullBool = "sqlNullBool" SQLNullTime = "sqlNullTime" SQLRawBytes = "sqlRawBytes" )
View Source
const DefaultMySQLTableLocalPositionFile = "mysql_table_position.json"
Variables ¶
This section is empty.
Functions ¶
func DeserializeMySQLBinlogPosition ¶
func DeserializeMySQLBinlogPosition(p utils.MySQLBinlogPosition) (gomysql.Position, gomysql.MysqlGTIDSet, error)
func IsPositionStoreEvent ¶
func NewMongoPositionStore ¶
func NewMongoPositionStore(pipelineName string, conn *config.MongoConnConfig, pos *config.MongoPosition) (*mongoPositionStore, error)
func SerializeMySQLBinlogPosition ¶
func SerializeMySQLBinlogPosition(pos gomysql.Position, gtidSet gomysql.MysqlGTIDSet) utils.MySQLBinlogPosition
Types ¶
type ISerializablePosition ¶
type MongoPosition ¶
type MongoPosition struct { StartPosition config.MongoPosition `json:"start_position" bson:"start_position"` CurrentPosition config.MongoPosition `json:"current_position" bson:"current_position"` }
type MongoPositionStore ¶
type MongoPositionStore interface { Start() error Close() Get() config.MongoPosition Put(position config.MongoPosition) }
type MySQLPositionStore ¶
type MySQLPositionStore interface { Start() error Close() Get() utils.MySQLBinlogPosition Put(position utils.MySQLBinlogPosition) FSync() }
type MySQLTablePosition ¶
type MySQLTablePosition struct { Value interface{} `toml:"value" json:"value,omitempty"` Type string `toml:"type" json:"type"` Column string `toml:"column" json:"column"` }
func (MySQLTablePosition) MapString ¶
func (p MySQLTablePosition) MapString() (map[string]string, error)
func (MySQLTablePosition) MarshalJSON ¶
func (p MySQLTablePosition) MarshalJSON() ([]byte, error)
func (*MySQLTablePosition) UnmarshalJSON ¶
func (p *MySQLTablePosition) UnmarshalJSON(value []byte) error
type MySQLTablePositionState ¶
type MySQLTablePositionState struct { sync.Mutex `toml:"-" json:"-"` Start *utils.MySQLBinlogPosition `toml:"start-binlog" json:"start-binlog"` Min map[string]MySQLTablePosition `toml:"min" json:"min"` Max map[string]MySQLTablePosition `toml:"max" json:"max"` Current map[string]MySQLTablePosition `toml:"current" json:"current"` }
func (*MySQLTablePositionState) Get ¶
func (tablePositionState *MySQLTablePositionState) Get() interface{}
func (*MySQLTablePositionState) GetCurrent ¶
func (tablePositionState *MySQLTablePositionState) GetCurrent(sourceName string) (MySQLTablePosition, bool)
func (*MySQLTablePositionState) GetMaxMin ¶
func (tablePositionState *MySQLTablePositionState) GetMaxMin(sourceName string) (MySQLTablePosition, MySQLTablePosition, bool)
func (*MySQLTablePositionState) GetRaw ¶
func (tablePositionState *MySQLTablePositionState) GetRaw() string
func (*MySQLTablePositionState) GetStartBinlogPos ¶
func (tablePositionState *MySQLTablePositionState) GetStartBinlogPos() (utils.MySQLBinlogPosition, bool)
func (*MySQLTablePositionState) Put ¶
func (tablePositionState *MySQLTablePositionState) Put(pos interface{})
func (*MySQLTablePositionState) PutCurrent ¶
func (tablePositionState *MySQLTablePositionState) PutCurrent(sourceName string, pos MySQLTablePosition)
func (*MySQLTablePositionState) PutMaxMin ¶
func (tablePositionState *MySQLTablePositionState) PutMaxMin(sourceName string, max MySQLTablePosition, min MySQLTablePosition)
func (*MySQLTablePositionState) PutRaw ¶
func (tablePositionState *MySQLTablePositionState) PutRaw(pos string)
func (*MySQLTablePositionState) PutStartBinlogPos ¶
func (tablePositionState *MySQLTablePositionState) PutStartBinlogPos(p utils.MySQLBinlogPosition)
func (*MySQLTablePositionState) Stage ¶
func (tablePositionState *MySQLTablePositionState) Stage() config.InputMode
func (*MySQLTablePositionState) ToJSON ¶
func (tablePositionState *MySQLTablePositionState) ToJSON() (string, error)
type MySQLTablePositionStore ¶
type MySQLTablePositionStore interface { GetStartBinlogPos() (utils.MySQLBinlogPosition, bool) PutStartBinlogPos(position utils.MySQLBinlogPosition) GetMaxMin(sourceName string) (max MySQLTablePosition, min MySQLTablePosition, ok bool) PutMaxMin(sourceName string, max MySQLTablePosition, min MySQLTablePosition) GetCurrent(sourceName string) (MySQLTablePosition, bool) PutCurrent(sourceName string, pos MySQLTablePosition) Start() error Close() }
func NewMySQLTableLocalPositionStore ¶
func NewMySQLTableLocalPositionStore(fileName string) (MySQLTablePositionStore, error)
type PipelineGravityMySQLPosition ¶
type PipelineGravityMySQLPosition struct { CurrentPosition *utils.MySQLBinlogPosition `json:"current_position"` StartPosition *utils.MySQLBinlogPosition `json:"start_position"` }
func (*PipelineGravityMySQLPosition) Get ¶
func (p *PipelineGravityMySQLPosition) Get() interface{}
func (*PipelineGravityMySQLPosition) GetRaw ¶
func (p *PipelineGravityMySQLPosition) GetRaw() string
func (*PipelineGravityMySQLPosition) Put ¶
func (p *PipelineGravityMySQLPosition) Put(pos interface{})
func (*PipelineGravityMySQLPosition) PutRaw ¶
func (p *PipelineGravityMySQLPosition) PutRaw(pos string)
func (*PipelineGravityMySQLPosition) Stage ¶
func (p *PipelineGravityMySQLPosition) Stage() config.InputMode
func (*PipelineGravityMySQLPosition) String ¶
func (p *PipelineGravityMySQLPosition) String() string
Click to show internal directories.
Click to hide internal directories.