cluster: Move cluster::detail::Event to cluster::Event

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.
This commit is contained in:
Arne Welzel 2025-07-29 12:11:32 +02:00
parent cd7836dda2
commit bda70067ec
19 changed files with 57 additions and 68 deletions

View file

@ -12,9 +12,7 @@
namespace zeek::cluster {
namespace detail {
class Event;
} // namespace detail
/**
* This class handles encoding of events into byte buffers and back.
@ -34,7 +32,7 @@ public:
*
* @returns True on success, false in exceptional cases (e.g. unsupported serialization).
*/
virtual bool SerializeEvent(byte_buffer& buf, const detail::Event& event) = 0;
virtual bool SerializeEvent(byte_buffer& buf, const cluster::Event& event) = 0;
/**
* Unserialize an event from a given byte buffer.
@ -43,7 +41,7 @@ public:
*
* @returns The event, or std::nullopt on error.
*/
virtual std::optional<cluster::detail::Event> UnserializeEvent(byte_buffer_span buf) = 0;
virtual std::optional<cluster::Event> UnserializeEvent(byte_buffer_span buf) = 0;
/**
* @returns The name of this event serializer instance.