Add a facility for full flow-through uptime test of controller by Central.
This commit is contained in:
parent
c62141fd98
commit
5268909075
2 changed files with 22 additions and 12 deletions
|
@ -429,6 +429,7 @@ static bool _parseRule(json &r,ZT_VirtualNetworkRule &rule)
|
|||
}
|
||||
|
||||
EmbeddedNetworkController::EmbeddedNetworkController(Node *node,const char *dbPath) :
|
||||
_startTime(OSUtils::now()),
|
||||
_threadsStarted(false),
|
||||
_db(dbPath),
|
||||
_node(node)
|
||||
|
@ -1067,7 +1068,15 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
|||
|
||||
} // else 404
|
||||
|
||||
} // else 404
|
||||
} else if (path[0] == "dbtest") {
|
||||
|
||||
json testRec;
|
||||
const uint64_t now = OSUtils::now();
|
||||
testRec["clock"] = now;
|
||||
testRec["uptime"] = (now - _startTime);
|
||||
_db.put("dbtest",testRec);
|
||||
|
||||
}
|
||||
|
||||
return 404;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue