cache

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 10 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bolt

type Bolt struct {
	// contains filtered or unexported fields
}

func NewBolt

func NewBolt() *Bolt

func (*Bolt) Add

func (c *Bolt) Add(bucket string)

func (*Bolt) BatchPut added in v0.4.1

func (c *Bolt) BatchPut(bucket string, key, val []interface{}, ttl int64)

func (*Bolt) Close

func (c *Bolt) Close()

func (*Bolt) Delete added in v0.5.0

func (c *Bolt) Delete(bucket string, key interface{}) error

func (*Bolt) Get

func (c *Bolt) Get(bucket string, key, val interface{}) error

func (*Bolt) GetAll added in v0.5.0

func (c *Bolt) GetAll(bucket string, tk, tv interface{}, fn func(k, v interface{}))

GetAll

@Description: 获取bucket所有kv数据
@receiver *Bolt
@param bucket string
@param tk interface{} key类型转换临时变量
@param tv interface{} value类型转换临时变量
@param fn func(k, v interface{})

func (*Bolt) GetValue added in v0.5.3

func (c *Bolt) GetValue(bucket string, key interface{}) (int64, string, error)

func (*Bolt) ListBucket added in v0.5.3

func (c *Bolt) ListBucket() []string

func (*Bolt) ListKey added in v0.5.3

func (c *Bolt) ListKey(bucket string) []string

func (*Bolt) Open

func (c *Bolt) Open(file string)

func (*Bolt) Put

func (c *Bolt) Put(bucket string, key, val interface{}, ttl int64)

Jump to

Keyboard shortcuts

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