store

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLoadRejected = fmt.Errorf("message expired or deleted")
)

DB Errors

Functions

This section is empty.

Types

type Bolt

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

Bolt implements store.Engine with boltdb

var (
	// Bucket name for feeds
	Bucket = []byte("feeds")
	// Engine global client
	Engine *Bolt
)

func NewBolt

func NewBolt(dbFile string) (*Bolt, error)

NewBolt makes persitent boltdb based store

func (*Bolt) Close

func (b *Bolt) Close() error

Close db public method

func (*Bolt) Exists

func (b *Bolt) Exists(key []byte) bool

Exists Item md5 hashable key in store

func (*Bolt) Load

func (b *Bolt) Load(key []byte) (i *feed.Item, err error)

Load by key, removes on first access, checks expire

func (*Bolt) Remove

func (b *Bolt) Remove(key []byte) (err error)

Remove by key from store

func (*Bolt) Save

func (b *Bolt) Save(i *feed.Item) (err error)

Save with Item hashable key in store

Jump to

Keyboard shortcuts

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