Expand description
controller submodule.
stryke controller — Interactive REPL for coordinating stress test agents.
§Usage
stryke controller # listen on 0.0.0.0:9999
stryke controller --port 8888 # custom port
stryke controller --bind 10.0.0.1 # specific interface§Commands
status— list connected agentsfire [duration]— start stress test on all agentsfire node1,node2 [duration]— specific agentsterminate— stop stress testshutdown— disconnect all agents and exithelp— show commands
Structs§
- Controller
- Controller state
- Controller
Handle - Non-blocking handle to a running
Controller. Returned byspawn_controller; used by the scriptable builtins to drive the distributed compute fabric from.stkcode.
Functions§
- cathedral_
lookup - Look up a congregation name → endpoint. Returns None if unregistered.
- cathedral_
names - Enumerate registered congregation names (sorted).
- cathedral_
register - Register a congregation name → endpoint binding. Returns the previous binding if any (so caller can detect collisions if it cares).
- cathedral_
unregister - Remove a name from the registry. Returns the endpoint that was bound.
- get_
chant get_chant— see implementation.- get_
controller - Look up a controller by its script-visible ID. Returns
Noneif the ID was never registered or has been unregistered. - get_
current_ controller - Return the current implicit controller, or
Noneif no congregation / ordination has happened yet in this process. - get_
divination - Look up a divination’s (controller_id, petition_id) pair.
- print_
help - Print controller help
- register_
chant - Register a chant in the global registry; returns the script-visible chant_id. The pair stored is (controller_id, controller_local_chant_id).
- register_
controller - Register a controller handle; returns a script-visible u64 ID.
- register_
divination - Register a divination; returns a script-visible u64 ID that resolves back
to (controller_id, petition_id) via
get_divination. - run_
controller - Main entry point — back-compat wrapper that delegates to
spawn_controller+ControllerHandle::run_repl_blocking. Preserves the historical CLI behaviour: bind, accept agents in a background thread, run the interactive REPL on the main thread, cleanly join the accept thread on REPL exit. Scripts that want non-REPL programmatic access usespawn_controllerdirectly. - set_
current_ controller - Make
controller_idthe implicit target for subsequentpray/muster/annexcalls that don’t name a controller. - spawn_
controller - Bind a listener and start the accept thread, return a non-blocking handle.
Pass
port = 0to let the OS pick a free port; recover the chosen one viaControllerHandle::listen_addr. - unregister_
chant unregister_chant— see implementation.- unregister_
controller - Remove a controller from the registry. Caller typically also calls
shutdown()on the returned Arc before dropping it. - unregister_
divination - Remove a divination from the registry. Returns the (controller_id, petition_id) pair so the caller can route the actual gather request.