Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Breaker Probe for BlyxNew to Visual Studio Code? Get it now.
Breaker Probe for Blyx

Breaker Probe for Blyx

Rahul Chaube

| (0) | Free
Open a circuit after a configured number of consecutive failures and admit a single recovery probe.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Breaker Probe

Test your Breaker Probe project

Copy the bundled starter directory to a writable folder and open it in VS Code. Choose Tasks: Run Test Task → Blyx: Test Breaker Probe project. The task runs the batch and window regression suites against your local framework source. A failed assertion stops the task and returns a nonzero exit code. Install the general Blyx CLI to run these native tests. Blyx CLI downloads

Run Breaker Probe 0.3.1 examples

In a trusted workspace, choose Blyx: Run Installed Framework Example with Blyx Language 1.6.0 or later. Select Breaker Probe, then the starter, batch or window example. The general Blyx CLI executes a temporary copy and compares stdout with the shipped expected output. A mismatch identifies the first differing line and column. Language editor

To run the window example as a workspace task, insert Run bundled Breaker Probe window example (one task). Its source and reference output are vendor/breaker_probe/window_example.blyx and window_example.expected.txt. The batch task also remains available.

Check Breaker Probe in VS Code

This editor includes the exact Blyx framework source and its installation checks. Open a trusted desktop workspace with the general Blyx CLI, its native toolchain and a host linker available. The command below uses the general CLI's native-run command. CLI installation

  1. Create an empty .vscode/tasks.json. Choose Snippets: Fill File with Snippet and select Verify Breaker Probe (workspace tasks). If you have a tasks array already, insert the Verify bundled Breaker Probe (one task) snippet there.
  2. Choose Tasks: Run Task → Blyx: Verify bundled Breaker Probe. On success the terminal prints breaker_probe: installation checks passed. On failure the command reports the failed check and exits with code 1.
  3. To check a project copy, run nest add breaker_probe@0.3.1 and choose the installed-package task matching your project's vendor or src/vendor directory.

The extension's starter directory is also a complete project. Copy it to a writable folder, open that folder in VS Code, and choose Tasks: Run Task → Blyx: Run supplied example. Compare the terminal output with expected.txt.

blyxc native-run vendor/breaker_probe/verify_install.blyx

In a Blyx test, import vendor::breaker_probe::verification and call breaker_probe_verify_install(). The result is zero on success or the number of the first failed check. Package and source files

Black-necked stilt

Open a circuit after a configured number of consecutive failures and admit a single recovery probe.

Reliability and delivery · framework · 0.1.2

Framework bird: Black-necked stilt.

Drive the workflow

Start with breaker_probe_start(). For each event call breaker_probe_step(snapshot, event, value), persist the returned snapshot, and dispatch breaker_probe_command(snapshot) to your application’s adapter. The host owns I/O, event ordering, duplicate detection and durable command delivery. A matching event produces one command. Rejected events retain the phase and saved quantity. An invalid snapshot yields an empty vector.

The snapshot contains phase ID, saved quantity and last command ID. Event values are whole numbers from zero through one billion. In the table, x is the event value and r is the saved quantity. Rules match in listed order. To validate a whole history without running effects use breaker_probe_replay(events, values). It returns the final snapshot or an empty vector on rejection.

Current phase Event Guard Next phase Command New quantity
idle arm x>0 armed record_limit x
armed failure r>1 armed consume_attempt r-1
armed failure r=1 open trip 0
armed success x>0 armed reset_budget x
open probe always testing admit_one 0
testing failure always open reopen 0
testing success x>0 armed close_breaker x

Phase IDs in order from zero: idle, armed, open, testing.

Replay your own events

After installing the demo, run the following from its directory. Supply alternating event names and integer values. The command prints each requested action and exits with status 1 at the first rejected transition, or 2 for malformed arguments.

blyxc native-run main.blyx -- arm 2 failure 0 failure 0 probe 0 success 2

Run this checkout

Run blyxc native-run main.blyx to reproduce expected.txt. Run blyxc native-run checks.blyx and compare the complete output with checks-expected.txt.

Try the published project

nest demo breaker_probe@0.1.2
blyxc native-run breaker_probe-demo/main.blyx

Install with nest add breaker_probe@0.1.2 and import vendor::breaker_probe::breaker_probe.

Maintained by Rahul Chaube. Blyx · GitHub · LinkedIn · Sponsor

Editor snippets

Use this extension with the Blyx Language extension. In a .blyx file, type one of the following prefixes and invoke editor completion.

  • breaker_probe_start
  • breaker_probe_step
  • breaker_probe_command
  • breaker_probe_replay
  • use_breaker_probe
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft