mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00

This class is a parameter of virtual methods of the Backend API for users to implement and also a parameter to the HookPublishEvent() API. Seems it shouldn't be in detail and instead we should own it. Alternatively, could mark the cluster APIs as not-stable-yet, but I think we can move forward and make it non-detail for 8.0.
24 lines
751 B
C++
24 lines
751 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "zeek/plugin/Plugin.h"
|
|
|
|
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::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
|