Skip to main content

Module ops

Module ops 

Source
Expand description

What the admin API and the rws binary’s MCP tools both do, as JSON. One implementation, so the two can’t drift apart.

State that belongs to an application rather than the process (its response cache, its route table) is registered here by whoever builds the application (register_cache, register_routes).

Functions§

block
blocklist_json
build_features_json
Compile-time features as {"name":bool}.
cache_stats_json
certificates_json
The certificates served, soonest expiry first, and the ACME renewal loop’s state.
check_rate_limit_json
ip’s remaining quota under the global limit; counts as one request.
clear_registered_cache
Clear the registered cache; false without one.
config_json
Every RWS_CONFIG_* setting in effect, sorted; secrets (names with SECRET, PASSWORD or TOKEN) shown as (hidden).
cors_json
flags_json
Runtime feature flags (crate::feature).
logs_json
The last n access-log lines (at most crate::log::tail::CAPACITY), oldest first, each as a string.
maintenance_json
metrics_json
The server’s counters.
rate_limit_json
recent_json
The last n requests (at most 100), or the last n with a 4xx/5xx status.
register_cache
The response cache the admin API reports on and clears (a clone shares the store).
register_routes
The application’s routes as (method, pattern), for listing.
registered_cache_json
Stats of the registered cache; None without one.
registered_routes_json
request_renewal
Ask ACME to renew now; false when it isn’t running.
routes_json
set_drained
Drain or undrain backend of upstream; Err names what doesn’t exist.
set_flag
set_maintenance
unblock
upstreams_json
The config file’s upstreams: each backend’s weight, health, breaker state and whether it is drained.