panopticon

package module
v0.0.0-...-0ec3a55 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

README

panopticon

WIP

A data store and filter engine using badger and voyeur

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFilter

func BuildFilter(s *Store, f func(context.Context, *Store, voyeur.Emitter, voyeur.Event)) voyeur.Filter

func Fwd

func Fwd(ctx context.Context, s *Store, em voyeur.Emitter, e voyeur.Event)

Types

type DB

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

func NewDB

func NewDB(bdg *badger.DB, spec FilterSpec) (*DB, error)

func (*DB) Put

func (db *DB) Put(ctx context.Context, key, value []byte) error

type FilterSpec

type FilterSpec map[string]func(context.Context, *Store, voyeur.Emitter, voyeur.Event)

func (FilterSpec) Sorted

func (s FilterSpec) Sorted() []string

type NewMessageEvent

type NewMessageEvent struct {
	Key   []byte
	Path  binpath.Path
	Seq   uint64
	Value []byte
}

func (NewMessageEvent) EventType

func (e NewMessageEvent) EventType() string

type PutEvent

type PutEvent struct {
	Path  binpath.Path
	Value []byte
}

func (PutEvent) EventType

func (e PutEvent) EventType() string

type Store

type Store struct {
	voyeur.Filter
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *badger.DB, f voyeur.Filter) *Store

func (*Store) Get

func (s *Store) Get(path binpath.Path) (data []byte, err error)

func (*Store) GetStore

func (s *Store) GetStore(path binpath.Path) *Store

func (*Store) MkSubStore

func (s *Store) MkSubStore(rel string, filterFunc func(context.Context, *Store, voyeur.Emitter, voyeur.Event)) (*Store, error)

func (*Store) Put

func (s *Store) Put(path binpath.Path, data []byte) error

Jump to

Keyboard shortcuts

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