/* * Copyright (C) 2021-present ScyllaDB */ /* * SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 */ #pragma once #include #include #include "transport/protocol_server.hh" namespace service { class storage_proxy; class migration_manager; class memory_limiter; } namespace db { class system_distributed_keyspace; class config; } namespace cdc { class generation_service; } namespace gms { class gossiper; } namespace auth { class service; } namespace qos { class service_level_controller; } namespace alternator { // This is the official DynamoDB API version. // It represents the last major reorganization of that API, and all the features // that were added since did NOT increment this version string. constexpr const char* version = "2012-08-10"; using namespace seastar; class executor; class server; class controller : public protocol_server { sharded& _gossiper; sharded& _proxy; sharded& _mm; sharded& _sys_dist_ks; sharded& _cdc_gen_svc; sharded& _memory_limiter; sharded& _auth_service; sharded& _sl_controller; const db::config& _config; std::vector _listen_addresses; sharded _executor; sharded _server; std::optional _ssg; public: controller( sharded& gossiper, sharded& proxy, sharded& mm, sharded& sys_dist_ks, sharded& cdc_gen_svc, sharded& memory_limiter, sharded& auth_service, sharded& sl_controller, const db::config& config, seastar::scheduling_group sg); virtual sstring name() const override; virtual sstring protocol() const override; virtual sstring protocol_version() const override; virtual std::vector listen_addresses() const override; virtual future<> start_server() override; virtual future<> stop_server() override; virtual future<> request_stop_server() override; // This virtual function is called (on each shard separately) when the // virtual table "system.clients" is read. It is expected to generate a // list of clients connected to this server (on this shard). virtual future>>> get_client_data() override; }; }