bstore

package
v0.0.0-...-081c383 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bstore implements the store interfaces with bolt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryCloser

type FactoryCloser interface {
	store.NestedFactory
	Close() error
}

FactoryCloser is a store.NestedFactory that holds open files, which Close releases.

func Directory

func Directory(dir string, permissions os.FileMode, opts *bolt.Options) FactoryCloser

Directory creates a FactoryCloser that keeps each store in its own bolt file, named for the store, in dir, which must exist. Each file holds the store's data in one root bucket. Files stay open until Close.

func Factory

func Factory(filename string, permissions os.FileMode, opts *bolt.Options) FactoryCloser

Factory creates a FactoryCloser for the bolt file at filename. Each store it returns is a top-level bucket in that file. The file is created and opened by the first call to NestedStore, using permissions and opts. It is opened once, and a bolt file can only be open once at a time.

Jump to

Keyboard shortcuts

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