Documentation ¶
Overview ¶
Package diagnostics provides some tools useful for gathering and exposing arbitrary diagnositcs information for external monitoring tools.
Possible usage: integration nodes list into dashboard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶ added in v1.5.0
type Registry struct {
// contains filtered or unexported fields
}
Registry performs all management of diagnostic. Specifically, it allows to registering new diagnostics sources and exposing them through the diagnostics server.
func (*Registry) EnableServer ¶ added in v1.5.0
EnableServer enables the diagnostics server on the given port. Data will be exposed on `/diagnostics` path in JSON format.
func (*Registry) RegisterSource ¶ added in v1.5.0
RegisterSource registers diagnostics source callback with a given name. Name will be used as a key and callback result as a value in JSON object during composing diagnostics JSON. Note: function will override existing diagnostics source on attempt to register another one with the same name.