package boltutil
import "github.com/moby/buildkit/util/db/boltutil"
Index ¶
- func Open(p string, mode fs.FileMode, options *bolt.Options) (db.DB, error)
- func SafeOpen(dbPath string, mode os.FileMode, opts *bolt.Options) (db db.DB, err error)
Functions ¶
func Open ¶
func SafeOpen ¶
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.
Source Files ¶
- Version
- v0.29.0-rc1
- Published
- Mar 25, 2026
- Platform
- darwin/amd64
- Imports
- 7 packages
- Last checked
- 44 seconds ago –
Tools for package owners.