Documentation
¶
Index ¶
- Variables
- type Header
- type MySQLMatcher
- type MySQLParser
- func (p *MySQLParser) EnableInferRequest() bool
- func (p *MySQLParser) EnableInferResponse() bool
- func (p *MySQLParser) ParseRequest(sockKey *types.SockKey, msg []byte) ([]protocols.ProtoRequest, error)
- func (p *MySQLParser) ParseResponse(sockKey *types.SockKey, msg []byte) ([]protocols.ProtoResponse, error)
- func (*MySQLParser) ProtoType() types.ProtocolType
- type MySQLRequest
- type MySQLResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooLongPayload = errors.New("too long payload") ErrNotMySQLPacket = errors.New("not mysql packet") )
Functions ¶
This section is empty.
Types ¶
type MySQLMatcher ¶
type MySQLMatcher struct {
// contains filtered or unexported fields
}
func NewMySQLMatcher ¶
func NewMySQLMatcher() *MySQLMatcher
func (*MySQLMatcher) MatchRequest ¶
func (m *MySQLMatcher) MatchRequest(req *protocols.Request) *perisco.ProtoMessage
MatchRequest implements protocols.ProtoMatcher.
func (*MySQLMatcher) MatchResponse ¶
func (m *MySQLMatcher) MatchResponse(resp *protocols.Response) *perisco.ProtoMessage
MatchResponse implements protocols.ProtoMatcher.
type MySQLParser ¶
type MySQLParser struct {
// contains filtered or unexported fields
}
MySQLParser should avoid false positives
MySQL packet:
0 8 16 24 32 +---------+---------+---------+---------+ | payload_length | seq_id | +---------+---------+---------+---------+ | | . ... body ... . . . . . +----------------------------------------
func NewMySQLParser ¶
func NewMySQLParser() *MySQLParser
func (*MySQLParser) EnableInferRequest ¶
func (p *MySQLParser) EnableInferRequest() bool
func (*MySQLParser) EnableInferResponse ¶
func (p *MySQLParser) EnableInferResponse() bool
func (*MySQLParser) ParseRequest ¶
func (p *MySQLParser) ParseRequest(sockKey *types.SockKey, msg []byte) ([]protocols.ProtoRequest, error)
ParseRequest implements protocols.ProtoParser.
func (*MySQLParser) ParseResponse ¶
func (p *MySQLParser) ParseResponse(sockKey *types.SockKey, msg []byte) ([]protocols.ProtoResponse, error)
ParseResponse implements protocols.ProtoParser.
func (*MySQLParser) ProtoType ¶
func (*MySQLParser) ProtoType() types.ProtocolType
ProtoType implements protocols.ProtoParser.
type MySQLRequest ¶
type MySQLRequest struct { PayloadLength int Command pb.MySQLCommand }
func (*MySQLRequest) ProtoType ¶
func (*MySQLRequest) ProtoType() types.ProtocolType
ProtoType implements ProtoRequest
func (*MySQLRequest) Protobuf ¶
func (r *MySQLRequest) Protobuf() *pb.Request
Protobuf implements ProtoRequest
type MySQLResponse ¶
type MySQLResponse struct { Type pb.MySQLResponseType AffectedRows uint64 ErrorCode uint16 }
func (*MySQLResponse) ProtoType ¶
func (*MySQLResponse) ProtoType() types.ProtocolType
ProtoType implements ProtoResponse
func (*MySQLResponse) Protobuf ¶
func (r *MySQLResponse) Protobuf() *pb.Response
Protobuf implements ProtoResponse
Click to show internal directories.
Click to hide internal directories.