Documentation
¶
Index ¶
- Constants
- Variables
- type RingBuffer
- func (rb *RingBuffer) AdvanceRead(n int)
- func (rb *RingBuffer) Cap() int
- func (rb *RingBuffer) Fill() (n int64, err error)
- func (rb *RingBuffer) Len() int
- func (rb *RingBuffer) Peek(n int) (bytes []byte, err error)
- func (rb *RingBuffer) PeekReadable() (rs Slice)
- func (rb *RingBuffer) PeekUptoAndIncluding(b byte) (readable Slice, err error)
- func (rb *RingBuffer) PeekWriteable() (rs Slice)
- func (rb *RingBuffer) Read(p []byte) (n int, err error)
- func (rb *RingBuffer) ReadLength() int64
- func (rb *RingBuffer) Reset(r io.Reader)
- func (rb *RingBuffer) Write(p []byte) (n int, err error)
- type Slice
- func (rs Slice) Bytes() []byte
- func (rs Slice) Equal(b []byte) bool
- func (rs Slice) First() []byte
- func (rs Slice) FirstByte() byte
- func (rs Slice) HasPrefix(prefix []byte) bool
- func (rs Slice) IsEmpty() bool
- func (rs Slice) Len() int
- func (rs Slice) LenFirst() int
- func (rs Slice) LenSecond() int
- func (rs Slice) Overlap() (o [6]byte, first, second int)
- func (rs Slice) ReadFrom(r io.Reader) (n int64, err error)
- func (rs Slice) Second() []byte
- func (rs Slice) Slice(left, right int) (b Slice)
- func (rs Slice) SliceUptoAndIncluding(b byte) (s Slice, ok bool)
- func (rs Slice) SliceUptoButExcluding(b byte) (s Slice, ok bool)
- func (rs Slice) Start() int64
- func (rs Slice) String() string
- func (rs Slice) WriteTo(w io.Writer) (n int64, err error)
Constants ¶
View Source
const DefaultSize = 4096
Variables ¶
View Source
var ErrBufferEmpty = fmt.Errorf("ringbuf: buffer empty")
Functions ¶
This section is empty.
Types ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
func (*RingBuffer) AdvanceRead ¶
func (rb *RingBuffer) AdvanceRead(n int)
func (*RingBuffer) Cap ¶
func (rb *RingBuffer) Cap() int
func (*RingBuffer) Fill ¶
func (rb *RingBuffer) Fill() (n int64, err error)
func (*RingBuffer) Len ¶
func (rb *RingBuffer) Len() int
func (*RingBuffer) PeekReadable ¶
func (rb *RingBuffer) PeekReadable() (rs Slice)
func (*RingBuffer) PeekUptoAndIncluding ¶
func (rb *RingBuffer) PeekUptoAndIncluding(b byte) (readable Slice, err error)
func (*RingBuffer) PeekWriteable ¶
func (rb *RingBuffer) PeekWriteable() (rs Slice)
func (*RingBuffer) ReadLength ¶
func (rb *RingBuffer) ReadLength() int64
func (*RingBuffer) Reset ¶
func (rb *RingBuffer) Reset(r io.Reader)
type Slice ¶
type Slice struct {
// contains filtered or unexported fields
}
func (Slice) SliceUptoAndIncluding ¶
func (Slice) SliceUptoButExcluding ¶
Click to show internal directories.
Click to hide internal directories.