diff options
Diffstat (limited to 'configd/src/apps/sentinel/state-api.h')
-rw-r--r-- | configd/src/apps/sentinel/state-api.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/configd/src/apps/sentinel/state-api.h b/configd/src/apps/sentinel/state-api.h new file mode 100644 index 00000000000..59e614a26cc --- /dev/null +++ b/configd/src/apps/sentinel/state-api.h @@ -0,0 +1,27 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +#include <vespa/vespalib/net/state_api.h> +#include <vespa/vespalib/net/simple_metrics_producer.h> +#include <vespa/vespalib/net/simple_health_producer.h> +#include <vespa/vespalib/net/simple_component_config_producer.h> + +namespace config { +namespace sentinel { + +struct StateApi { + vespalib::string host_and_port; + vespalib::SimpleHealthProducer myHealth; + vespalib::SimpleMetricsProducer myMetrics; + vespalib::SimpleComponentConfigProducer myComponents; + vespalib::StateApi myStateApi; + + StateApi() : myStateApi(myHealth, myMetrics, myComponents) {} + + vespalib::string get(const char *path) const; + void bound(int port); +}; + +} // namespace config::sentinel +} // namespace config |