indexing

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BucketCount = 256

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

Bucket is a collection of 256 files.

func OpenBucket

func OpenBucket(prefix string, valueSize int, create bool) (*Bucket, error)

func (*Bucket) Close

func (b *Bucket) Close() error

func (*Bucket) Read

func (b *Bucket) Read(i byte) ([]Entry, error)

func (*Bucket) Write

func (b *Bucket) Write(hash [32]byte, value []byte) error

type Entry

type Entry struct {
	Hash  [32]byte
	Value []byte
}

type File added in v1.4.0

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

func OpenFile added in v1.4.0

func OpenFile(filepath string, valueSize int, create bool) (*File, error)

func (*File) Close added in v1.4.0

func (f *File) Close() error

func (*File) ReadAt added in v1.4.0

func (f *File) ReadAt(buf []byte, off int64) (int, error)

func (*File) Write added in v1.4.0

func (f *File) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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