Update how controller handles circuit tests -- save results to filesystem.
This commit is contained in:
parent
136fddc7f1
commit
a577b8d381
7 changed files with 100 additions and 102 deletions
|
@ -42,8 +42,7 @@ namespace ZeroTier {
|
|||
class JSONDB
|
||||
{
|
||||
public:
|
||||
JSONDB(const std::string &basePath,FILE *feed) :
|
||||
_feed(feed),
|
||||
JSONDB(const std::string &basePath) :
|
||||
_basePath(basePath)
|
||||
{
|
||||
_reload(_basePath);
|
||||
|
@ -55,6 +54,8 @@ public:
|
|||
_reload(_basePath);
|
||||
}
|
||||
|
||||
bool writeRaw(const std::string &n,const std::string &obj);
|
||||
|
||||
bool put(const std::string &n,const nlohmann::json &obj);
|
||||
|
||||
inline bool put(const std::string &n1,const std::string &n2,const nlohmann::json &obj) { return this->put((n1 + "/" + n2),obj); }
|
||||
|
@ -108,7 +109,6 @@ private:
|
|||
inline bool operator!=(const _E &e) const { return (obj != e.obj); }
|
||||
};
|
||||
|
||||
FILE *_feed;
|
||||
std::string _basePath;
|
||||
std::map<std::string,_E> _db;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue