ringbuffer

package
v0.0.0-...-7f8ad27 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoData = 0xFFFFFFFFFFFFFFFF
)

Variables

View Source
var New = func(size int) *RingBuffer {
	b := &RingBuffer{
		Size:   size,
		buffer: make([]unsafe.Pointer, size),
	}
	b.writeIndex = NoData
	return b
}

Functions

This section is empty.

Types

type RingBuffer

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

func (*RingBuffer) LastIndex

func (b *RingBuffer) LastIndex() uint64

func (*RingBuffer) ReadAt

func (b *RingBuffer) ReadAt(readIndex uint64) (*rafthashi.Log, uint64, error)

func (*RingBuffer) Write

func (b *RingBuffer) Write(data *rafthashi.Log) (uint64, error)

Jump to

Keyboard shortcuts

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