block

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultNameFormat = simpleNameFormat{}

Functions

This section is empty.

Types

type Database

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

func Open

func Open(path string, options ...Option) (_ *Database, err error)

func (*Database) Begin

func (d *Database) Begin(prefix *record.Key, writable bool) keyvalue.ChangeSet

Begin begins a change set.

func (*Database) Close

func (db *Database) Close() error

type NameFormat

type NameFormat interface {
	Format(*blockID) string
	Parse(string) (*blockID, error)
}

type Option

type Option func(*Database)

func FilterFiles

func FilterFiles(fn func(string) bool) Option

func WithFileLimit

func WithFileLimit(limit int64) Option

func WithNameFormat

func WithNameFormat(fmt NameFormat) Option

Jump to

Keyboard shortcuts

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