juju: github.com/juju/juju/worker/metrics/collect Index | Files

package collect

import "github.com/juju/juju/worker/metrics/collect"

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.


Package Files

context.go handler.go manifold.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a collect-metrics manifold.

type Clock Uses

type Clock interface {
    Now() time.Time

Clock represents time methods used by this package.

type Logger Uses

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

    Root() loggo.Logger

Logger represents the logging methods used in this package.

type ManifoldConfig Uses

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.

Package collect imports 26 packages (graph) and is imported by 29 packages. Updated 2020-07-22. Refresh now. Tools for package owners.