evutil

package
v0.1.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TeeStore

func TeeStore(stores ...db.Storer) db.Storer

TeeStore stores to multiple stores

func ZipFields

func ZipFields(labels []string, values []string) (fields db.Fields)

ZipFields creates a field collection zipping labels and values

Types

type FieldCache

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

FieldCache is an in memory cache of field ids

func (*FieldCache) BlobID

func (c *FieldCache) BlobID(blob []byte) (id uint64, ok bool)

BlobID returns the id of raw fields

func (*FieldCache) Fields

func (c *FieldCache) Fields(id uint64) (fields db.Fields)

Fields gets fields by id

func (*FieldCache) ID

func (c *FieldCache) ID(fields db.Fields) (uint64, bool)

ID gets the id of fields

func (*FieldCache) Labels

func (c *FieldCache) Labels() (labels []string)

Labels returns the distinct cached labels

func (*FieldCache) Set

func (c *FieldCache) Set(id uint64, fields db.Fields) db.Fields

Set set a field to an id

func (*FieldCache) SetBlob

func (c *FieldCache) SetBlob(id uint64, blob []byte) db.Fields

SetBlob sets a raw field value to an id

type MemoryStore

type MemoryStore map[string]*MemoryStorer

func NewMemoryStore

func NewMemoryStore(events ...string) MemoryStore

func (MemoryStore) Scan

func (m MemoryStore) Scan(ctx context.Context, queries ...db.ScanQuery) (db.Results, error)

Scan implements the Scanner interface

func (MemoryStore) Storer

func (m MemoryStore) Storer(event string) db.Storer

type MemoryStorer

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

MemoryStorer is an in-memory EventStore for debugging

func (*MemoryStorer) Last

func (m *MemoryStorer) Last() *db.Snapshot

Last retuns the last posted StoreRequest

func (*MemoryStorer) Len

func (m *MemoryStorer) Len() int

Len retuns the number of stored snapshots

func (*MemoryStorer) Store

func (m *MemoryStorer) Store(s *db.Snapshot) error

Store implements EventStore interface

type MuxScanner

type MuxScanner map[string]db.ScanQuerier

func (MuxScanner) Add

func (m MuxScanner) Add(s db.ScanQuerier, events ...string) MuxScanner

func (MuxScanner) Scan

func (m MuxScanner) Scan(ctx context.Context, queries ...db.ScanQuery) (db.Results, error)

type MuxStore

type MuxStore map[string]db.Storer

func (MuxStore) Add

func (m MuxStore) Add(s db.Storer, events ...string) MuxStore

func (MuxStore) Storer

func (m MuxStore) Storer(event string) db.Storer

type StorerFunc

type StorerFunc func(s *db.Snapshot) error

StorerFunc is a function that implements Storer interface

func (StorerFunc) Store

func (fn StorerFunc) Store(s *db.Snapshot) error

Store implements storer interface

Jump to

Keyboard shortcuts

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