Documentation ¶
Index ¶
- Constants
- func SetConfig(configs *Config) func(*BinLogService) error
- func SetLogger(logger *log.Logger) func(*BinLogService) error
- func SetQueueDirection(queueDirection QueueDirection) func(*BinLogService) error
- func SetQueueSize(size *uint16) func(*BinLogService) error
- type ActionType
- type BinLogEvent
- type BinLogService
- type BinlogParser
- type Config
- type DBModel
- type GameLogo
- type QueueDirection
Constants ¶
View Source
const (
DefaultActionChanSize uint16 = 500
)
Variables ¶
This section is empty.
Functions ¶
func SetConfig ¶
func SetConfig(configs *Config) func(*BinLogService) error
func SetQueueDirection ¶
func SetQueueDirection(queueDirection QueueDirection) func(*BinLogService) error
func SetQueueSize ¶
func SetQueueSize(size *uint16) func(*BinLogService) error
Types ¶
type ActionType ¶
type ActionType int8
const ( Insert ActionType = (1 + iota) Update Delete )
func (ActionType) String ¶
func (t ActionType) String() string
func (ActionType) Val ¶
func (t ActionType) Val() int8
type BinLogEvent ¶
type BinLogEvent struct { Type ActionType Value interface{} OldValue interface{} }
type BinLogService ¶
type BinLogService struct {
// contains filtered or unexported fields
}
func NewBilLogService ¶
func NewBilLogService(options ...func(*BinLogService) error) (*BinLogService, error)
func (*BinLogService) Close ¶
func (b *BinLogService) Close()
func (*BinLogService) Listen ¶
func (b *BinLogService) Listen()
func (*BinLogService) Subscriber ¶
func (b *BinLogService) Subscriber() <-chan interface{}
type BinlogParser ¶
type BinlogParser struct{}
func (*BinlogParser) GetBinLogData ¶
func (m *BinlogParser) GetBinLogData(element interface{}, e *canal.RowsEvent, n int) error
type DBModel ¶
type DBModel interface { TableName() string FromBinLog(fields ...interface{}) interface{} }
type GameLogo ¶
type GameLogo struct { ID int64 `json:"-" gorm:"primary_key;column:id;" sql:"type:int unsigned auto_increment"` GameID int64 `json:"game_id" gorm:"column:game_id;type:bigint;"` GameLogoURL string `json:"game_logo" gorm:"type:varchar(500);column:game_logo;"` }
func (GameLogo) FromBinLog ¶
func (GameLogo) FromBinLog(fields ...interface{}) interface{}
type QueueDirection ¶
type QueueDirection int8
const ( Ring QueueDirection = (1 + iota) Overflowing )
func (QueueDirection) String ¶
func (t QueueDirection) String() string
func (QueueDirection) Val ¶
func (t QueueDirection) Val() int8
Click to show internal directories.
Click to hide internal directories.