recorder

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheNotOpen = errors.New("recorder: cache not open")

ErrCacheNotOpen is returned by Cache methods when the underlying badger DB has not been initialized via Open.

Functions

This section is empty.

Types

type Cache

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

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Exists

func (c *Cache) Exists(key string) (bool, error)

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, error)

func (*Cache) Open

func (c *Cache) Open(dir string) (err error)

func (*Cache) Set

func (c *Cache) Set(key string, val []byte) error

type Event

type Event any

type Index

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

func (*Index) Add

func (i *Index) Add(ctx context.Context, host, proto, method, normalizedPath string, status int) error

func (*Index) Close

func (i *Index) Close() error

func (*Index) Open

func (i *Index) Open(ctx context.Context, path string) (err error)

func (*Index) SetInferred

func (i *Index) SetInferred(ctx context.Context, key string, val []byte) error

type Indexer

type Indexer interface {
	Open(ctx context.Context, path string) error
	Close() error
	Add(ctx context.Context, host, proto, method, normalizedPath string, status int) error
}

type NoopIndexer

type NoopIndexer struct{}

func (NoopIndexer) Add

func (NoopIndexer) Close

func (NoopIndexer) Close() error

func (NoopIndexer) Open

type WAL

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

func (*WAL) Append

func (w *WAL) Append(ev Event) error

func (*WAL) Close

func (w *WAL) Close() error

func (*WAL) Open

func (w *WAL) Open(dir string) error

func (*WAL) Path

func (w *WAL) Path() string

func (*WAL) WithCache

func (w *WAL) WithCache(c *Cache)

func (*WAL) WithIndexer

func (w *WAL) WithIndexer(i Indexer)

func (*WAL) WithMaxBytes

func (w *WAL) WithMaxBytes(n int64)

func (*WAL) WithRedactors

func (w *WAL) WithRedactors(r ...*regexp.Regexp)

func (*WAL) WithSyncEvery

func (w *WAL) WithSyncEvery(d time.Duration)

Jump to

Keyboard shortcuts

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