GisilaRose class

A Flower-equivalent observability dashboard for gisila_queue.

It binds a MonitorState to an EventSource (the live event stream produced by workers/producers) and serves:

  • GET / — a self-contained HTML dashboard (auto-refreshing, live tail).
  • GET /api/stats — summary counters, worker/queue rollups.
  • GET /api/workers — per-worker status + counters.
  • GET /api/tasks — recent tasks (filter by state/name/queue, paginate with limit/offset).
  • GET /api/tasks/<id> — one task's full detail.
  • GET /api/queues — broker depth per known queue.
  • GET /api/events — Server-Sent Events firehose for live updates.

Run it as its own process (see bin/rose.dart) pointed at the same Redis the cluster uses, or embed it in-process with an InMemoryEventBus.

final rose = GisilaRose(
  source: RedisEventSource(host: 'localhost'),
  broker: RedisBroker(host: 'localhost'), // optional: enables queue depth
  port: 5555,
);
await rose.start();

Constructors

GisilaRose({required QueueEventSource source, Broker? broker, MonitorState? state, String host = '0.0.0.0', int port = 5555, Duration queuePollInterval = const Duration(seconds: 2)})

Properties

boundPort int?
The actual port bound after start — useful when port was 0 (bind to any free port), e.g. in tests. Null before start / after stop.
no setter
broker Broker?
Optional broker used purely to poll queue depths. Without it, the queues panel simply stays empty.
final
hashCode int
The hash code for this object.
no setterinherited
host String
final
port int
final
queuePollInterval Duration
How often broker queue depths are refreshed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source QueueEventSource
The live event stream the dashboard folds into state.
final
state MonitorState
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pollQueuesNow() Future<void>
Refreshes MonitorState.queueLengths immediately instead of waiting for the next queuePollInterval tick — mainly useful in tests.
start() Future<void>
Binds the event source, starts queue polling, and begins serving. Resolves once the server is listening.
stop() Future<void>
Stops serving and releases the event source / broker connections.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited