Documentation
¶
Overview ¶
Package modelforward is the seat's local model forwarder. Harness processes send model requests to it on loopback; it adds the seat's current projected token, read for every request, the lease generation and the current execution, and passes them to the platform model proxy:
http://127.0.0.1:<port>/model/<connection>/v1/... -> <platform>/v1/model/<connection>/v1/...
A rotated token therefore applies at once inside long-running harness processes, without relying on each harness's own credential refresh.
Index ¶
Constants ¶
View Source
const LocalAPIKey = "steadmesh-local"
LocalAPIKey is the placeholder credential harnesses are configured with. The forwarder replaces whatever credential a harness sends.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder serves the platform model proxy on loopback.
type Options ¶
type Options struct {
PlatformURL string
TokenFile string
// Generation and Execution supply the headers for each request.
Generation func() int64
Execution func() string
// Observe, when set, receives the execution and status of every response.
Observe func(execution string, status int)
Log *slog.Logger
}
Options configure a forwarder.
Click to show internal directories.
Click to hide internal directories.