gateway

package
v0.0.0-...-5c6d8ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(deps Dependencies) (*gin.Engine, error)

func NewHTTPServer

func NewHTTPServer(deps Dependencies) (*http.Server, error)

Types

type Dependencies

type Dependencies struct {
	Config          *config.Config
	Logger          *slog.Logger
	Store           store.Store
	Cache           cache.Cache
	Registry        *provider.Registry
	Runtime         *gwruntime.Holder
	Metrics         *metrics.Recorder
	RequestLogger   *store.AsyncRequestLogger
	AuthCache       *middleware.APIKeyCache
	VirtualKeyCache *middleware.VirtualKeyCache
	AuditLogger     *store.AsyncAuditLogger
	ToolRegistry    *tooling.Registry
	Reliability     *reliability.Manager
	StreamDrainer   *drain.Registry
}

Directories

Path Synopsis
Package drain tracks live WebSocket streams so a graceful shutdown can send close frames and wait for them to finish, and exposes a draining flag the readiness probe consults so load balancers stop sending new traffic first.
Package drain tracks live WebSocket streams so a graceful shutdown can send close frames and wait for them to finish, and exposes a draining flag the readiness probe consults so load balancers stop sending new traffic first.
Package handler implements the gateway's HTTP handlers: it translates HTTP requests into modality operations, dispatches them through the provider registry, and renders OpenAI-compatible responses and SSE streams.
Package handler implements the gateway's HTTP handlers: it translates HTTP requests into modality operations, dispatches them through the provider registry, and renders OpenAI-compatible responses and SSE streams.
Package httputil holds the gin-coupled HTTP glue for the gateway layer.
Package httputil holds the gin-coupled HTTP glue for the gateway layer.
Package middleware holds the Gin middleware chain: recovery, request IDs, tracing, runtime snapshot injection, body limits, CORS, logging, metrics, authentication, rate limiting, budgets, and load shedding.
Package middleware holds the Gin middleware chain: recovery, request IDs, tracing, runtime snapshot injection, body limits, CORS, logging, metrics, authentication, rate limiting, budgets, and load shedding.
Package runtime holds the hot-reloadable configuration Snapshot (Holder) and the Reloader that atomically swaps it, plus the mapping from application config onto the process-lifetime reliability manager's tunables.
Package runtime holds the hot-reloadable configuration Snapshot (Holder) and the Reloader that atomically swaps it, plus the mapping from application config onto the process-lifetime reliability manager's tunables.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL