loader

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCheckpointPath

func WithCheckpointPath(path string) func(*Loader)

WithCheckpointPath specifies the path to the checkpoint a Loader should use.

Types

type Loader

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

Loader loads the trie from its checkpoint, or an empty trie if it does not have any checkpoint file.

func New

func New(options ...func(*Loader)) *Loader

New returns a new Loader with the given options.

func (*Loader) Checkpoint

func (l *Loader) Checkpoint() (*trie.MTrie, error)

Checkpoint loads its checkpoint if one was specified, and otherwise returns an empty trie. It errors when given a checkpoint with more than one single tree.

Jump to

Keyboard shortcuts

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