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/
29 lines
797 B
C++
29 lines
797 B
C++
/*
|
|
* Copyright (C) 2019-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#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");
|
|
}
|