mirror of
https://github.com/typesense/typesense.git
synced 2025-04-20 14:25:00 +08:00
* remove query hits aggregation & store * refactor analytics changes * avoid string copy * typo correction * event analytics revised * refactoring code * add test for collection array
27 lines
595 B
C++
27 lines
595 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";
|
|
static constexpr char* EVENT_NAME = "name";
|
|
|
|
public:
|
|
static EventManager& get_instance() {
|
|
static EventManager instance;
|
|
return instance;
|
|
}
|
|
|
|
EventManager(EventManager const&) = delete;
|
|
void operator=(EventManager const&) = delete;
|
|
|
|
Option<bool> add_event(const nlohmann::json& event, const std::string& ip);
|
|
|
|
}; |