Class diagram
Every type of the eventus module and how the types relate: the public ones your app uses, and the
internal ones behind them. The optional artifacts are not shown.
The public types, in the upper box:
EventRouteris what a view model implements, by delegation. TheEventRouter(...)function creates the router behind it.EventHandlerreads and changes the store, and chooses aDispatchStrategy. A strategy answers with aDispatch.ErrorHandlerandRouterObserverare optional. An observer receives aRouterTracefor each thing the router does with an event.E,SandFare the screen's event, state and effect types. They extendUiEvent,UiStateandUiEffect.
The internal types, in the lower box. Your app never names them:
DefaultEventRouteris the router. It creates and owns oneScreenStore, and holds oneEventHandlerfor each event class and the optionalErrorHandler.ActiveRunis one event that is running or waiting. The router shows a strategy the active events as aSnapshot.ReportQueueexists only when the router has an observer. It delivers the reports in order.
For what each public type does, see key concepts.
The diagram is written in PlantUML, in
class-diagram.puml. After a change to that file, draw the picture again:
plantuml -tsvg docs/class-diagram.puml