boltstore

package
v0.0.0-...-bda66fc Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStore

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

BoltStore stores its persistence data in a boltdb (github.com/coreos/bbolt)

func New

func New(o store.Options) (*BoltStore, error)

New returns a fresh initialized store

func (*BoltStore) Add

func (b *BoltStore) Add(d *site.Site) error

Add stores the data in the database

func (*BoltStore) Close

func (b *BoltStore) Close()

Close releases the lock on the db

func (*BoltStore) Get

func (b *BoltStore) Get(h hash.Hash) *site.Site

Get retrieves data from the database

func (*BoltStore) GetTips

func (b *BoltStore) GetTips() []hash.Hash

GetTips returns the saved tips

func (*BoltStore) Hashes

func (b *BoltStore) Hashes() []hash.Hash

Hashes returns all stored hashes

func (*BoltStore) Init

func (b *BoltStore) Init(o store.Options) error

Init the store

func (*BoltStore) SetTips

func (b *BoltStore) SetTips(add hash.Hash, del []*site.Site)

SetTips applies the delata of tips

func (*BoltStore) Size

func (b *BoltStore) Size() int

Size returns the count of elements in the data bucket

Jump to

Keyboard shortcuts

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