querylogger

package
v0.0.0-...-ac56535 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PollInterval = time.Second
)

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs the query logger worker, using the resource names defined in the supplied config.

Types

type Logger

type Logger interface {
	Warningf(string, ...interface{})
	Errorf(string, ...interface{})
}

Logger is the interface that is used to log issues with the slow query logger.

type ManifoldConfig

type ManifoldConfig struct {
	LogDir string
	Clock  clock.Clock
	Logger Logger
}

ManifoldConfig contains: - The names of other manifolds on which the DB accessor depends. - Other dependencies from ManifoldsConfig required by the worker.

func (ManifoldConfig) Validate

func (cfg ManifoldConfig) Validate() error

type WorkerConfig

type WorkerConfig struct {
	LogDir        string
	Clock         clock.Clock
	Logger        Logger
	StackGatherer func() []byte
}

WorkerConfig encapsulates the configuration options for the dbaccessor worker.

func (*WorkerConfig) Validate

func (c *WorkerConfig) Validate() error

Validate ensures that the config values are valid.

Jump to

Keyboard shortcuts

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