bbolt

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "bbolt"

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) Build

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

func (*Cfg) BuildOpts

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

type Client

type Client struct {
	*bolt.DB
}

func Get

func Get(name ...string) *Client

func (*Client) Kind

func (t *Client) Kind() string

func (*Client) Update

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

func (*Client) UpdateResObj

func (t *Client) UpdateResObj(val interface{})

func (*Client) View

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

Jump to

Keyboard shortcuts

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