mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
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:
parent
fcc0f45c57
commit
3d3b7a0759
5 changed files with 69 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue