Dispatches notifications to registered service modules.
The dispatcher resolves a service key through PingPong.Registry and calls
the service's call/2 function. It is the boundary between the public API and
service implementations.
Summary
Functions
@spec dispatch(PingPong.service(), PingPong.payload(), PingPong.options()) :: PingPong.result()
Dispatches a notification synchronously.
Returns {:error, {:unknown_service, service}} when no service module is
registered for the given key.
@spec dispatch_async(PingPong.service(), PingPong.payload(), PingPong.options()) :: PingPong.result()
Dispatches a notification in a supervised task.
Returns {:ok, task} when the service is known. Awaiting the task returns the
selected service's result.