db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BucketMetadata = []byte(`Metadata`)
	BucketTask     = []byte(`Task`)
)

Functions

This section is empty.

Types

type Batch

type Batch struct {
	ID  int64
	Val int64
}

type DB

type DB struct {
	*bolt.DB
	Filename string
	Temp     string
	Output   string
	// contains filtered or unexported fields
}

func DefaultDB

func DefaultDB() *DB

func OpenDB

func OpenDB(output string) (result *DB, e error)

func (*DB) Finish

func (d *DB) Finish() (e error)

func (*DB) GetSize

func (d *DB) GetSize(id int64) (size utils.Size, e error)

func (*DB) Load

func (d *DB) Load(size, block utils.Size, modified string) error

func (*DB) SetSize

func (d *DB) SetSize(id, size int64) (e error)

type Metadata

type Metadata struct {
	Size     utils.Size
	Block    utils.Size
	Modified string
}

func (*Metadata) Marshal

func (m *Metadata) Marshal() ([]byte, error)

func (*Metadata) Unmarshal

func (m *Metadata) Unmarshal(b []byte) error

type Task

type Task struct {
	ID     int64
	Offset utils.Size
	Num    utils.Size
}

Jump to

Keyboard shortcuts

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