Documentation ¶
Index ¶
- Constants
- func CommmandGetResult(moduleId debug.ModuleId, operate uint16, output interface{}) bool
- func RegisterCommand(moduleId debug.ModuleId) *cobra.Command
- type Decoded
- type PacketCounter
- type SequentialDecoder
- func (d *SequentialDecoder) DecodeHeader(frameSize uint16) (bool, uint16)
- func (d *SequentialDecoder) Field(len int) []byte
- func (d *SequentialDecoder) NextPacket(meta *MetaPacket) bool
- func (d *SequentialDecoder) Seq() uint64
- func (d *SequentialDecoder) Skip(len int)
- func (d *SequentialDecoder) U16() uint16
- func (d *SequentialDecoder) U32() uint32
- func (d *SequentialDecoder) U64() uint64
- func (d *SequentialDecoder) U8() uint8
- type TridentAdapter
- func (a *TridentAdapter) Close() error
- func (a *TridentAdapter) GetCounter() interface{}
- func (a *TridentAdapter) GetInstances() []*tridentInstance
- func (a *TridentAdapter) GetStatsCounter() interface{}
- func (c *TridentAdapter) RecvCommand(conn *net.UDPConn, remote *net.UDPAddr, operate uint16, arg *bytes.Buffer)
- func (a *TridentAdapter) Start() error
- type TridentKey
Constants ¶
View Source
const ( ADAPTER_CMD_SHOW = iota ADAPTER_CMD_STATUS )
View Source
const ( DELTA_TIMESTAMP_LEN = 2 UDP_BUFFER_SIZE = 1 << 16 ICMP_TYPE_CODE = 2 ICMP_ID_SEQ = 4 ICMP_REST = 28 IPV6_ADDR_LEN = 16 COMPRESS_HEADER_SIZE = 21 // VERSION(1) + SEQ(8) + TIMESAMP(8) + IF_MAC(4) )
View Source
const ( ANALYZER_TRIDENT = 0xffffff00 // 压缩报文来自analyzer上的trident ANALYZER_TRIDNET_MASK = 0xff // 压缩报文来自analyzer上的trident时的掩码 )
View Source
const ( TRIDENT_TIMEOUT = 2 * time.Second BATCH_SIZE = 128 TRIDENT_DISPATCHER_MAX = 16 )
View Source
const (
QUEUE_BATCH_SIZE = 1024
)
Variables ¶
This section is empty.
Functions ¶
func CommmandGetResult ¶
Types ¶
type PacketCounter ¶
type SequentialDecoder ¶
type SequentialDecoder struct {
// contains filtered or unexported fields
}
func NewSequentialDecoder ¶
func NewSequentialDecoder(data []byte) *SequentialDecoder
func (*SequentialDecoder) DecodeHeader ¶
func (d *SequentialDecoder) DecodeHeader(frameSize uint16) (bool, uint16)
func (*SequentialDecoder) Field ¶
func (d *SequentialDecoder) Field(len int) []byte
func (*SequentialDecoder) NextPacket ¶
func (d *SequentialDecoder) NextPacket(meta *MetaPacket) bool
func (*SequentialDecoder) Seq ¶
func (d *SequentialDecoder) Seq() uint64
func (*SequentialDecoder) Skip ¶
func (d *SequentialDecoder) Skip(len int)
func (*SequentialDecoder) U16 ¶
func (d *SequentialDecoder) U16() uint16
func (*SequentialDecoder) U32 ¶
func (d *SequentialDecoder) U32() uint32
func (*SequentialDecoder) U64 ¶
func (d *SequentialDecoder) U64() uint64
func (*SequentialDecoder) U8 ¶
func (d *SequentialDecoder) U8() uint8
type TridentAdapter ¶
func NewTridentAdapter ¶
func NewTridentAdapter(in queue.QueueReader, queues []queue.QueueWriter, cacheSize uint32) *TridentAdapter
func (*TridentAdapter) GetCounter ¶
func (a *TridentAdapter) GetCounter() interface{}
func (*TridentAdapter) GetInstances ¶
func (a *TridentAdapter) GetInstances() []*tridentInstance
func (*TridentAdapter) GetStatsCounter ¶
func (a *TridentAdapter) GetStatsCounter() interface{}
func (*TridentAdapter) RecvCommand ¶
func (*TridentAdapter) Start ¶
func (a *TridentAdapter) Start() error
type TridentKey ¶
type TridentKey = uint32
Source Files ¶
Click to show internal directories.
Click to hide internal directories.