bbolt

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(db *bbolt.DB, bucketName string) *Cache

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Delete

func (c *Cache) Delete(k ...[]byte)

func (*Cache) Get

func (c *Cache) Get(k []byte) (v []byte)

func (*Cache) NewCache added in v0.3.7

func (c *Cache) NewCache(str string) cache.Cache

func (*Cache) Put

func (c *Cache) Put(k, v []byte)

func (*Cache) Range

func (c *Cache) Range(f func(key []byte, value []byte) bool)

type NoSynncEntry

type NoSynncEntry struct {
	Keys  [][]byte
	Value []byte
	Type  Type
}

type Nosync

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

func NewNosyncCache

func NewNosyncCache(db *bbolt.DB, bucketName string) *Nosync

NewNosyncCache It is not realtime cache, put is not blocking, get value maybe nil

func (*Nosync) Close

func (c *Nosync) Close() error

func (*Nosync) Delete

func (c *Nosync) Delete(k ...[]byte)

func (*Nosync) Get

func (c *Nosync) Get(k []byte) (v []byte)

func (*Nosync) Put

func (c *Nosync) Put(k, v []byte)

func (*Nosync) Range

func (c *Nosync) Range(f func(key []byte, value []byte) bool)

type Type

type Type byte
const (
	Delete Type = iota
	Put
)

Jump to

Keyboard shortcuts

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