mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
btest/plugin: Test custom metadata publish
Usage demo for plugin writers to add custom event metadata and access in in Zeek scripts.
This commit is contained in:
parent
7db03a8c77
commit
0ab53c75cd
9 changed files with 239 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <zeek/plugin/Plugin.h>
|
||||
#include <string>
|
||||
|
||||
namespace btest::plugin::Demo_PublishEventMetadata {
|
||||
|
||||
class Plugin : public zeek::plugin::Plugin {
|
||||
protected:
|
||||
zeek::plugin::Configuration Configure() override;
|
||||
void InitPostScript() override;
|
||||
|
||||
bool HookPublishEvent(zeek::cluster::Backend& backend, const std::string& topic,
|
||||
zeek::cluster::detail::Event& event) override;
|
||||
};
|
||||
|
||||
extern Plugin plugin;
|
||||
|
||||
} // namespace btest::plugin::Demo_PublishEventMetadata
|
Loading…
Add table
Add a link
Reference in a new issue