chunks

package
v0.0.0-...-146d7f1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: CC0-1.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type ChunkRange

type ChunkRange struct {
	L, R uint64
}

type Chunks

type Chunks struct {
	Dir                string
	ChunkNamePrefix    string
	CompressionLevel   int
	MaxEntriesPerChunk int
	MaxChunkSize       int
	// contains filtered or unexported fields
}

func (*Chunks) CloseReader

func (c *Chunks) CloseReader() error

func (*Chunks) Flush

func (c *Chunks) Flush() error

func (*Chunks) GetChunkRanges

func (c *Chunks) GetChunkRanges() []ChunkRange

func (*Chunks) GetLeftmostAbsentRange

func (c *Chunks) GetLeftmostAbsentRange(min, max uint64) (l uint64, r uint64, err error)

func (*Chunks) Open

func (c *Chunks) Open() error

func (*Chunks) ReadNext

func (c *Chunks) ReadNext() (uint64, []byte, error)

func (*Chunks) SeekReader

func (c *Chunks) SeekReader(pos uint64) error

func (*Chunks) Write

func (c *Chunks) Write(pos uint64, payload []byte) error

type ChunksInterface

type ChunksInterface interface {
	Open() error
	GetLeftmostAbsentRange(min, max uint64) (l uint64, r uint64, err error)
	Flush() error
	Write(pos uint64, payload []byte) error
	CloseReader() error
	SeekReader(pos uint64) error
	ReadNext() (uint64, []byte, error)
	GetChunkRanges() []ChunkRange
}

Jump to

Keyboard shortcuts

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