mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
btest/plugin: Test for PublishEventHook()
This commit is contained in:
parent
53236a184a
commit
0bf3417d4c
5 changed files with 142 additions and 0 deletions
23
testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h
Normal file
23
testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <zeek/plugin/Plugin.h>
|
||||
#include <string>
|
||||
|
||||
namespace btest::plugin::Demo_PublishEvent {
|
||||
|
||||
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;
|
||||
|
||||
void MetaHookPre(zeek::plugin::HookType hook, const zeek::plugin::HookArgumentList& args) override;
|
||||
void MetaHookPost(zeek::plugin::HookType hook, const zeek::plugin::HookArgumentList& args,
|
||||
zeek::plugin::HookArgument result) override;
|
||||
};
|
||||
|
||||
extern Plugin plugin;
|
||||
|
||||
} // namespace btest::plugin::Demo_PublishEvent
|
Loading…
Add table
Add a link
Reference in a new issue