pathdb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapDB

func WrapDB(pathDB storage.PathDB, cfg Config) storage.PathDB

WrapDB wraps the given PathDB into one that also exports metrics. dbName will be added as a label to all metrics, so that multiple path DBs can be differentiated.

Types

type Config

type Config struct {
	Driver       string
	QueriesTotal metrics.Counter
}

type Observer

type Observer struct {
	Cfg Config
}

func (*Observer) Observe

func (c *Observer) Observe(ctx context.Context, op promOp, action func(ctx context.Context) error)

Jump to

Keyboard shortcuts

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