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, pending auto-off, all toggles, layers, target level |
| Status | toggleActive() / setActive(boolean) |
Master on/off |
| Status | disableAll() |
Kill switch: chaos off, every assault off, profile NONE |
| Status | startAutoOff(minutes) / cancelAutoOff() |
Schedule (1 to 1440 minutes) or cancel the engine-side auto-off (remaining time in getStatus().autoOffRemainingMs) |
| Config | getConfig() |
Full mutable configuration snapshot |
| Config | setProfile(profile) |
Apply a predefined assault profile |
| Config | applyConfig(config) |
Apply a (partial) configuration at once: import, custom profiles, chaos layers |
| Config | resetDefaults() |
Restore the built-in defaults |
| Toggles | toggleLatency() / toggleException() / toggleHttpStatus() / toggleDependencyDegradation() / toggleResponseBody() / toggleResponseHeader() |
Flip a single assault |
| Toggles | toggleClientLatency() / toggleClientException() |
Flip a client-side 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 |
| Counters | getCounters() / resetCounters() |
Read (total, per type, per source) / reset the assault counters |
| 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
MutableAssaultConfigImpl, whose setters publish the change and notify the change listener, so it is persisted to
.goblin-state.json and survives a restart automatically -- as long as the field is serialized by
GoblinStatePersistence.
- 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. - Also expose the new toggle in
getStatus,getConfigandapplyConfig, and switch it off indisableAll. - Persistence is not automatic for a new field: every setter notifies the change listener, but the field must also be
written and read by
GoblinStatePersistence(and have a place inAssaultSettings,resetToDefaults()andMutableAssaultConfigImpl.fromConfig(...), see runtime/README.md).
- 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.