bufpool

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 2 Imported by: 2

README

bufpool

Golang reusable buffer. Atomic ref counted buffer.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buf

type Buf struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func NewBuf

func NewBuf() *Buf

func (*Buf) Release

func (b *Buf) Release()

func (*Buf) Unref

func (b *Buf) Unref()

impl Unrefer for Buf

type BufArc

type BufArc struct {
	bytes.Buffer
	sync.Mutex
	// contains filtered or unexported fields
}

Atomically Reference Counted buffer

func NewBufArc

func NewBufArc() *BufArc

func (*BufArc) Ref

func (b *BufArc) Ref()

func (*BufArc) RefDelta

func (b *BufArc) RefDelta(delta int64)

impl ReferDelta for BufArc

func (*BufArc) Unref

func (b *BufArc) Unref()

impl Unrefer for BufArc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL