plugins

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiagnoseRegistrars []DiagnoseRegistrar
View Source
var PluginCreators = map[string]Creator{}

Functions

func Add

func Add(name string, creator Creator)

func AddDiagnoseRegistrar

func AddDiagnoseRegistrar(r DiagnoseRegistrar)

func MayApplyPartials

func MayApplyPartials(p any) error

func MayDrop

func MayDrop(t any)

func MayGather

func MayGather(t any, q *safe.Queue[*types.Event])

func MayInit

func MayInit(t any) error

func MayRegisterDiagnoseTools

func MayRegisterDiagnoseTools(t any, registry *diagnose.ToolRegistry)

Types

type Creator

type Creator func() Plugin

type Diagnosable

type Diagnosable interface {
	RegisterDiagnoseTools(registry *diagnose.ToolRegistry)
}

type DiagnoseRegistrar

type DiagnoseRegistrar func(registry *diagnose.ToolRegistry)

DiagnoseRegistrar registers diagnostic tools that are independent of any alert-collecting plugin (e.g. system-level troubleshooting utilities).

type Dropper

type Dropper interface {
	Drop()
}

type Gatherer

type Gatherer interface {
	Gather(*safe.Queue[*types.Event])
}

type IApplyPartials

type IApplyPartials interface {
	ApplyPartials() error
}

type Initer

type Initer interface {
	Init() error
}

type Instance

type Instance interface {
	GetLabels() map[string]string
	GetInterval() config.Duration
	GetAlerting() config.Alerting
	GetDiagnoseConfig() config.DiagnoseConfig
}

func MayGetInstances

func MayGetInstances(t any) []Instance

type InstancesGetter

type InstancesGetter interface {
	GetInstances() []Instance
}

type Plugin

type Plugin interface {
	GetLabels() map[string]string
	GetInterval() config.Duration
}

Jump to

Keyboard shortcuts

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