bbolt

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "bolt"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg 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 DefaultCfg

func DefaultCfg() *Cfg

func (*Cfg) BuildOpts

func (t *Cfg) BuildOpts() *bolt.Options

func (*Cfg) Create added in v0.1.26

func (t *Cfg) Create() *bolt.DB

type Client

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

func New added in v0.2.2

func New(db *bolt.DB, log *logging.Logger) *Client

func (*Client) Delete added in v0.1.26

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

func (*Client) Get added in v0.1.26

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

func (*Client) List added in v0.1.26

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

func (*Client) Set added in v0.1.26

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

Jump to

Keyboard shortcuts

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