Module rest

Module rest 

Source
Expand description

axum HTTP REST API.

Exposes a thin REST layer over the actor system.

§Endpoints

MethodPathDescription
GET/healthServer liveness check
GET/actorsList all actors + states
GET/actors/{id}Single actor info
POST/actors/{id}/messageSend a message to an actor
DELETE/actors/{id}Stop an actor (if not protected)
GET/actors/{id}/metricsActor runtime metrics
POST/chatSend a message to MainActor and stream response

Structs§

AppState
Shared application state injected into axum handlers.
ChatRequest
JSON body for POST /chat
RestServer
The axum HTTP server.
SendMessageRequest
JSON body for POST /actors/{id}/message