![]() |
Panoptes 1.0.0
Endpoint Detection and Response
|
#include "detector_stream.h"#include "pano_log.h"#include <algorithm>#include <atomic>#include <chrono>#include <condition_variable>#include <deque>#include <mutex>#include <unordered_set>Go to the source code of this file.
Classes | |
| struct | DetectorSubscriberState |
Macros | |
| #define | PANO_DETECTOR_QUEUE_MAX 16384 |
| #define | PANO_MAX_DETECTOR_SUBSCRIBERS 4 |
Functions | |
| std::string | RecordEvent (nlohmann::ordered_json &event, const FILETIME &time) |
| Gives event the next sequence number (appended as "Seq"), writes it to pano.log and queues it for every subscriber that wants it, in that order for every event, so Seq increases down the log. | |
| FILETIME | CurrentFileTime () |
| The current time as a FILETIME, for events that carry no timestamp of their own. | |
| void | StopDetectorStreams () |
| Wakes every subscriber's Wait with false and refuses new subscribers, so the SubscribeEvents calls return before the server shuts down. | |
| #define PANO_DETECTOR_QUEUE_MAX 16384 |
Definition at line 13 of file detector_stream.cpp.
| #define PANO_MAX_DETECTOR_SUBSCRIBERS 4 |
Definition at line 17 of file detector_stream.cpp.
Referenced by DetectorSubscription::Open().
| FILETIME CurrentFileTime | ( | ) |
The current time as a FILETIME, for events that carry no timestamp of their own.
Definition at line 124 of file detector_stream.cpp.
| std::string RecordEvent | ( | nlohmann::ordered_json & | event, |
| const FILETIME & | time ) |
Gives event the next sequence number (appended as "Seq"), writes it to pano.log and queues it for every subscriber that wants it, in that order for every event, so Seq increases down the log.
| time | When the event happened, at full resolution, for the detector |
Definition at line 113 of file detector_stream.cpp.
References WriteToLogFile().
| void StopDetectorStreams | ( | ) |
Wakes every subscriber's Wait with false and refuses new subscribers, so the SubscribeEvents calls return before the server shuts down.
Definition at line 131 of file detector_stream.cpp.
Referenced by StopServiceServer().