Instead of lengthy blurbs, switch to single-line, machine-readable standardized (https://spdx.dev) license identifiers. The Linux kernel switched long ago, so there is strong precedent. Three cases are handled: AGPL-only, Apache-only, and dual licensed. For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0), reasoning that our changes are extensive enough to apply our license. The changes we applied mechanically with a script, except to licenses/README.md. Closes #9937
41 lines
684 B
C++
41 lines
684 B
C++
/*
|
|
* Copyright (C) 2020-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/shared_ptr.hh>
|
|
#include <seastar/core/distributed.hh>
|
|
#include "service/load_broadcaster.hh"
|
|
|
|
using namespace seastar;
|
|
|
|
namespace replica {
|
|
class database;
|
|
}
|
|
|
|
namespace gms { class gossiper; }
|
|
|
|
namespace service {
|
|
|
|
class load_meter {
|
|
private:
|
|
shared_ptr<load_broadcaster> _lb;
|
|
|
|
/** raw load value */
|
|
double get_load() const;
|
|
sstring get_load_string() const;
|
|
|
|
public:
|
|
future<std::map<sstring, double>> get_load_map();
|
|
|
|
future<> init(distributed<replica::database>& db, gms::gossiper& gossiper);
|
|
future<> exit();
|
|
};
|
|
|
|
}
|