hydra-queue-runner: make registry member of State, configurable metrics port
Thanks to the updated prometheus-cpp library, specifying a port of 0 will cause it to pick a random (available) port -- ideal for tests.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
|
||||
#include <prometheus/registry.h>
|
||||
|
||||
#include "db.hh"
|
||||
|
||||
#include "parsed-derivations.hh"
|
||||
@@ -432,8 +434,12 @@ private:
|
||||
via gc_roots_dir. */
|
||||
nix::Path rootsDir;
|
||||
|
||||
std::shared_ptr<prometheus::Registry> registry;
|
||||
|
||||
uint16_t metricsPort;
|
||||
|
||||
public:
|
||||
State();
|
||||
State(uint16_t metricsPort);
|
||||
|
||||
private:
|
||||
|
||||
|
Reference in New Issue
Block a user