cluster/Backend: Add ProcessError()

Allow backends to pass errors to a strategy. Locally, these raise
Cluster::Backend::error() events that are logged to the reporter
as errors.
This commit is contained in:
Arne Welzel 2025-04-10 16:15:54 +02:00
parent fcc0f45c57
commit 3d3b7a0759
5 changed files with 69 additions and 4 deletions

View file

@ -667,3 +667,10 @@ event websocket_client_lost(endpoint: EndpointInfo)
endpoint$id, endpoint$network$address, endpoint$network$bound_port);
Cluster::log(msg);
}
# If a backend reports an error, propagate it via a reporter error message.
event Cluster::Backend::error(tag: string, message: string)
{
local msg = fmt("Cluster::Backend::error: %s (%s)", tag, message);
Reporter::error(msg);
}