Versions in this module Expand all Collapse all v0 v0.2.2 Oct 26, 2021 Changes in this version + func Debug(context, msg string) + func Fatal(context, msg string, err error) + func Info(context, action string) + func ParseLevel(level string, defaultLevel zerolog.Level) zerolog.Level + func ResponseHandler(w http.ResponseWriter, r *http.Request, data []byte) + type Batch struct + func (b *Batch) Abort() + func (b *Batch) Commit() error + func (b *Batch) Delete(id, topic []byte) error + func (b *Batch) DeleteEntry(e *Entry) error + func (b *Batch) Put(topic, payload []byte) error + func (b *Batch) PutEntry(e *Entry) error + func (b *Batch) SetOptions(opts ...Options) + func (b *Batch) Write() error + type DB struct + func Open(path string, opts ...Options) (*DB, error) + func (db *DB) Batch(fn func(*Batch, <-chan struct{}) error) error + func (db *DB) Close() error + func (db *DB) Count() uint64 + func (db *DB) Delete(id, topic []byte) error + func (db *DB) DeleteEntry(e *Entry) error + func (db *DB) FileSize() (int64, error) + func (db *DB) Get(q *Query) (items [][]byte, err error) + func (db *DB) HandleVarz(w http.ResponseWriter, r *http.Request) + func (db *DB) NewContract() (uint32, error) + func (db *DB) NewID() []byte + func (db *DB) Put(topic, payload []byte) error + func (db *DB) PutEntry(e *Entry) error + func (db *DB) Sync() error + func (db *DB) Varz() (*Varz, error) + type Entry struct + Contract uint32 + Encryption bool + ExpiresAt uint32 + ID []byte + Payload []byte + Topic []byte + func NewEntry(topic, payload []byte) *Entry + func (e *Entry) WithContract(contract uint32) *Entry + func (e *Entry) WithEncryption() *Entry + func (e *Entry) WithID(id []byte) *Entry + func (e *Entry) WithPayload(payload []byte) *Entry + func (e *Entry) WithTTL(ttl string) *Entry + type Filter struct + func (f *Filter) Append(h uint64) + func (f *Filter) Test(h uint64) bool + type Meter struct + Aborts metrics.Counter + Dels metrics.Counter + Gets metrics.Counter + InBytes metrics.Counter + InMsgs metrics.Counter + Leases metrics.Counter + Metrics metrics.Metrics + OutBytes metrics.Counter + OutMsgs metrics.Counter + Puts metrics.Counter + Recovers metrics.Counter + Syncs metrics.Counter + TimeSeries metrics.TimeSeries + func NewMeter() *Meter + func (m *Meter) UnregisterAll() + type Options interface + func WithBackgroundKeyExpiry() Options + func WithBatchContract(contract uint32) Options + func WithBatchEncryption() Options + func WithBatchWriteInterval(dur time.Duration) Options + func WithBufferSize(size int64) Options + func WithDefaultBatchOptions() Options + func WithDefaultFlags() Options + func WithDefaultOptions() Options + func WithDefaultQueryLimit(limit int) Options + func WithDefaultQueryOptions() Options + func WithEncryption() Options + func WithEncryptionKey(key []byte) Options + func WithFreeBlockSize(size int64) Options + func WithMaxQueryLimit(limit int) Options + func WithMaxSyncDuration(dur time.Duration, interval int) Options + func WithMemdbSize(size int64) Options + func WithMutable() Options + type Query struct + Contract uint32 + Limit int + Topic []byte + func NewQuery(topic []byte) *Query + func (q *Query) WithContract(contract uint32) *Query + func (q *Query) WithLast(dur string) *Query + func (q *Query) WithLimit(limit int) *Query + type Varz struct + Aborts int64 + Count int64 + Dels int64 + Gets int64 + HMean float64 + InBytes int64 + InMsgs int64 + Leases int64 + Long5p float64 + Max float64 + Min float64 + Now time.Time + OutBytes int64 + OutMsgs int64 + P50 float64 + P75 float64 + P95 float64 + P99 float64 + P999 float64 + Puts int64 + Recovers int64 + Seq int64 + Short5p float64 + Start time.Time + StdDev float64 + Syncs int64 + Uptime string v0.2.2-alpha Oct 26, 2021