ringbuffer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RingerBufferClosed = errors.New("ring buffer is closed")
)

Functions

This section is empty.

Types

type RingBuffer

type RingBuffer struct {
	// contains filtered or unexported fields
}

func NewRingBuffer

func NewRingBuffer(size uint64) *RingBuffer

func (*RingBuffer) Capacity

func (rb *RingBuffer) Capacity() uint64

func (*RingBuffer) Close

func (rb *RingBuffer) Close()

func (*RingBuffer) IsClosed

func (rb *RingBuffer) IsClosed() bool

func (*RingBuffer) Length

func (rb *RingBuffer) Length() uint64

func (*RingBuffer) Open

func (rb *RingBuffer) Open()

func (*RingBuffer) Pop

func (rb *RingBuffer) Pop() (*protocol.PacketV0, error)

func (*RingBuffer) Push

func (rb *RingBuffer) Push(item *protocol.PacketV0) error

Jump to

Keyboard shortcuts

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