Documentation
¶
Index ¶
- type EventAction
- type EventData
- func (z *EventData) DecodeMsg(dc *msgp.Reader) (err error)
- func (p *EventData) Encode() ([]byte, error)
- func (z *EventData) EncodeMsg(en *msgp.Writer) (err error)
- func (p *EventData) GetAction() string
- func (p *EventData) GetSchemal() string
- func (p *EventData) GetTable() string
- func (p *EventData) Length() int
- func (z *EventData) MarshalMsg(b []byte) (o []byte, err error)
- func (z *EventData) Msgsize() (s int)
- func (p *EventData) ToJsonArrary() (string, error)
- func (p *EventData) ToObjArrary(container interface{}) error
- func (z *EventData) UnmarshalMsg(bts []byte) (o []byte, err error)
- type TopicInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventAction ¶
type EventAction string
mysql 操作类型
const ( UpdateAction EventAction = "update" InsertAction EventAction = "insert" DeleteAction EventAction = "delete" )
func (*EventAction) DecodeMsg ¶
func (z *EventAction) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (EventAction) EncodeMsg ¶
func (z EventAction) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (EventAction) MarshalMsg ¶
func (z EventAction) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (EventAction) Msgsize ¶
func (z EventAction) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*EventAction) UnmarshalMsg ¶
func (z *EventAction) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type EventData ¶
type EventData struct {
Action EventAction
Schema string
Table string
Columns []string
//如果是update, Rows[i]是更新前的数据, Rows[i+1]是更新后的数据
Rows [][]interface{}
Owner TopicInfo `msg:"-"`
}
func (*EventData) GetSchemal ¶
func (*EventData) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*EventData) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*EventData) ToJsonArrary ¶
func (*EventData) ToObjArrary ¶
type TopicInfo ¶
func (TopicInfo) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.