Documentation
¶
Overview ¶
Package server exposes the analyzer as a REST API and a web dashboard.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the dashboard and REST API. Reports are cached briefly so a busy dashboard doesn't hammer the API server.
func New ¶
func New(client *kube.Client, opts analyzer.Options, cacheTTL time.Duration, hist *history.Store) *Server
New returns a Server that analyzes via client, caches reports for cacheTTL, and records each fresh analysis in hist (may be nil to disable history).
func (*Server) EnableFleet ¶ added in v0.2.0
EnableFleet switches the server into fleet mode: the root page becomes the fleet overview and per-cluster routes are served from m. Call before Handler / ListenAndServe.
func (*Server) Handler ¶
Handler returns the HTTP routes for the dashboard, REST API and health probe.
func (*Server) ListenAndServe ¶
ListenAndServe blocks serving HTTP on addr.