eventsdb

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(cfg *config.Config)

Types

type EventsDB

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

func NewEventsDB

func NewEventsDB(db db.DB) *EventsDB

func (*EventsDB) AddEvent

func (db *EventsDB) AddEvent(height uint64, event e.Event)

func (*EventsDB) FlushEvents

func (db *EventsDB) FlushEvents() error

func (*EventsDB) LoadEvents

func (db *EventsDB) LoadEvents(height uint64) e.Events

type IEventsDB

type IEventsDB interface {
	AddEvent(height uint64, event e.Event)
	LoadEvents(height uint64) e.Events
	FlushEvents() error
}

func GetCurrent

func GetCurrent() IEventsDB

type NOOPEventsDB

type NOOPEventsDB struct {
}

func (NOOPEventsDB) AddEvent

func (NOOPEventsDB) AddEvent(height uint64, event e.Event)

func (NOOPEventsDB) FlushEvents

func (NOOPEventsDB) FlushEvents() error

func (NOOPEventsDB) LoadEvents

func (NOOPEventsDB) LoadEvents(height uint64) e.Events

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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