Documentation ¶
Index ¶
- Variables
- type Buffer
- func (r *Buffer) AppendDataEvent(event SocketDataBuffer)
- func (r *Buffer) AppendDetailEvent(event SocketDataDetail)
- func (r *Buffer) Clean()
- func (r *Buffer) DataLength() int
- func (r *Buffer) DataSize() int64
- func (r *Buffer) DeleteExpireEvents(expireDuration time.Duration) int
- func (r *Buffer) DetailLength() int
- func (r *Buffer) Details() *list.List
- func (r *Buffer) DetectNotSendingLastPosition() *Position
- func (r *Buffer) FindFirstDataBuffer(dataID uint64) SocketDataBuffer
- func (r *Buffer) FirstSocketBuffer() SocketDataBuffer
- func (r *Buffer) IsCurrentPacketReadFinished() bool
- func (r *Buffer) LastSocketBuffer() SocketDataBuffer
- func (r *Buffer) Len() int
- func (r *Buffer) Merge(other *Buffer)
- func (r *Buffer) OffsetPosition(offset int) *Position
- func (r *Buffer) Peek(p []byte) (n int, err error)
- func (r *Buffer) Position() *Position
- func (r *Buffer) PrepareForReading() bool
- func (r *Buffer) Read(p []byte) (n int, err error)
- func (r *Buffer) ReadFromCurrent(p []byte) (element *list.Element, n int)
- func (r *Buffer) ReadUntilBufferFull(data []byte) error
- func (r *Buffer) RemoveReadElements() bool
- func (r *Buffer) ResetForLoopReading()
- func (r *Buffer) SkipCurrentElement() bool
- func (r *Buffer) Slice(validated bool, start, end *Position) *Buffer
- type Position
- type SocketDataBuffer
- type SocketDataDetail
- type SocketDataEventLimited
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotComplete = errors.New("socket: not complete event")
)
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func CombineSlices ¶
func (*Buffer) AppendDataEvent ¶
func (r *Buffer) AppendDataEvent(event SocketDataBuffer)
AppendDataEvent insert the event to the event list following the order
func (*Buffer) AppendDetailEvent ¶
func (r *Buffer) AppendDetailEvent(event SocketDataDetail)
func (*Buffer) DataLength ¶
func (*Buffer) DeleteExpireEvents ¶
func (*Buffer) DetailLength ¶
func (*Buffer) DetectNotSendingLastPosition ¶
DetectNotSendingLastPosition detect the buffer contains not sending data: the BPF limited socket data count
func (*Buffer) FindFirstDataBuffer ¶
func (r *Buffer) FindFirstDataBuffer(dataID uint64) SocketDataBuffer
func (*Buffer) FirstSocketBuffer ¶
func (r *Buffer) FirstSocketBuffer() SocketDataBuffer
func (*Buffer) IsCurrentPacketReadFinished ¶
IsCurrentPacketReadFinished means to validate the current reading package is reading finished
func (*Buffer) LastSocketBuffer ¶
func (r *Buffer) LastSocketBuffer() SocketDataBuffer
func (*Buffer) OffsetPosition ¶
func (*Buffer) PrepareForReading ¶
func (*Buffer) ReadFromCurrent ¶
func (*Buffer) ReadUntilBufferFull ¶
func (*Buffer) ResetForLoopReading ¶
func (r *Buffer) ResetForLoopReading()
func (*Buffer) SkipCurrentElement ¶
SkipCurrentElement skip current element in reader, if return true means have read finished
type SocketDataBuffer ¶
type SocketDataBuffer interface { // GenerateConnectionID for identity the buffer belong which connection GenerateConnectionID() string // BufferData of the buffer BufferData() []byte // TotalSize of socket data, the data may exceed the size of the BufferData() TotalSize() uint64 // Direction of the data, send or receive Direction() enums.SocketDataDirection // BufferStartPosition the buffer start index BufferStartPosition() int // BufferLen the buffer data length BufferLen() int // DataID data id of the buffer DataID() uint64 // DataSequence the data sequence under same data id DataSequence() int // IsStart this buffer is start of the same data id IsStart() bool // IsFinished this buffer is finish of the same data id IsFinished() bool // HaveReduceDataAfterChunk check have reduced data after current buffer HaveReduceDataAfterChunk() bool // StartTime the data start timestamp StartTime() uint64 // EndTime the data end timestamp EndTime() uint64 }
type SocketDataDetail ¶
type SocketDataDetail interface { // DataID data id of the buffer DataID() uint64 }
type SocketDataEventLimited ¶
type SocketDataEventLimited struct { SocketDataBuffer From int Size int }
func (*SocketDataEventLimited) BufferData ¶
func (s *SocketDataEventLimited) BufferData() []byte
func (*SocketDataEventLimited) BufferLen ¶
func (s *SocketDataEventLimited) BufferLen() int
func (*SocketDataEventLimited) BufferStartPosition ¶
func (s *SocketDataEventLimited) BufferStartPosition() int
Click to show internal directories.
Click to hide internal directories.