mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 18:10:39 +00:00
Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
40 lines
669 B
C++
40 lines
669 B
C++
/*
|
|
* Copyright (C) 2020-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#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;
|
|
|
|
public:
|
|
future<std::map<sstring, double>> get_load_map();
|
|
|
|
future<> init(distributed<replica::database>& db, gms::gossiper& gossiper);
|
|
future<> exit();
|
|
};
|
|
|
|
}
|