Now the connection_notifier is all gone, only the client_data bits are left. To keep it consistent -- rename the files. Also, while at it, brush up the header dependencies and remove the not really used constexprs for client states. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
29 lines
774 B
C++
29 lines
774 B
C++
/*
|
|
* Copyright (C) 2019-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#include "client_data.hh"
|
|
#include <stdexcept>
|
|
|
|
sstring to_string(client_type ct) {
|
|
switch (ct) {
|
|
case client_type::cql: return "cql";
|
|
case client_type::thrift: return "thrift";
|
|
case client_type::alternator: return "alternator";
|
|
}
|
|
throw std::runtime_error("Invalid client_type");
|
|
}
|
|
|
|
sstring to_string(client_connection_stage ccs) {
|
|
switch (ccs) {
|
|
case client_connection_stage::established: return "ESTABLISHED";
|
|
case client_connection_stage::authenticating: return "AUTHENTICATING";
|
|
case client_connection_stage::ready: return "READY";
|
|
}
|
|
throw std::runtime_error("Invalid client_connection_stage");
|
|
}
|