fake library
In-memory backend for demos and tests: implements both KletsoApi and
KletsoTransport, replies from the protocol fixtures, and can simulate
latency, socket drops, duplicate frames, token expiry and errors.
final backend = KletsoFakeBackend(scenario: const KletsoFakeScenario.demo());
final client = KletsoClient(config, api: backend, transport: backend);
Classes
- KletsoFakeBackend
- A complete fake runtime in memory: REST (KletsoApi) and realtime (KletsoTransport) with an agent that answers from the protocol fixtures.
- KletsoFakeScenario
-
Knobs for
KletsoFakeBackend: how slow and how unreliable the fake runtime behaves. All defaults are instant and reliable (unit tests); use KletsoFakeScenario.demo for a lifelike example app.