Documentation
¶
Index ¶
- Variables
- func Add(name string, creator Creator)
- func AddDiagnoseRegistrar(r DiagnoseRegistrar)
- func MayApplyPartials(p any) error
- func MayDrop(t any)
- func MayGather(t any, q *safe.Queue[*types.Event])
- func MayInit(t any) error
- func MayPluginDrop(t any)
- func MayPluginInit(t any) error
- func MayRegisterDiagnoseTools(t any, registry *diagnose.ToolRegistry)
- type Creator
- type Diagnosable
- type DiagnoseRegistrar
- type Dropper
- type Gatherer
- type IApplyPartials
- type Initer
- type Instance
- type InstancesGetter
- type Plugin
- type PluginDropper
- type PluginIniter
Constants ¶
This section is empty.
Variables ¶
View Source
var DiagnoseRegistrars []DiagnoseRegistrar
View Source
var PluginCreators = map[string]Creator{}
Functions ¶
func AddDiagnoseRegistrar ¶
func AddDiagnoseRegistrar(r DiagnoseRegistrar)
func MayApplyPartials ¶
func MayPluginDrop ¶ added in v0.1.6
func MayPluginDrop(t any)
func MayPluginInit ¶ added in v0.1.6
func MayRegisterDiagnoseTools ¶
func MayRegisterDiagnoseTools(t any, registry *diagnose.ToolRegistry)
Types ¶
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 IApplyPartials ¶
type IApplyPartials interface {
ApplyPartials() error
}
type Instance ¶
type Instance interface {
GetLabels() map[string]string
GetInterval() config.Duration
GetAlerting() config.Alerting
GetDiagnoseConfig() config.DiagnoseConfig
}
func MayGetInstances ¶
type InstancesGetter ¶
type InstancesGetter interface {
GetInstances() []Instance
}
type PluginDropper ¶ added in v0.1.6
type PluginDropper interface {
PluginDrop()
}
PluginDropper is called once on the Plugin object after all Instance goroutines have stopped. Use for shared resource cleanup.
type PluginIniter ¶ added in v0.1.6
type PluginIniter interface {
PluginInit() error
}
PluginIniter is called once on the Plugin object after config unmarshal, before any Instance goroutines start. Use for shared resource initialization (e.g. Informer, connection pool, leader election).
Click to show internal directories.
Click to hide internal directories.