Both set_server_storage_service and set_server_storage_proxy set up API handlers that need storage service to work. Now they all call for global storage service instance, but it's better if they receive one from main. This patch carries the sharded storage service reference down to handlers setting function, next patch will make use of it. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
34 lines
952 B
C++
34 lines
952 B
C++
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* This file is part of Scylla.
|
|
*
|
|
* Scylla is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Scylla is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/sharded.hh>
|
|
#include "api.hh"
|
|
|
|
namespace service { class storage_service; }
|
|
|
|
namespace api {
|
|
|
|
void set_storage_proxy(http_context& ctx, routes& r, sharded<service::storage_service>& ss);
|
|
|
|
}
|