17#include <unordered_map>
34 std::optional<BlacklistEntry>
get(
const std::string& path)
const;
38 void blacklist(
const std::string& path, std::string reason);
42 void clear(
const std::string& path) { entries_.erase(path); }
44 std::size_t
size()
const {
return entries_.size(); }
46 return get(path).has_value();
57 bool save_to(
const std::string& file_path)
const;
60 const std::unordered_map<std::string, BlacklistEntry>&
entries()
const {
65 std::unordered_map<std::string, BlacklistEntry> entries_;
Definition scan_blacklist.hpp:28
std::optional< BlacklistEntry > get(const std::string &path) const
Return the blacklist entry for path if one exists AND matches the current file stamp.
void clear(const std::string &path)
Unconditionally remove path from the blacklist.
Definition scan_blacklist.hpp:42
std::string to_text() const
Serialize to the plain-text format described at the top.
bool load_from(const std::string &file_path)
std::size_t size() const
Definition scan_blacklist.hpp:44
const std::unordered_map< std::string, BlacklistEntry > & entries() const
Definition scan_blacklist.hpp:60
bool save_to(const std::string &file_path) const
void blacklist(const std::string &path, std::string reason)
Record that scanning path failed.
bool from_text(const std::string &text)
Load from the plain-text format.
bool is_blacklisted(const std::string &path) const
Definition scan_blacklist.hpp:45
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
Definition scan_blacklist.hpp:22
std::string reason
free-text explanation (e.g. "SIGSEGV", "timeout")
Definition scan_blacklist.hpp:25
int64_t mtime
Definition scan_blacklist.hpp:23
int64_t size
Definition scan_blacklist.hpp:24