typesense/include/event_manager.h
2023-05-23 14:26:46 +05:30

26 lines
516 B
C++

#pragma once
#include "json.hpp"
#include "option.h"
class EventManager {
private:
EventManager() = default;
~EventManager() = default;
static constexpr char* EVENT_TYPE = "type";
static constexpr char* EVENT_DATA = "data";
public:
static EventManager& get_instance() {
static EventManager instance;
return instance;
}
EventManager(EventManager const&) = delete;
void operator=(EventManager const&) = delete;
bool add_event(const nlohmann::json& event);
};