app

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package app is the composition root: it opens the database, builds the services and mounts the controllers. Ported from 8f2af2e:src/keepsake/server/app.py.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN    string
	Schema string
	// Auth binds each /mcp and /bundle request to its tenant: FixedTenant or JWT.Middleware.
	Auth func(http.Handler) http.Handler
}

type Handlers

type Handlers struct {
	// App serves /mcp, PUT /bundle and /readyz.
	App http.Handler
	// Console serves the admin console and its /api, or is nil when the console is off.
	Console http.Handler
	Metrics http.Handler
}

Handlers are what each port serves.

func BuildApp

func BuildApp(ctx context.Context, cfg Config) (Handlers, func(), error)

BuildApp returns the handlers and a closer, or fails when the database does not isolate tenants.

Jump to

Keyboard shortcuts

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