boltutil

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(p string, mode fs.FileMode, options *bolt.Options) (db.DB, error)

func SafeOpen added in v0.27.0

func SafeOpen(dbPath string, mode os.FileMode, opts *bolt.Options) (db db.DB, err error)

SafeOpen opens a bolt database with automatic recovery from corruption. If the database file is corrupted, it backs up the corrupted file and creates a new empty database. This is useful for disposable databases like cache or history where data loss is acceptable but startup failure is not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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