Documentation ¶
Index ¶
- Variables
- func AcquireStringsBuilder() *strings.Builder
- func AcquireTimer(timeout time.Duration) *time.Timer
- func AcquireWaitGroup() *sync.WaitGroup
- func Go(f func())
- func NewByteBuffer(min, max int) *byteBufferPool
- func NewByteSlice(min, max int) *byteSlicePool
- func ReleaseStringsBuilder(sb *strings.Builder)
- func ReleaseTimer(t *time.Timer)
- func ReleaseWaitGroup(wg *sync.WaitGroup)
- func ResetTimer(t *time.Timer, period time.Duration)
- type ByteBuffer
- func (bb *ByteBuffer) AppendFrom(data []byte)
- func (bb *ByteBuffer) AppendTo(data []byte) []byte
- func (bb *ByteBuffer) Bytes() *[]byte
- func (bb ByteBuffer) Cap() int
- func (bb *ByteBuffer) CopyFrom(data []byte)
- func (bb *ByteBuffer) CopyFromWithOffset(data []byte, offset int)
- func (bb *ByteBuffer) CopyTo(data []byte) []byte
- func (bb *ByteBuffer) Fill(data []byte, start, end int)
- func (bb *ByteBuffer) Len() int
- func (bb *ByteBuffer) Read(p []byte) (n int, err error)
- func (bb *ByteBuffer) Reset()
- func (bb *ByteBuffer) SetBytes(b *[]byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var Buffer = NewByteBuffer(4, 64<<10)
View Source
var Bytes = NewByteSlice(32, 64<<10)
View Source
var TinyBytes = NewByteSlice(4, 128)
Functions ¶
func AcquireStringsBuilder ¶ added in v0.6.27
func AcquireWaitGroup ¶
func NewByteBuffer ¶ added in v0.1.4
func NewByteBuffer(min, max int) *byteBufferPool
NewByteBuffer creates new byteBufferPool that reuses objects which size is in logarithmic range [min, max].
Note that it is a shortcut for Custom() constructor with Options provided by WithLogSizeMapping() and WithLogSizeRange(min, max) calls.
func NewByteSlice ¶ added in v0.1.4
func NewByteSlice(min, max int) *byteSlicePool
NewByteSlice creates new byteSlicePool that reuses objects which size is in logarithmic range [min, max].
Note that it is a shortcut for Custom() constructor with Options provided by WithLogSizeMapping() and WithLogSizeRange(min, max) calls.
func ReleaseStringsBuilder ¶ added in v0.6.27
func ReleaseTimer ¶
func ReleaseWaitGroup ¶
Types ¶
type ByteBuffer ¶ added in v0.1.4
type ByteBuffer struct {
// contains filtered or unexported fields
}
func (*ByteBuffer) AppendFrom ¶ added in v0.6.55
func (bb *ByteBuffer) AppendFrom(data []byte)
func (*ByteBuffer) AppendTo ¶ added in v0.6.55
func (bb *ByteBuffer) AppendTo(data []byte) []byte
func (*ByteBuffer) Bytes ¶ added in v0.1.4
func (bb *ByteBuffer) Bytes() *[]byte
func (ByteBuffer) Cap ¶ added in v0.2.6
func (bb ByteBuffer) Cap() int
func (*ByteBuffer) CopyFrom ¶ added in v0.6.55
func (bb *ByteBuffer) CopyFrom(data []byte)
func (*ByteBuffer) CopyFromWithOffset ¶ added in v0.7.1
func (bb *ByteBuffer) CopyFromWithOffset(data []byte, offset int)
func (*ByteBuffer) CopyTo ¶ added in v0.6.55
func (bb *ByteBuffer) CopyTo(data []byte) []byte
func (*ByteBuffer) Fill ¶ added in v0.1.9
func (bb *ByteBuffer) Fill(data []byte, start, end int)
func (*ByteBuffer) Len ¶ added in v0.1.9
func (bb *ByteBuffer) Len() int
func (*ByteBuffer) Reset ¶ added in v0.1.4
func (bb *ByteBuffer) Reset()
func (*ByteBuffer) SetBytes ¶ added in v0.1.4
func (bb *ByteBuffer) SetBytes(b *[]byte)
Click to show internal directories.
Click to hide internal directories.