pulsarstorage

package
v0.8.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerStorageImpl

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

func (*BadgerStorageImpl) Close

func (storage *BadgerStorageImpl) Close() error

func (*BadgerStorageImpl) GetLastPulse

func (storage *BadgerStorageImpl) GetLastPulse() (*core.Pulse, error)

func (*BadgerStorageImpl) SavePulse

func (storage *BadgerStorageImpl) SavePulse(pulse *core.Pulse) error

func (*BadgerStorageImpl) SetLastPulse

func (storage *BadgerStorageImpl) SetLastPulse(pulse *core.Pulse) error

type PulsarStorage

type PulsarStorage interface {
	GetLastPulse() (*core.Pulse, error)
	SetLastPulse(pulse *core.Pulse) error
	SavePulse(pulse *core.Pulse) error
	Close() error
}

func NewStorageBadger

func NewStorageBadger(conf configuration.Pulsar, opts *badger.Options) (PulsarStorage, error)

NewDB returns pulsar.storage.db with BadgerDB instance initialized by opts. Creates database in provided dir or in current directory if dir parameter is empty.

type RecordID

type RecordID string
const (
	LastPulseRecordID RecordID = "lastPulse"
	PulseRecordID     RecordID = "pulse"
)

Jump to

Keyboard shortcuts

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