Documentation
¶
Overview ¶
Package server exposes kram-gateway's OpenAI-compatible HTTP API and wires together routing, circuit breaking and telemetry for each request. The top-level handler always recovers from panics: a bug or an upstream surprise in one request must never take the process down.
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 holds everything a request handler needs.
func New ¶
func New(cfg *config.Config, configPath string, providers map[string]provider.Provider, rt *router.Router, breakers *breaker.Registry, tel *telemetry.Registry, logger *slog.Logger) *Server
New builds a Server from already-constructed dependencies. configPath is the gateway's config.yaml (may be "" when none exists on disk).
Click to show internal directories.
Click to hide internal directories.