mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
cluster: Add Backend::SetNodeId()
This commit is contained in:
parent
011029addc
commit
a90a41a8b5
2 changed files with 12 additions and 0 deletions
|
@ -177,6 +177,8 @@ bool Backend::ProcessLogMessage(std::string_view format, byte_buffer_span payloa
|
||||||
return zeek::log_mgr->WriteBatchFromRemote(result->header, std::move(result->records));
|
return zeek::log_mgr->WriteBatchFromRemote(result->header, std::move(result->records));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Backend::SetNodeId(std::string nid) { node_id = std::move(nid); }
|
||||||
|
|
||||||
bool ThreadedBackend::ProcessBackendMessage(int tag, byte_buffer_span payload) {
|
bool ThreadedBackend::ProcessBackendMessage(int tag, byte_buffer_span payload) {
|
||||||
return DoProcessBackendMessage(tag, payload);
|
return DoProcessBackendMessage(tag, payload);
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,6 +361,16 @@ protected:
|
||||||
*/
|
*/
|
||||||
bool ProcessLogMessage(std::string_view format, byte_buffer_span payload);
|
bool ProcessLogMessage(std::string_view format, byte_buffer_span payload);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this backend's identifier to the given value.
|
||||||
|
*
|
||||||
|
* This may be called by backend implementations during DoInitPostScript() if
|
||||||
|
* their node identifier is generated internally.
|
||||||
|
*
|
||||||
|
* @param nid
|
||||||
|
*/
|
||||||
|
void SetNodeId(std::string nid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Called after all Zeek scripts have been loaded.
|
* Called after all Zeek scripts have been loaded.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue