Documentation
¶
Index ¶
- type Client
- func (c *Client) FetchAlerts(ctx context.Context) ([]model.AlertEvent, error)
- func (c *Client) FetchDiagnostics(ctx context.Context) (*model.DiagnosticReport, error)
- func (c *Client) FetchSnapshot(ctx context.Context) (*model.SystemSnapshot, error)
- func (c *Client) GetHealth(ctx context.Context) (map[string]interface{}, error)
- type PrometheusExporter
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for communicating with remote Watchdog agents.
func (*Client) FetchAlerts ¶
FetchAlerts fetches active alerts from the remote agent.
func (*Client) FetchDiagnostics ¶
FetchDiagnostics fetches the latest DiagnosticReport from the remote agent.
func (*Client) FetchSnapshot ¶
FetchSnapshot fetches a live SystemSnapshot from the remote agent.
type PrometheusExporter ¶
type PrometheusExporter struct {
// contains filtered or unexported fields
}
PrometheusExporter generates Prometheus-compatible metrics from snapshots and reports.
func NewPrometheusExporter ¶
func NewPrometheusExporter() *PrometheusExporter
NewPrometheusExporter creates a new exporter instance.
func (*PrometheusExporter) Handler ¶
func (e *PrometheusExporter) Handler() http.HandlerFunc
Handler returns an HTTP handler for serving Prometheus metrics.
func (*PrometheusExporter) RenderMetrics ¶
func (e *PrometheusExporter) RenderMetrics() string
RenderMetrics renders the Prometheus text exposition format.
func (*PrometheusExporter) Update ¶
func (e *PrometheusExporter) Update( snap *model.SystemSnapshot, diag *model.DiagnosticReport, alerts []model.AlertEvent, anomalies *model.AnomalyReport, )
Update updates the exporter with the latest system data.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the Watchdog HTTP API server / remote agent.