Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(pdnsAPIURL, pdnsAPIKey string, adminAddr string, logger *slog.Logger, operatorDeps *OperatorDeps) (http.Handler, error)
NewHandler returns an http.Handler that serves the powerdns-webui at /, reverse-proxies /api/ requests to the PowerDNS API, and mounts operator endpoints under /operator/ (census, recovery, trust management). adminAddr is the configured listen address (e.g., "127.0.0.1:8056") for CSRF origin validation.
Types ¶
type ObservabilityHandler ¶ added in v0.1.6
type ObservabilityHandler struct {
// contains filtered or unexported fields
}
ObservabilityHandler serves system health, metrics, fleet summary, and audit log.
func (*ObservabilityHandler) AuditLog ¶ added in v0.1.6
func (h *ObservabilityHandler) AuditLog(c *gin.Context)
AuditLog returns paginated audit entries with filters.
func (*ObservabilityHandler) FleetSummary ¶ added in v0.1.6
func (h *ObservabilityHandler) FleetSummary(c *gin.Context)
FleetSummary returns aggregate fleet stats, cached for 30 seconds.
func (*ObservabilityHandler) Metrics ¶ added in v0.1.6
func (h *ObservabilityHandler) Metrics(c *gin.Context)
Metrics returns the raw metrics snapshot.
func (*ObservabilityHandler) SystemHealth ¶ added in v0.1.6
func (h *ObservabilityHandler) SystemHealth(c *gin.Context)
SystemHealth returns system health snapshot with alerts. No DB queries.
type OperatorDeps ¶ added in v0.1.5
type OperatorDeps struct {
CensusStore *store.CensusStore
DeviceStore *store.DeviceStore
AuditStore *store.AuditStore
RecoveryStore *store.RecoveryStore
AccountStore *store.AccountStore
CensusSvc *service.CensusService
RecoverySvc *service.RecoveryService
// Observability dashboard deps
NexusStore *store.NexusStore
Pool *pgxpool.Pool
NonceStore *auth.NonceStore
PendingCounter PendingCounter
CensusAnalysisInterval time.Duration
MaxPendingEnrollments int
}
OperatorDeps holds dependencies for operator API endpoints on the admin server.
type PendingCounter ¶ added in v0.1.6
type PendingCounter interface {
PendingCount() int
}
PendingCounter exposes the pending enrollment count from DeviceService.