Documentation ¶
Index ¶
- Constants
- func BuildMethodsMap(thrift_files map[string]parser.Thrift) map[string]*ThriftIdlMethod
- func New(testMode bool, results publish.Transactions, cfg *common.Config) (protos.Plugin, error)
- func ReadFiles(files []string) (map[string]parser.Thrift, error)
- type Thrift
- func (thrift *Thrift) ConnectionTimeout() time.Duration
- func (thrift *Thrift) GapInStream(tcptuple *common.TcpTuple, dir uint8, nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool)
- func (thrift *Thrift) GetPorts() []int
- func (thrift *Thrift) InitDefaults()
- func (thrift *Thrift) Parse(pkt *protos.Packet, tcptuple *common.TcpTuple, dir uint8, ...) protos.ProtocolData
- func (thrift *Thrift) ReceivedFin(tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData) protos.ProtocolData
- type ThriftField
- type ThriftFieldReader
- type ThriftIdl
- type ThriftIdlMethod
- type ThriftMessage
- type ThriftStream
- type ThriftTransaction
Constants ¶
View Source
const ( ThriftStartState = iota ThriftFieldState )
View Source
const ( ThriftVersionMask = 0xffff0000 ThriftVersion1 = 0x80010000 ThriftTypeMask = 0x000000ff )
View Source
const ( ThriftTypeStop = 0 ThriftTypeVoid = 1 ThriftTypeBool = 2 ThriftTypeByte = 3 ThriftTypeDouble = 4 ThriftTypeI16 = 6 ThriftTypeI32 = 8 ThriftTypeI64 = 10 ThriftTypeString = 11 ThriftTypeStruct = 12 ThriftTypeMap = 13 ThriftTypeSet = 14 ThriftTypeList = 15 ThriftTypeUtf8 = 16 ThriftTypeUtf16 = 17 )
Thrift types
View Source
const ( ThriftMsgTypeCall ThriftMsgTypeReply ThriftMsgTypeException ThriftMsgTypeOneway )
Thrift message types
View Source
const ( ThriftTBinary = 1 ThriftTCompact = 2 )
Thrift protocol types
View Source
const ( ThriftTSocket = 1 ThriftTFramed = 2 )
Thrift transport types
Variables ¶
This section is empty.
Functions ¶
func BuildMethodsMap ¶
func BuildMethodsMap(thrift_files map[string]parser.Thrift) map[string]*ThriftIdlMethod
Types ¶
type Thrift ¶
type Thrift struct { // config Ports []int StringMaxSize int CollectionMaxSize int DropAfterNStructFields int CaptureReply bool ObfuscateStrings bool Send_request bool Send_response bool TransportType byte ProtocolType byte PublishQueue chan *ThriftTransaction Idl *ThriftIdl // contains filtered or unexported fields }
func (*Thrift) ConnectionTimeout ¶
func (*Thrift) GapInStream ¶
func (thrift *Thrift) GapInStream(tcptuple *common.TcpTuple, dir uint8, nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool)
func (*Thrift) InitDefaults ¶
func (thrift *Thrift) InitDefaults()
func (*Thrift) Parse ¶
func (thrift *Thrift) Parse(pkt *protos.Packet, tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData) protos.ProtocolData
func (*Thrift) ReceivedFin ¶
func (thrift *Thrift) ReceivedFin(tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData) protos.ProtocolData
type ThriftField ¶
type ThriftFieldReader ¶
Functions to decode simple types They all have the same signature, returning the string value and the number of bytes consumed (off).
type ThriftIdl ¶
type ThriftIdl struct {
MethodsByName map[string]*ThriftIdlMethod
}
func NewThriftIdl ¶
func (*ThriftIdl) FindMethod ¶
func (thriftidl *ThriftIdl) FindMethod(name string) *ThriftIdlMethod
type ThriftIdlMethod ¶
type ThriftMessage ¶
type ThriftMessage struct { Ts time.Time TcpTuple common.TcpTuple CmdlineTuple *common.CmdlineTuple Direction uint8 IsRequest bool HasException bool Version uint32 Type uint32 Method string SeqId uint32 Params string ReturnValue string Exceptions string FrameSize uint32 Service string Notes []string // contains filtered or unexported fields }
func (*ThriftMessage) String ¶
func (m *ThriftMessage) String() string
type ThriftStream ¶
type ThriftStream struct {
// contains filtered or unexported fields
}
func (*ThriftStream) PrepareForNewMessage ¶
func (stream *ThriftStream) PrepareForNewMessage(flush bool)
type ThriftTransaction ¶
Click to show internal directories.
Click to hide internal directories.