aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/common/hostreporter/hostinfo.h
blob: b33375bba2e295a4157e3cacac8e82509a3b4bc4 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/util/jsonstream.h>

#include "versionreporter.h"

namespace storage {

/**
 * Reports status about this host. It has a set of default reporters and additional
 * reporters might be added.
 */
class HostInfo {
public:
    HostInfo();
    ~HostInfo();
    void printReport(vespalib::JsonStream& report);

    // Does not take ownership.
    void registerReporter(HostReporter* reporter);

private:
    std::vector<HostReporter*> customReporters;
    VersionReporter versionReporter;
};

}