boltdb

package
v0.0.0-...-da200cc Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.

bolt is a db engine based on boltdb

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

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

BoltDB - represents a badger db implementation

func OpenBolt

func OpenBolt(path string) (*BoltDB, error)

OpenBolt - Opens the specified path

func (*BoltDB) Close

func (db *BoltDB) Close()

Close ...

func (*BoltDB) Del

func (db *BoltDB) Del(keys []string) error

Del - removes key(s) from the store

func (*BoltDB) GC

func (db *BoltDB) GC() error

GC - runs the garbage collector

func (*BoltDB) Get

func (db *BoltDB) Get(k string) (string, error)

Get - fetches the value of the specified k

func (*BoltDB) Incr

func (db *BoltDB) Incr(k string, by int64) (int64, error)

Incr - increment the key by the specified value

func (*BoltDB) MGet

func (db *BoltDB) MGet(keys []string) (data []string)

MGet - fetch multiple values of the specified keys

func (*BoltDB) MSet

func (db *BoltDB) MSet(data map[string]string) error

MSet - sets multiple key-value pairs

func (*BoltDB) Scan

func (db *BoltDB) Scan(scannerOpt kvstore.ScannerOptions) error

Scan - iterate over the whole store using the handler function

func (*BoltDB) Set

func (db *BoltDB) Set(k, v string, ttl int) error

Set - sets a key with the specified value and optional ttl

func (*BoltDB) Size

func (db *BoltDB) Size() int64

Size - returns the size of the database (LSM + ValueLog) in bytes

func (*BoltDB) TTL

func (db *BoltDB) TTL(key string) int64

TTL - returns the time to live of the specified key's value

Jump to

Keyboard shortcuts

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