modules

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorEntry

type CollectorEntry struct {
	Category  api.MetricCategory
	Interval  time.Duration
	Collector CollectorFunc
}

type CollectorFunc

type CollectorFunc func(at time.Time) (api.MetricSample, error)

type ControllerEntry

type ControllerEntry struct {
	Type       api.CommandType
	Controller ControllerFunc
}

type ControllerFunc

type ControllerFunc func(cmd *api.Command) error

type Module

type Module interface {
	Name() string
	Registration() any
	CollectorEntries() []CollectorEntry
	ControllerEntries() []ControllerEntry
}

type RegisteredCollectorEntry

type RegisteredCollectorEntry struct {
	Module    string
	Category  api.MetricCategory
	Interval  time.Duration
	Collector CollectorFunc
}

type Registry

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

func NewRegistry

func NewRegistry(mods ...Module) (*Registry, error)

func (*Registry) CollectorEntries

func (r *Registry) CollectorEntries() []RegisteredCollectorEntry

func (*Registry) ExecuteController

func (r *Registry) ExecuteController(cmd *api.Command) error

func (*Registry) ModuleMetadata

func (r *Registry) ModuleMetadata() map[string]any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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