server

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(d Deps) http.Handler

NewHandler returns the full HTTP handler (mux + middleware) for the server.

Types

type Deps

type Deps struct {
	DB            *gorm.DB
	MCPServer     *mcp.Server
	KeyValidator  *auth.APIKeyValidator
	AuthletWiring *authletas.Wiring // optional; nil = API-key-only path
	Memory        *service.MemoryService
	UIClientID    string

	// ImportJobs backs the admin async-import surface; ImportMaxUploadBytes caps
	// each uploaded archive (config.ImportMaxUploadBytes).
	ImportJobs           importJobStore
	ImportMaxUploadBytes int64

	// InstanceConfig + GlobalConfig back the admin global-config surface; the
	// hardening middleware reads GlobalConfig live per request, and PATCH
	// refreshes it so writes apply without a restart.
	InstanceConfig instanceConfigStore
	GlobalConfig   globalConfigAccessor

	// ConfigListener is the config-invalidation listener; /~/ready reports its
	// health when RequireConfigListener is on. Optional (nil = not reported).
	ConfigListener listenerHealth

	// SetLogLevel applies a validated slog level name to the running handler's
	// shared LevelVar, so a PATCH of log_level takes effect live.
	SetLogLevel func(level string)

	// Metrics backs the admin metrics dashboard (GET /api/admin/metrics).
	Metrics metricsSummarizer

	// PublicBaseURL is the server's external origin (scheme+host, no trailing
	// slash); the UI's OAuth config is derived from it so login works on any host.
	PublicBaseURL string
}

Deps is the dependency bundle for NewHandler; callers build it, NewHandler wires it.

Jump to

Keyboard shortcuts

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