Documentation ¶
Index ¶
- type BinlogDumpBody
- type BinlogDumpGtidBody
- type ChangeUserBody
- type Columndef
- type ConnectOutReq
- type ConnectReq
- type CreateDBBody
- type DaemonReq
- type DebugReq
- type DelayedInsertReq
- type DropDBBody
- type EOFResp
- type ErrResp
- type FetchBody
- type FieldListBody
- type InitDBBody
- type OKResp
- type PingReq
- type ProcessKillBody
- type ProcessReq
- type QueryBody
- type QuitReq
- type RefreshBody
- type RegisterSlaveBody
- type ResetConnnetionReq
- type ResultSet
- type SetOptionBody
- type ShutdownBody
- type SleepReq
- type StatisticsReq
- type TableDumpBody
- type TimeReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinlogDumpBody ¶
BinlogDumpBody ...
func DecodeBinlogDumpReq ¶
func DecodeBinlogDumpReq(src *parse.Source) (*BinlogDumpBody, error)
DecodeBinlogDumpReq doc: https://dev.mysql.com/doc/internals/en/com-binlog-dump.html
func (*BinlogDumpBody) String ¶
func (p *BinlogDumpBody) String() string
type BinlogDumpGtidBody ¶
type BinlogDumpGtidBody struct { Flags int ServerID int BinlogFilenameLen int BinlogFilename string BinlogPos int ExtraData string }
BinlogDumpGtidBody ...
func DecodeBinlogDumpGtidReq ¶
func DecodeBinlogDumpGtidReq(src *parse.Source) (*BinlogDumpGtidBody, error)
DecodeBinlogDumpGtidReq doc: https://dev.mysql.com/doc/internals/en/com-binlog-dump-gtid.html
func (*BinlogDumpGtidBody) String ¶
func (p *BinlogDumpGtidBody) String() string
type ChangeUserBody ¶
ChangeUserBody change user body
func DecodeChangeUserReq ¶
func DecodeChangeUserReq(src *parse.Source) (*ChangeUserBody, error)
DecodeChangeUserReq 解码query请求 doc: https://dev.mysql.com/doc/internals/en/com-change-user.html
func (*ChangeUserBody) String ¶
func (q *ChangeUserBody) String() string
type Columndef ¶
type Columndef struct { // 0x03 def Schema string Table string OrgTable string ColName string OrgColName string // next_length always 0x0c Charset uint16 // 2bytes ColLength int // int<4> Type byte ExtraBytes []byte }
Columndef table的一个字段的定义
func DecodeColumnDef ¶
DecodeColumnDef 解码column定义
type ConnectOutReq ¶
type ConnectOutReq struct { }
ConnectOutReq connect req
func DecodeConnectOutReq ¶
func DecodeConnectOutReq(src *parse.Source) (*ConnectOutReq, error)
DecodeConnectOutReq 解码com_connect_out请求 doc: https://dev.mysql.com/doc/internals/en/com-connect-out.html
func (*ConnectOutReq) String ¶
func (q *ConnectOutReq) String() string
type ConnectReq ¶
type ConnectReq struct { }
ConnectReq connect req
func DecodeConnectReq ¶
func DecodeConnectReq(src *parse.Source) (*ConnectReq, error)
DecodeConnectReq 解码com_connect请求 doc: https://dev.mysql.com/doc/internals/en/com-connect.html
func (*ConnectReq) String ¶
func (q *ConnectReq) String() string
type CreateDBBody ¶
type CreateDBBody struct {
Database string
}
CreateDBBody create db body
func DecodeCreateDBReq ¶
func DecodeCreateDBReq(src *parse.Source) (*CreateDBBody, error)
DecodeCreateDBReq 解码create db请求 doc: https://dev.mysql.com/doc/internals/en/com-create-db.html
func (*CreateDBBody) String ¶
func (q *CreateDBBody) String() string
type DaemonReq ¶
type DaemonReq struct { }
DaemonReq daemon req
func DecodeDaemonReq ¶
DecodeDaemonReq 解码com daemon请求 doc: https://dev.mysql.com/doc/internals/en/com-daemon.html
type DebugReq ¶
type DebugReq struct { }
DebugReq debug req
func DecodeDebugReq ¶
DecodeDebugReq 解码com_debug请求 doc: https://dev.mysql.com/doc/internals/en/com-debug.html
type DelayedInsertReq ¶
type DelayedInsertReq struct { }
DelayedInsertReq delayed insert req
func DecodeDelayedInsertReq ¶
func DecodeDelayedInsertReq(src *parse.Source) (*DelayedInsertReq, error)
DecodeDelayedInsertReq 解码com delayed insert请求 doc: https://dev.mysql.com/doc/internals/en/com-delayed-insert.html
func (*DelayedInsertReq) String ¶
func (q *DelayedInsertReq) String() string
type DropDBBody ¶
type DropDBBody struct {
Database string
}
DropDBBody drop db body
func DecodeDropDBReq ¶
func DecodeDropDBReq(src *parse.Source) (*DropDBBody, error)
DecodeDropDBReq 解码drop db请求 doc: https://dev.mysql.com/doc/internals/en/com-drop-db.html
func (*DropDBBody) String ¶
func (q *DropDBBody) String() string
type EOFResp ¶
EOFResp EOF的返回
func DecodeEOFPacket ¶
DecodeEOFPacket 解码EOF的response doc: https://dev.mysql.com/doc/internals/en/packet-EOF_Packet.html
type ErrResp ¶
ErrResp 错误返回包
func DecodeErrPacket ¶
DecodeErrPacket 解码err response包 doc: https://dev.mysql.com/doc/internals/en/packet-ERR_Packet.html
type FetchBody ¶
FetchBody ...
func DecodeFetchReq ¶
DecodeFetchReq doc: https://dev.mysql.com/doc/internals/en/com-stmt-fetch.html
type FieldListBody ¶
FieldListBody field list body
func DecodeFieldListReq ¶
func DecodeFieldListReq(src *parse.Source) (*FieldListBody, error)
DecodeFieldListReq 解码com field list请求 doc: https://dev.mysql.com/doc/internals/en/com-field-list.html
func (*FieldListBody) String ¶
func (q *FieldListBody) String() string
type InitDBBody ¶
type InitDBBody struct {
Table string
}
InitDBBody init db body
func DecodeInitDBReq ¶
func DecodeInitDBReq(src *parse.Source) (*InitDBBody, error)
DecodeInitDBReq 解码init db请求 doc: https://dev.mysql.com/doc/internals/en/com-init-db.html
func (*InitDBBody) String ¶
func (q *InitDBBody) String() string
type OKResp ¶
type OKResp struct { Header byte AffectedRows int // lenenc_int LastInsertID int // lenenc_int StatusFlag int // 2 bytes Warnings int // 2 bytes ExtraBytes []byte }
OKResp OK的返回
func DecodeOKPacket ¶
DecodeOKPacket 解码OK的response doc: https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html
type PingReq ¶
type PingReq struct { }
PingReq ping req
func DecodePingReq ¶
DecodePingReq 解码com_ping请求 doc: https://dev.mysql.com/doc/internals/en/com-ping.html
type ProcessKillBody ¶
type ProcessKillBody struct {
ConnectionID int
}
ProcessKillBody process kill body
func DecodeProcessKillReq ¶
func DecodeProcessKillReq(src *parse.Source) (*ProcessKillBody, error)
DecodeProcessKillReq 解码com process kill请求 doc: https://dev.mysql.com/doc/internals/en/com-process-kill.html
func (*ProcessKillBody) String ¶
func (q *ProcessKillBody) String() string
type ProcessReq ¶
type ProcessReq struct { }
ProcessReq process req
func DecodeProcessReq ¶
func DecodeProcessReq(src *parse.Source) (*ProcessReq, error)
DecodeProcessReq 解码com_process_info请求 doc: https://dev.mysql.com/doc/internals/en/com-process-info.html
func (*ProcessReq) String ¶
func (q *ProcessReq) String() string
type QueryBody ¶
type QueryBody struct {
RawBody string
}
QueryBody query body
func DecodeQueryReq ¶
DecodeQueryReq 解码query请求 doc: https://dev.mysql.com/doc/internals/en/com-query.html
type QuitReq ¶
type QuitReq struct { }
QuitReq quit req
func DecodeQuitReq ¶
DecodeQuitReq 解码com_quit请求 doc: https://dev.mysql.com/doc/internals/en/com-quit.html
type RefreshBody ¶
type RefreshBody struct {
SubCMD int
}
RefreshBody refresh body
func DecodeRefreshReq ¶
func DecodeRefreshReq(src *parse.Source) (*RefreshBody, error)
DecodeRefreshReq 解码refresh请求 doc: https://dev.mysql.com/doc/internals/en/com-refresh.html
func (*RefreshBody) String ¶
func (q *RefreshBody) String() string
type RegisterSlaveBody ¶
type RegisterSlaveBody struct { ServerID int SlaveHostNameLen int SlaveHostName string SlaveUserLen int SlaveUser string SlavePasswordLen int SlavePassword string SlaveMysqlPort int ReplicationRank int MasterID int }
RegisterSlaveBody ...
func DecodeRegisterSlaveReq ¶
func DecodeRegisterSlaveReq(src *parse.Source) (*RegisterSlaveBody, error)
DecodeRegisterSlaveReq doc: https://dev.mysql.com/doc/internals/en/com-register-slave.html
func (*RegisterSlaveBody) String ¶
func (p *RegisterSlaveBody) String() string
type ResetConnnetionReq ¶
type ResetConnnetionReq struct { }
ResetConnnetionReq reset connection req
func DecodeResetConnectionReq ¶
func DecodeResetConnectionReq(src *parse.Source) (*ResetConnnetionReq, error)
DecodeResetConnectionReq 解码com reset connection请求 doc: https://dev.mysql.com/doc/internals/en/com-reset-connection.html
func (*ResetConnnetionReq) Map ¶
func (q *ResetConnnetionReq) Map() model.Map
Map 把self转成一个model.Map对象
func (*ResetConnnetionReq) String ¶
func (q *ResetConnnetionReq) String() string
type ResultSet ¶
ResultSet query的返回结果集
func DecodeResultSet ¶
DecodeResultSet 解码resultset包 doc: https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-ProtocolText::Resultset
type SetOptionBody ¶
type SetOptionBody struct {
Operation int
}
SetOptionBody set option body
func DecodeSetOptionReq ¶
func DecodeSetOptionReq(src *parse.Source) (*SetOptionBody, error)
DecodeSetOptionReq 解码refresh请求 doc: https://dev.mysql.com/doc/internals/en/com-set-option.html
func (*SetOptionBody) String ¶
func (q *SetOptionBody) String() string
type ShutdownBody ¶
type ShutdownBody struct {
ShutDown int
}
ShutdownBody shutdown body
func DecodeShutdownReq ¶
func DecodeShutdownReq(src *parse.Source) (*ShutdownBody, error)
DecodeShutdownReq 解码shutdown请求 doc: https://dev.mysql.com/doc/internals/en/com-shutdown.html
func (*ShutdownBody) String ¶
func (q *ShutdownBody) String() string
type SleepReq ¶
type SleepReq struct { }
SleepReq sleep req
func DecodeSleepReq ¶
DecodeSleepReq 解码com_sleep请求 doc: https://dev.mysql.com/doc/internals/en/com-sleep.html
type StatisticsReq ¶
type StatisticsReq struct { }
StatisticsReq statistics req
func DecodeStatisticsReq ¶
func DecodeStatisticsReq(src *parse.Source) (*StatisticsReq, error)
DecodeStatisticsReq 解码com_statistics请求 doc: https://dev.mysql.com/doc/internals/en/com-statistics.html
func (*StatisticsReq) String ¶
func (q *StatisticsReq) String() string
type TableDumpBody ¶
TableDumpBody ...
func DecodeTableDumpReq ¶
func DecodeTableDumpReq(src *parse.Source) (*TableDumpBody, error)
DecodeTableDumpReq doc: https://dev.mysql.com/doc/internals/en/com-table-dump.html
func (*TableDumpBody) String ¶
func (p *TableDumpBody) String() string
type TimeReq ¶
type TimeReq struct { }
TimeReq time req
func DecodeTimeReq ¶
DecodeTimeReq 解码com_time请求 doc: https://dev.mysql.com/doc/internals/en/com-time.html
Source Files ¶
- binlogdump.go
- binlogdumpgtid.go
- changeuser.go
- connect.go
- connectout.go
- createdb.go
- daemon.go
- debug.go
- delayedinsert.go
- dropdb.go
- fetch.go
- fieldlist.go
- initdb.go
- ping.go
- process.go
- processkill.go
- query.go
- quit.go
- refresh.go
- registerslave.go
- reof.go
- rerr.go
- resetconnection.go
- rok.go
- setoption.go
- shutdown.go
- sleep.go
- statistics.go
- tabledump.go
- time.go