Documentation
¶
Index ¶
- type Config
- type Server
- func (s *Server) DashboardHandler() http.Handler
- func (s *Server) Handler() http.Handler
- func (s *Server) ListenAndServe(ctx context.Context) error
- func (s *Server) SetAudit(a *audit.Log)
- func (s *Server) SetCompliance(c *compliance.Scheduler)
- func (s *Server) SetLiveness(m *liveness.Monitor)
- func (s *Server) SetObservability(o *observability.Store)
- func (s *Server) SetTemplates(t *templates.Store)
- func (s *Server) SetWebhooks(d *webhooks.Dispatcher)
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 is the Koor HTTP server.
func New ¶
func New(cfg Config, stateStore *state.Store, specReg *specs.Registry, eventBus *events.Bus, instanceReg *instances.Registry, mcpHandler http.Handler, logger *slog.Logger) *Server
New creates a new Server.
func (*Server) DashboardHandler ¶
DashboardHandler returns the HTTP handler for the dashboard (separate port). It proxies /api/* and /health to the API server, serves HTMX rules pages, and embedded static files.
func (*Server) ListenAndServe ¶
ListenAndServe starts the API server and optionally the dashboard server. It blocks until the context is cancelled.
func (*Server) SetCompliance ¶
func (s *Server) SetCompliance(c *compliance.Scheduler)
SetCompliance attaches a compliance scheduler.
func (*Server) SetLiveness ¶
SetLiveness attaches a liveness monitor to the server for the /api/liveness endpoints.
func (*Server) SetObservability ¶
func (s *Server) SetObservability(o *observability.Store)
SetObservability attaches an observability metrics store.
func (*Server) SetTemplates ¶
SetTemplates attaches a template store.
func (*Server) SetWebhooks ¶
func (s *Server) SetWebhooks(d *webhooks.Dispatcher)
SetWebhooks attaches a webhook dispatcher.
Click to show internal directories.
Click to hide internal directories.