collect

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

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

Documentation

Overview

Package collect provides a worker that executes the collect-metrics hook periodically, as long as the workload has been started (between start and stop hooks). collect-metrics executes in its own execution context, which is restricted to avoid contention with uniter "lifecycle" hooks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a collect-metrics manifold.

Types

type Clock

type Clock interface {
	Now() time.Time
}

Clock represents time methods used by this package.

type Logger

type Logger interface {
	Debugf(string, ...interface{})
	Tracef(string, ...interface{})

	Root() loggo.Logger
}

Logger represents the logging methods used in this package.

type ManifoldConfig

type ManifoldConfig struct {
	Period *time.Duration

	AgentName       string
	MetricSpoolName string
	CharmDirName    string

	Clock  Clock
	Logger Logger
}

ManifoldConfig identifies the resource names upon which the collect manifold depends.

Jump to

Keyboard shortcuts

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