Companion module loaded only in dev mode (the runtime extension declares it via conditional-dev-dependencies,
visible in runtime/target/classes/META-INF/quarkus-extension.properties). It hosts the service the Dev UI front end
talks to, and nothing it contains ever ships to production.
See runtime/README.md for the assault SPI this module builds on, and deployment/README.md for how the Dev UI card is registered at build time.
io.quarkiverse.goblin.dev.GoblinJsonRPCService is a @ApplicationScoped bean exposed to the Dev UI through
JsonRPCProvidersBuildItem.
Every public method becomes a JSON-RPC endpoint callable from the front-end components
(qwc-goblin-dashboard.js, qwc-goblin-history.js) by method name, e.g. this.jsonRpc.toggleLatency().
| Group | Method | Purpose |
|---|---|---|
| Status | getStatus() |
Active flag, all toggles, target level |
| Status | toggleActive() / setActive(boolean) |
Master on/off |
| Config | getConfig() |
Full mutable configuration snapshot |
| Toggles | toggleLatency() / toggleException() / toggleHttpStatus() / toggleDependencyDegradation() / toggleResponseBody() / toggleResponseHeader() |
Flip a single assault |
| Editors | setLatencyRange(minMs, maxMs) |
Update latency bounds |
| Editors | setExceptionConfig(type, message) |
Update exception class/message |
| Editors | setHttpStatusConfig(code, message) |
Update status code/body |
| Editors | setResponseBodyConfig(mode, percentage) |
Update body transformation mode/size |
| Editors | setResponseHeaderInfo(name, action, value) / removeResponseHeader(name) |
Set or drop a response header rule |
| Editors | setTargetLevel(level) |
Update percentage of affected requests |
| History | getHistory() / clearHistory() |
Read/clear the assault history |
| Report | getMarkdownReport() |
Export the Markdown resilience report |
Setter methods may return a warning field carrying human-readable corrections when the request could not be applied
verbatim (e.g. an inverted latency range is swapped, an invalid status code falls back to 503). Mutations go through
MutableAssaultConfig, which calls notifyChange() so the change is persisted to .goblin-state.json and survives a
restart automatically.
- Add the toggle + parameter editors to
GoblinJsonRPCServicefollowing the existing pattern (atoggleX()method and asetXConfig(...)editor returning awarning). - Wire the corresponding section into
qwc-goblin-dashboard.jsin deployment/src/main/resources/dev-ui/ usingjsonRpccalls that match the new method names. - Because
MutableAssaultConfig.notifyChange()runs on every setter, no extra work is needed for persistence.
- Log a
WARNwhenever the user changes the runtime configuration through the Dev UI. - Every public method is part of the front-end contract: keep them stable or bump them in sync with the
qwc-*.jscomponents. - The module must stay dependency-light: it only depends on the runtime, Vert.x JSON, and the engine.