segments

package
v0.0.0-...-13a9267 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File interface {
	fs.File
	io.Writer
}

type Segment

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

Segment is a data file

func New

func New(file File) (*Segment, error)

New segment

func (*Segment) Append

func (s *Segment) Append(record records.Record) (int64, error)

Append a record

func (Segment) Offset

func (s Segment) Offset() int64

Offset of next append

func (*Segment) Read

func (s *Segment) Read(int64) (records.Record, error)

Read a record at a given offset

Jump to

Keyboard shortcuts

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