Documentation
¶
Overview ¶
Package server exposes a ControlPlane over HTTP. It is a thin JSON translation layer: all behavior lives in the control plane it wraps. The same API serves both sides of the queue — producers submit tasks and read results; remote consumers lease work and report outcomes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cp controlplane.ControlPlane, consumer controlplane.Consumer, mem *metrics.Memory) http.Handler
New returns an http.Handler serving the beta v1 API.
Producer side:
GET /healthz liveness probe
GET /metrics current metric values (text)
GET /v1/deployments list deployments
POST /v1/deployments deploy a service (ServiceSpec JSON)
GET /v1/deployments/{name} one deployment's status
GET /v1/deployments/{name}/spec the deployment's ServiceSpec
POST /v1/deployments/{name}/scale {"replicas": N} (local nodes)
POST /v1/deployments/{name}/tasks {"tool","input","async"} → result, or task_id if async
GET /v1/deployments/{name}/tasks/{id} task result: {"status","result"}
Consumer side (what `dispatch work` replicas call):
POST /v1/deployments/{name}/lease?wait=30s long-poll for a task (204 when empty)
POST /v1/deployments/{name}/results report a task result
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.