bolt

package
v0.0.0-...-768eb72 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	*blt.DB
}

Store wraps a bolt DB and fulfills the store.StreamStore interface.

func New

func New(path string) (b *Store, err error)

New creates a bolt Store at the provided file path.

func (*Store) CreateStream

func (b *Store) CreateStream(name string, s *stream.Stream) (err error)

CreateStream saves the provided stream at name, returns an error if a stream already exists at that address.

func (*Store) DeleteStream

func (b *Store) DeleteStream(name string) (err error)

DeleteStream deletes the stream stored at name, or returns an error if no such stream exists.

func (*Store) GetStream

func (b *Store) GetStream(name string) (s *stream.Stream, err error)

GetStream returns the stream stored at name, or an error if the stream does not exist, or has corrupted data.

func (*Store) ListStreams

func (b *Store) ListStreams(pageNum, pageSize int) (s []*stream.Stream, err error)

ListStreams returns a paged list of streams, or an error if none are found.

func (*Store) UpdateStream

func (b *Store) UpdateStream(name string, s *stream.Stream) (err error)

UpdateStream overwrites the stream at name with the provided stream, or returns an error if no stream exists at name.

Jump to

Keyboard shortcuts

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