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

#include "hostinfo.h"
#include "hostreporter.h"

namespace storage {

HostInfo::HostInfo() {
    registerReporter(&versionReporter);
}

HostInfo::~HostInfo() = default;

void HostInfo::printReport(vespalib::JsonStream& report) {
    for (HostReporter* reporter : customReporters) {
        reporter->report(report);
    }
}

void HostInfo::registerReporter(HostReporter *reporter) {
    customReporters.push_back(reporter);
}

}