Class AgentscopeDrainEndpoint
java.lang.Object
io.agentscope.spring.boot.admin.endpoint.AgentscopeDrainEndpoint
POST /actuator/agentscope-drain: stop accepting new agent requests, wait for in-flight
ones to finish, but do NOT terminate the JVM.
This is the production-friendly "let me bring this node out of the load balancer" knob:
health probes (e.g. /actuator/health) can flip to red, in-flight reasoning completes
naturally, and the process stays alive for log collection.
Drain is idempotent — second invocation is a no-op. Because Actuator's @WriteOperation
does not surface raw HTTP headers, the token check is enforced via the confirm
parameter; production deployments should layer Spring Security on top of /actuator/**.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AgentscopeDrainEndpoint
-
-
Method Details
-
currentDrainStatus
-
drain
-