factory

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: BSD-2-Clause Imports: 6 Imported by: 1 module, 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 CreateRouter

func CreateRouter() http.Handler

CreateRouter wires the HTTP handlers for the router.

Registers all five canonical admin endpoints — /healthz, /readiness, /metrics, /setloglevel/{level}, /gc — per go-http-service guide. /metrics and /setloglevel are stubbed: the router is a personal-laptop tool with no Prometheus scraper and a static slog level today; the endpoints exist so future ops tooling (or the rule check) finds them.

/v1/ mounts the Anthropic reverse proxy — every Claude Code request (/v1/messages, /v1/models, etc.) is forwarded verbatim to api.anthropic.com. The Authorization header (subscription OAuth bearer) passes through. Per-provider model-name routing lands in task 3.

func CreateServer

func CreateServer(listen string) librun.Func

CreateServer wires the HTTP server bound to listen, with the canonical router (CreateRouter) as the handler. The cli package consumes this — all dep wiring lives here, not in cli. Returns a run.Func; call it with a context to start and graceful-shutdown the listener.

Types

This section is empty.

Jump to

Keyboard shortcuts

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