mysql

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2015 License: GPL-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TransactionsHashSize = 2 ^ 16
	TransactionTimeout   = 10 * 1e9
)
View Source
const (
	MysqlStateStart = iota
	MysqlStateEatMessage
	MysqlStateEatFields
	MysqlStateEatRows
)
View Source
const MAX_PAYLOAD_SIZE = 100 * 1024
View Source
const (
	MYSQL_CMD_QUERY = 3
)

Packet types

Variables

This section is empty.

Functions

This section is empty.

Types

type Mysql

type Mysql struct {
	Send_request  bool
	Send_response bool
	// contains filtered or unexported fields
}

func (*Mysql) GapInStream

func (mysql *Mysql) GapInStream(tcptuple *common.TcpTuple, dir uint8,
	private protos.ProtocolData) protos.ProtocolData

func (*Mysql) Init

func (mysql *Mysql) Init(test_mode bool, results chan common.MapStr) error

func (*Mysql) InitDefaults

func (mysql *Mysql) InitDefaults()

func (*Mysql) Parse

func (mysql *Mysql) Parse(pkt *protos.Packet, tcptuple *common.TcpTuple,
	dir uint8, private protos.ProtocolData) protos.ProtocolData

func (*Mysql) ReceivedFin

func (mysql *Mysql) ReceivedFin(tcptuple *common.TcpTuple, dir uint8,
	private protos.ProtocolData) protos.ProtocolData

type MysqlMessage

type MysqlMessage struct {
	Ts             time.Time
	IsRequest      bool
	PacketLength   uint32
	Seq            uint8
	Typ            uint8
	NumberOfRows   int
	NumberOfFields int
	Size           uint64
	Fields         []string
	Rows           [][]string
	Tables         string
	IsOK           bool
	AffectedRows   int
	InsertId       int
	IsError        bool
	ErrorCode      int
	ErrorInfo      string
	Query          string
	IgnoreMessage  bool

	Direction    uint8
	IsTruncated  bool
	TcpTuple     common.TcpTuple
	CmdlineTuple *common.CmdlineTuple
	Raw          []byte
	// contains filtered or unexported fields
}

type MysqlStream

type MysqlStream struct {
	// contains filtered or unexported fields
}

func (*MysqlStream) PrepareForNewMessage

func (stream *MysqlStream) PrepareForNewMessage()

type MysqlTransaction

type MysqlTransaction struct {
	Type string

	Src          common.Endpoint
	Dst          common.Endpoint
	ResponseTime int32
	Ts           int64
	JsTs         time.Time

	Query  string
	Method string
	Path   string // for mysql, Path refers to the mysql table queried
	Size   uint64

	Mysql common.MapStr

	Request_raw  string
	Response_raw string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL