Currently snitch drivers register themselves in class-registry with all sorts of construction options possible. All those different constuctors are in fact "config options". When later snitch will declare its dependencies (gossiper and system keyspace), it will require patching all this registrations, which's very inconvenient. This patch introduces the snitch_config struct and replaces all the snitch constructors with the snitch_driver(snitch_config cfg) one. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
17 lines
404 B
C++
17 lines
404 B
C++
|
|
/*
|
|
* Copyright (C) 2015-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#include "locator/rack_inferring_snitch.hh"
|
|
|
|
namespace locator {
|
|
using registry = class_registrator<i_endpoint_snitch, rack_inferring_snitch, const snitch_config&>;
|
|
static registry registrator1("org.apache.cassandra.locator.RackInferringSnitch");
|
|
static registry registrator2("RackInferringSnitch");
|
|
}
|