eventsdb

package
v0.0.0-...-c13d752 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventAppStart    = "app_start"
	EventAppShutdown = "app_shutdown"
)

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    string `msgpack:"t"`
	Message string `msgpack:"m"`
	ID      *id.ID `msgpack:"-"`
}

type EventsDB

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

func New

func New(path string) (*EventsDB, error)

func (*EventsDB) Add

func (db *EventsDB) Add(event *Event) error

func (*EventsDB) AddAt

func (db *EventsDB) AddAt(event *Event, t time.Time) error

func (*EventsDB) Close

func (db *EventsDB) Close() error

func (*EventsDB) List

func (db *EventsDB) List(cursor string, limit int) ([]*Event, string, error)

Jump to

Keyboard shortcuts

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