blob: 610bda3ac3de6885d1869563ad4b7e5b8bd52d0f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "hostfilter.h"
#include <vespa/config-model.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/config/config.h>
class ConfigStatus
{
public:
struct Flags {
HostFilter host_filter;
bool verbose;
Flags()
: host_filter(), verbose(false)
{}
explicit Flags(const HostFilter& filter)
: host_filter(filter),
verbose(false)
{}
};
ConfigStatus(Flags flags, const config::ConfigUri uri);
~ConfigStatus();
int action();
private:
std::unique_ptr<cloud::config::ModelConfig> _cfg;
Flags _flags;
int64_t _generation;
bool fetch_json(std::string configId, std::string host, int port, std::string path,
std::string &data);
bool checkServiceGeneration(std::string configId, std::string host, int port,
std::string path);
};
|