Help us shape the future of Go! Take the 2026 Go Developer Survey

bbolt

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "bolt"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bolt.DB
	// contains filtered or unexported fields
}

func New

func New(cfg *Config, log log.Logger) *Client

func (*Client) Delete

func (t *Client) Delete(ctx context.Context, key string, names ...string) error

func (*Client) Get

func (t *Client) Get(ctx context.Context, key string, names ...string) result2.Result[[]byte]

func (*Client) List

func (t *Client) List(ctx context.Context, fn func(k, v []byte) error, names ...string) error

func (*Client) Set

func (t *Client) Set(ctx context.Context, key string, val []byte, names ...string) error

func (*Client) Update

func (t *Client) Update(ctx context.Context, fn func(*bolt.Bucket) error, names ...string) error

func (*Client) View

func (t *Client) View(ctx context.Context, fn func(*bolt.Bucket) error, names ...string) error

type Config

type Config struct {
	FileMode        fs.FileMode       `json:"file_mode"`
	Timeout         time.Duration     `json:"timeout"`
	NoGrowSync      bool              `json:"no_grow_sync"`
	NoFreelistSync  bool              `json:"no_freelist_sync"`
	FreelistType    bolt.FreelistType `json:"freelist_type"`
	ReadOnly        bool              `json:"read_only"`
	MmapFlags       int               `json:"mmap_flags"`
	InitialMmapSize int               `json:"initial_mmap_size"`
	PageSize        int               `json:"page_size"`
	NoSync          bool              `json:"no_sync"`
	Path            string            `json:"path"`
}

func DefaultConfig

func DefaultConfig() *Config

Jump to

Keyboard shortcuts

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