- CLI Reference
- Commands
- ironflow circuit-breaker
ironflow circuit-breaker
Manage circuit breakers that protect push endpoints from cascading failures. Circuit breaker state is persisted in the database and is cluster-consistent (consulted at dispatch reservation time).
ironflow circuit-breaker <subcommand> [flags]Aliases: cb
Both subcommands send X-Ironflow-Environment-ID when --env or IRONFLOW_ENV names an environment. Without either, an environment-bound API key uses its own environment. A platform key lists every environment and must name one to reset a breaker. The server validates environment and tenant access.
set -lx IRONFLOW_ENV env_default_stagingironflow circuit-breaker listironflow circuit-breaker reset my-function-idironflow circuit-breaker list
Section titled “ironflow circuit-breaker list”List circuit breakers in the selected environment with their function IDs, endpoints, states, and failure counts.
ironflow circuit-breaker list [flags]Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--server | -s | string | Server URL (default: IRONFLOW_SERVER_URL or http://localhost:9123) | |
--json | bool | false | Output as JSON | |
--env | -e | string | Environment ID. Default: IRONFLOW_ENV; with neither, no environment is sent |
Examples:
# List circuit breakers in the selected environmentironflow circuit-breaker list
# JSON outputironflow circuit-breaker list --json
# Custom serverironflow circuit-breaker list -s http://localhost:9000Output columns:
| Column | Description |
|---|---|
| ENVIRONMENT | The environment the breaker belongs to |
| FUNCTION_ID | The function that owns this circuit breaker |
| ENDPOINT | The push endpoint URL being protected |
| STATE | Current state: closed, open, or half-open |
| FAILS | Number of consecutive failures |
| LAST_FAILURE | Timestamp of the most recent failure |
ironflow circuit-breaker reset
Section titled “ironflow circuit-breaker reset”Reset a circuit breaker back to closed state, allowing requests to flow to the endpoint again. Accepts either an endpoint URL or a function ID. If the argument contains :// it is treated as an endpoint URL; otherwise it is treated as a function ID. A reset also clears the escalated open window, sets the ironflow_circuit_breaker_state gauge to closed and publishes the system.circuit_breaker.closed.{functionId} event.
ironflow circuit-breaker reset <endpoint-url | function-id> [flags]Arguments:
| Argument | Required | Description |
|---|---|---|
endpoint-url | Yes* | The endpoint URL of the breaker to reset |
function-id | Yes* | The function ID of the breaker to reset |
*Provide either an endpoint URL or a function ID.
Breakers are keyed by environment and function ID. A reset acts in one environment. An environment-bound API key uses its own environment and needs no flag. A platform key must name the environment with --env or IRONFLOW_ENV; without one, the server answers 400 environment required: set X-Ironflow-Environment-ID. With list, the same flag scopes the listing; a platform key without it lists every environment.
Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--server | -s | string | Server URL (default: IRONFLOW_SERVER_URL or http://localhost:9123) | |
--env | -e | string | Environment ID. Default: IRONFLOW_ENV; with neither, no environment is sent |
Examples:
# Reset a circuit breaker by endpoint URLironflow circuit-breaker reset https://my-app.example.com/api/handler
# Reset a circuit breaker by function IDironflow circuit-breaker reset my-function-id
# Reset a breaker in the staging environment with a platform keyironflow circuit-breaker reset my-function-id --env env_default_staging