mirror of
https://github.com/livekit/livekit.git
synced 2026-09-14 06:45:35 +00:00
Serve worker-declared FastAPI routes at /agents/{deployment}/{path} without
any worker-side listener: workers dial a fixed pool of wires speaking
AgentHttp.Frame, the server opens multiplexed streams carrying one opaque
HTTP/1.1 exchange each (two-level credit flow control, prioritized write
scheduler, attach epoch fencing). The front does starlette-exact manifest
matching with per-endpoint public access, typed 401/404/405, a retry table,
and SSE/WebSocket passthrough; a pluggable fallback hook lets multi-node
deployments resolve misses elsewhere. Includes a conformance client, a
manual sidecar, and the acceptance suite.
The auth middleware now reads access_token from the query string only:
FormValue consumed the bodies of proxied url-encoded POSTs.
26 lines
914 B
Go
26 lines
914 B
Go
package agent
|
|
|
|
const DefaultTargetLoad = 0.7
|
|
|
|
type Config struct {
|
|
EnableUserDataRecording bool `yaml:"enable_user_data_recording"`
|
|
EnableUserDataRedaction bool `yaml:"enable_user_data_redaction"`
|
|
TargetLoad float32 `yaml:"target_load,omitempty"`
|
|
|
|
// agent HTTP endpoints data plane; zero values take the endpoint package
|
|
// defaults
|
|
Endpoints EndpointsConfig `yaml:"endpoints,omitempty"`
|
|
}
|
|
|
|
type EndpointsConfig struct {
|
|
// Disabled turns off the /agents/{deployment}/... front and rejects
|
|
// registrations that declare endpoints.
|
|
Disabled bool `yaml:"disabled,omitempty"`
|
|
|
|
DataConnCount uint32 `yaml:"data_conn_count,omitempty"`
|
|
CreditWindow uint32 `yaml:"credit_window,omitempty"`
|
|
ConnectionWindow uint32 `yaml:"connection_window,omitempty"`
|
|
MaxFrameSize uint32 `yaml:"max_frame_size,omitempty"`
|
|
MaxStreamsPerConn uint32 `yaml:"max_streams_per_conn,omitempty"`
|
|
}
|