bbolt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 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 Entry

type Entry struct {
	LifeTime time.Time `json:"life_time"`
	Val      string    `json:"val"`
}

type Option

type Option struct {
	TTL             int // sec
	Path            string
	Prefix          string
	BucketName      string
	BoltOpt         *bolt.Options
	CleanupInterval int
}

type PineBolt added in v0.0.4

type PineBolt struct {
	*bolt.DB
	*Option
}

func New

func New(opt Option) *PineBolt

func (*PineBolt) BoltDB added in v0.0.4

func (b *PineBolt) BoltDB() *bolt.DB

func (*PineBolt) Delete added in v0.0.4

func (b *PineBolt) Delete(key string) error

func (*PineBolt) Exists added in v0.0.4

func (b *PineBolt) Exists(key string) bool

func (*PineBolt) Get added in v0.0.4

func (b *PineBolt) Get(key string) (val []byte, err error)

func (*PineBolt) GetWithUnmarshal added in v0.0.4

func (b *PineBolt) GetWithUnmarshal(key string, receiver interface{}) error

func (*PineBolt) Set added in v0.0.4

func (b *PineBolt) Set(key string, val []byte, ttl ...int) error

func (*PineBolt) SetWithMarshal added in v0.0.4

func (b *PineBolt) SetWithMarshal(key string, structData interface{}, ttl ...int) error

Jump to

Keyboard shortcuts

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