Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CornConf ¶
type CornConf struct {
Expression string `json:"expression"` // corn表达式
Type string `json:"type"` // 数据库类型
Host string `json:"host"` // 数据库地址
Username string `json:"username"` // 用户名
Password string `json:"password"` // 密码
DB string `json:"db"` // 库名称
Schema string `json:"schema"` // schema
Table string `json:"table"` // 表名称
Column string `json:"column"` // 字段名称
IDColumnName string `json:"id_column_name"` // id字段名称
TimestampColumnName string `json:"timestamp_column_name"` // 时间字段名称
}
type SyncMessage ¶
type SyncMiddleware ¶
type SyncMiddleware struct {
// contains filtered or unexported fields
}
func NewSyncMiddleware ¶
func NewSyncMiddleware(db *sql.DB, conf SyncConf) (*SyncMiddleware, error)
func (*SyncMiddleware) Close ¶
func (s *SyncMiddleware) Close()
func (*SyncMiddleware) ConsumeMessages ¶
func (s *SyncMiddleware) ConsumeMessages(ctx context.Context)
func (*SyncMiddleware) FullSync ¶
func (s *SyncMiddleware) FullSync() error
func (*SyncMiddleware) ListenAndConsume ¶
func (s *SyncMiddleware) ListenAndConsume() error
ListenAndConsume 消费端调用
func (*SyncMiddleware) ScheduleIncrementalSync ¶
func (s *SyncMiddleware) ScheduleIncrementalSync() error
Click to show internal directories.
Click to hide internal directories.