aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/distributor/statusreporterdelegate.h
blob: 50a9c8d02671ad22e9384914b89ced441b1ee8b5 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "delegatedstatusrequest.h"
#include "statusdelegator.h"
#include <vespa/storageframework/generic/component/component.h>

namespace storage::distributor {

class StatusReporterDelegate
    : public framework::StatusReporter
{
    const StatusDelegator& _delegator;
    const framework::StatusReporter& _target;
    framework::Component _component;
public:
    StatusReporterDelegate(framework::ComponentRegister& compReg,
                           const StatusDelegator& delegator,
                           const framework::StatusReporter& target);
    ~StatusReporterDelegate() override;

    void registerStatusPage();
    vespalib::string getReportContentType(const framework::HttpUrlPath&) const override;
    bool reportStatus(std::ostream&, const framework::HttpUrlPath&) const override;
};

} // storage::distributor