txn

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TTL = 24 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Txn

type Txn struct {
	Db *badger.DB
}

func NewTxn

func NewTxn(path string) (*Txn, error)

func (*Txn) Close

func (txns *Txn) Close()

func (*Txn) Delete

func (tsns *Txn) Delete(key []byte) error

func (*Txn) Get

func (txns *Txn) Get(key []byte) ([]byte, error)

func (*Txn) GetStr

func (txns *Txn) GetStr(key []byte) (string, error)

func (*Txn) Set

func (tsns *Txn) Set(key, value []byte) error

func (*Txn) SetWithTTL

func (tsns *Txn) SetWithTTL(key, value []byte, ttl time.Duration) error

Jump to

Keyboard shortcuts

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