Documentation
¶
Index ¶
- type ByteBuffer
- type ListBuffer
- func (l *ListBuffer) Bytes() int64
- func (l *ListBuffer) DiscardBytes(n int)
- func (l *ListBuffer) IsEmpty() bool
- func (l *ListBuffer) Len() int
- func (l *ListBuffer) PeekBytesList() [][]byte
- func (l *ListBuffer) PeekBytesListWithBytes(bs ...[]byte) [][]byte
- func (l *ListBuffer) Pop() *ByteBuffer
- func (l *ListBuffer) PushBack(b *ByteBuffer)
- func (l *ListBuffer) PushBytesBack(p []byte)
- func (l *ListBuffer) PushBytesFront(p []byte)
- func (l *ListBuffer) PushFront(b *ByteBuffer)
- func (l *ListBuffer) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteBuffer ¶
type ByteBuffer struct { Buf *bytebuffer.ByteBuffer // contains filtered or unexported fields }
type ListBuffer ¶
type ListBuffer struct {
// contains filtered or unexported fields
}
ListBuffer is a linked list of ByteBuffer.
func (*ListBuffer) Bytes ¶
func (l *ListBuffer) Bytes() int64
Bytes returns the amount of bytes in this list.
func (*ListBuffer) DiscardBytes ¶
func (l *ListBuffer) DiscardBytes(n int)
DiscardBytes removes some nodes based on n.
func (*ListBuffer) IsEmpty ¶
func (l *ListBuffer) IsEmpty() bool
IsEmpty reports whether l is empty.
func (*ListBuffer) PeekBytesList ¶
func (l *ListBuffer) PeekBytesList() [][]byte
PeekBytesList assembles the [][]byte based on the list of ByteBuffer, it won't remove these nodes from l until DiscardBytes() is called.
func (*ListBuffer) PeekBytesListWithBytes ¶
func (l *ListBuffer) PeekBytesListWithBytes(bs ...[]byte) [][]byte
PeekBytesListWithBytes is like PeekBytesList but accepts [][]byte and puts them onto head.
func (*ListBuffer) Pop ¶
func (l *ListBuffer) Pop() *ByteBuffer
Pop returns and removes the head of l. If l is empty, it returns nil.
func (*ListBuffer) PushBack ¶
func (l *ListBuffer) PushBack(b *ByteBuffer)
PushBack adds a new node to the tail of l.
func (*ListBuffer) PushBytesBack ¶
func (l *ListBuffer) PushBytesBack(p []byte)
PushBytesBack is a wrapper of PushBack, which accepts []byte as its argument.
func (*ListBuffer) PushBytesFront ¶
func (l *ListBuffer) PushBytesFront(p []byte)
PushBytesFront is a wrapper of PushFront, which accepts []byte as its argument.
func (*ListBuffer) PushFront ¶
func (l *ListBuffer) PushFront(b *ByteBuffer)
PushFront adds the new node to the head of l.