shard

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

func NewWriter

func NewWriter(id uint64, path string, opts ...WriterOption) *Writer

func (*Writer) Close

func (w *Writer) Close()

Close closes the writer.

func (*Writer) Err

func (w *Writer) Err() error

func (*Writer) Files

func (w *Writer) Files() []string

Files returns the full paths of all the files written by the Writer.

func (*Writer) ShardID

func (w *Writer) ShardID() uint64

ShardID returns the shard number of the writer.

func (*Writer) Write

func (w *Writer) Write(key []byte, values tsm1.Values)

func (*Writer) WriteV

func (w *Writer) WriteV(key []byte, values gen.Values)

type WriterOption

type WriterOption func(w *Writer)

func AutoNumber

func AutoNumber() WriterOption

AutoNumber will read the existing TSM file names and use generation + 1

func Generation

func Generation(gen int) WriterOption

Generation specifies the generation number of the tsm files.

func Sequence

func Sequence(seq int) WriterOption

Sequence specifies the starting sequence number of the tsm files.

func Temporary

func Temporary() WriterOption

Temporary configures the writer to create tsm.tmp files.

Jump to

Keyboard shortcuts

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