boltdb

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bolt use the go.etcd.io/bbolt(github.com/etcd-io/bbolt) as cache driver

Index

Constants

View Source
const Name = "boltDB"

Name driver name

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

type BoltDB struct {
	cache.BaseDriver

	// Bucket name
	Bucket string
	// contains filtered or unexported fields
}

BoltDB definition

func New

func New(file string) *BoltDB

New a BuntDB instance

func (*BoltDB) Clear

func (c *BoltDB) Clear() error

Clear all data

func (*BoltDB) Close

func (c *BoltDB) Close() error

Close db

func (*BoltDB) Del

func (c *BoltDB) Del(key string) error

Del value by key

func (*BoltDB) DelMulti

func (c *BoltDB) DelMulti(keys []string) error

DelMulti values by multi key

func (*BoltDB) Get

func (c *BoltDB) Get(key string) any

Get value by key

func (*BoltDB) GetMulti

func (c *BoltDB) GetMulti(keys []string) map[string]any

GetMulti values by multi key

func (*BoltDB) Has

func (c *BoltDB) Has(key string) bool

Has value check by key

func (*BoltDB) Set

func (c *BoltDB) Set(key string, val any, _ time.Duration) (err error)

Set value by key

func (*BoltDB) SetMulti

func (c *BoltDB) SetMulti(values map[string]any, ttl time.Duration) (err error)

SetMulti values by multi key

Jump to

Keyboard shortcuts

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