diff --git a/shotover-proxy/src/config/topology.rs b/shotover-proxy/src/config/topology.rs index 7b71b0a7b..bda60ee00 100644 --- a/shotover-proxy/src/config/topology.rs +++ b/shotover-proxy/src/config/topology.rs @@ -8,14 +8,14 @@ use std::collections::HashMap; use tokio::sync::watch; use tracing::info; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct Topology { pub sources: HashMap, pub chain_config: HashMap>, pub source_to_chain_mapping: HashMap, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct TopologyConfig { pub sources: HashMap, pub chain_config: HashMap>, diff --git a/shotover-proxy/src/transforms/cassandra/peers_rewrite.rs b/shotover-proxy/src/transforms/cassandra/peers_rewrite.rs index f12513b81..742da23f8 100644 --- a/shotover-proxy/src/transforms/cassandra/peers_rewrite.rs +++ b/shotover-proxy/src/transforms/cassandra/peers_rewrite.rs @@ -15,7 +15,7 @@ use cql3_parser::common::{FQName, Identifier}; use cql3_parser::select::SelectElement; use serde::Deserialize; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct CassandraPeersRewriteConfig { pub port: u16, } diff --git a/shotover-proxy/src/transforms/cassandra/sink_cluster/mod.rs b/shotover-proxy/src/transforms/cassandra/sink_cluster/mod.rs index d897b676c..4e95d4209 100644 --- a/shotover-proxy/src/transforms/cassandra/sink_cluster/mod.rs +++ b/shotover-proxy/src/transforms/cassandra/sink_cluster/mod.rs @@ -66,7 +66,7 @@ const PEERS_V2_TABLE: FQNameRef = FQNameRef { name: IdentifierRef::Quoted("peers_v2"), }; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct CassandraSinkClusterConfig { /// contact points must be within the specified data_center and rack. /// If this is not followed, shotover's invariants will still be upheld but shotover will communicate with a diff --git a/shotover-proxy/src/transforms/cassandra/sink_single.rs b/shotover-proxy/src/transforms/cassandra/sink_single.rs index dcb5f311f..cb714a564 100644 --- a/shotover-proxy/src/transforms/cassandra/sink_single.rs +++ b/shotover-proxy/src/transforms/cassandra/sink_single.rs @@ -16,7 +16,7 @@ use std::time::Duration; use tokio::sync::{mpsc, oneshot}; use tracing::trace; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct CassandraSinkSingleConfig { #[serde(rename = "remote_address")] pub address: String, diff --git a/shotover-proxy/src/transforms/coalesce.rs b/shotover-proxy/src/transforms/coalesce.rs index ccbbff536..734c75409 100644 --- a/shotover-proxy/src/transforms/coalesce.rs +++ b/shotover-proxy/src/transforms/coalesce.rs @@ -15,7 +15,7 @@ pub struct Coalesce { last_write: Instant, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct CoalesceConfig { pub flush_when_buffered_message_count: Option, pub flush_when_millis_since_last_flush: Option, diff --git a/shotover-proxy/src/transforms/debug/force_parse.rs b/shotover-proxy/src/transforms/debug/force_parse.rs index cb3d97aac..781194114 100644 --- a/shotover-proxy/src/transforms/debug/force_parse.rs +++ b/shotover-proxy/src/transforms/debug/force_parse.rs @@ -12,7 +12,7 @@ use serde::Deserialize; /// Messages that pass through this transform will be parsed. /// Must be individually enabled at the request or response level. -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct DebugForceParseConfig { parse_requests: bool, parse_responses: bool, @@ -31,7 +31,7 @@ impl DebugForceParseConfig { /// Messages that pass through this transform will be parsed and then reencoded. /// Must be individually enabled at the request or response level. -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct DebugForceEncodeConfig { encode_requests: bool, encode_responses: bool, diff --git a/shotover-proxy/src/transforms/debug/returner.rs b/shotover-proxy/src/transforms/debug/returner.rs index 235b0195f..798e66364 100644 --- a/shotover-proxy/src/transforms/debug/returner.rs +++ b/shotover-proxy/src/transforms/debug/returner.rs @@ -5,7 +5,7 @@ use anyhow::{anyhow, Result}; use async_trait::async_trait; use serde::Deserialize; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct DebugReturnerConfig { #[serde(flatten)] response: Response, diff --git a/shotover-proxy/src/transforms/distributed/consistent_scatter.rs b/shotover-proxy/src/transforms/distributed/consistent_scatter.rs index ef321d244..55eb0fe9d 100644 --- a/shotover-proxy/src/transforms/distributed/consistent_scatter.rs +++ b/shotover-proxy/src/transforms/distributed/consistent_scatter.rs @@ -12,7 +12,7 @@ use serde::Deserialize; use std::collections::HashMap; use tracing::{debug, error, trace, warn}; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct ConsistentScatterConfig { pub route_map: HashMap>, pub write_consistency: i32, diff --git a/shotover-proxy/src/transforms/filter.rs b/shotover-proxy/src/transforms/filter.rs index 9123d167a..b9715e40d 100644 --- a/shotover-proxy/src/transforms/filter.rs +++ b/shotover-proxy/src/transforms/filter.rs @@ -15,7 +15,7 @@ pub struct QueryTypeFilter { pub filter: QueryType, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct QueryTypeFilterConfig { pub filter: QueryType, } diff --git a/shotover-proxy/src/transforms/kafka/sink_single.rs b/shotover-proxy/src/transforms/kafka/sink_single.rs index f0cfa2fa0..a3e4c2efc 100644 --- a/shotover-proxy/src/transforms/kafka/sink_single.rs +++ b/shotover-proxy/src/transforms/kafka/sink_single.rs @@ -14,7 +14,7 @@ use std::time::Duration; use tokio::sync::{mpsc, oneshot}; use tokio::time::timeout; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct KafkaSinkSingleConfig { #[serde(rename = "remote_address")] pub address: String, diff --git a/shotover-proxy/src/transforms/load_balance.rs b/shotover-proxy/src/transforms/load_balance.rs index 5833bf43c..c5bebe982 100644 --- a/shotover-proxy/src/transforms/load_balance.rs +++ b/shotover-proxy/src/transforms/load_balance.rs @@ -10,7 +10,7 @@ use serde::Deserialize; use std::sync::Arc; use tokio::sync::Mutex; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct ConnectionBalanceAndPoolConfig { pub name: String, pub max_connections: usize, diff --git a/shotover-proxy/src/transforms/mod.rs b/shotover-proxy/src/transforms/mod.rs index bba205fd7..c153e29a5 100644 --- a/shotover-proxy/src/transforms/mod.rs +++ b/shotover-proxy/src/transforms/mod.rs @@ -233,7 +233,7 @@ impl Transforms { /// The TransformsConfig enum is responsible for TransformConfig registration and enum dispatch /// in the transform chain. Allows you to register your config struct for the config file. -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub enum TransformsConfig { #[cfg(feature = "alpha-transforms")] KafkaSinkSingle(KafkaSinkSingleConfig), diff --git a/shotover-proxy/src/transforms/parallel_map.rs b/shotover-proxy/src/transforms/parallel_map.rs index 93b5a24ce..0786826f5 100644 --- a/shotover-proxy/src/transforms/parallel_map.rs +++ b/shotover-proxy/src/transforms/parallel_map.rs @@ -66,7 +66,7 @@ where } } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct ParallelMapConfig { pub parallelism: u32, pub chain: Vec, diff --git a/shotover-proxy/src/transforms/protect/mod.rs b/shotover-proxy/src/transforms/protect/mod.rs index 6223a27c4..5a211f15f 100644 --- a/shotover-proxy/src/transforms/protect/mod.rs +++ b/shotover-proxy/src/transforms/protect/mod.rs @@ -19,7 +19,7 @@ mod key_management; mod local_kek; mod pkcs_11; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct ProtectConfig { pub keyspace_table_columns: HashMap>>, pub key_manager: KeyManagerConfig, diff --git a/shotover-proxy/src/transforms/query_counter.rs b/shotover-proxy/src/transforms/query_counter.rs index fb4f7a764..ba395e15d 100644 --- a/shotover-proxy/src/transforms/query_counter.rs +++ b/shotover-proxy/src/transforms/query_counter.rs @@ -12,7 +12,7 @@ pub struct QueryCounter { counter_name: String, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct QueryCounterConfig { pub name: String, } diff --git a/shotover-proxy/src/transforms/redis/cache.rs b/shotover-proxy/src/transforms/redis/cache.rs index 1ef96f41f..bab2d027c 100644 --- a/shotover-proxy/src/transforms/redis/cache.rs +++ b/shotover-proxy/src/transforms/redis/cache.rs @@ -50,7 +50,7 @@ enum CacheableState { Skip, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct TableCacheSchemaConfig { partition_key: Vec, range_key: Vec, @@ -75,7 +75,7 @@ impl From<&TableCacheSchemaConfig> for TableCacheSchema { } } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct RedisConfig { pub caching_schema: HashMap, pub chain: Vec, diff --git a/shotover-proxy/src/transforms/redis/cluster_ports_rewrite.rs b/shotover-proxy/src/transforms/redis/cluster_ports_rewrite.rs index 39a0e197b..b69f7e3d1 100644 --- a/shotover-proxy/src/transforms/redis/cluster_ports_rewrite.rs +++ b/shotover-proxy/src/transforms/redis/cluster_ports_rewrite.rs @@ -8,7 +8,7 @@ use crate::error::ChainResponse; use crate::frame::Frame; use crate::transforms::{Transform, TransformBuilder, Transforms, Wrapper}; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct RedisClusterPortsRewriteConfig { pub new_port: u16, } diff --git a/shotover-proxy/src/transforms/redis/sink_cluster.rs b/shotover-proxy/src/transforms/redis/sink_cluster.rs index 9c0c845cd..2c19ca74e 100644 --- a/shotover-proxy/src/transforms/redis/sink_cluster.rs +++ b/shotover-proxy/src/transforms/redis/sink_cluster.rs @@ -35,7 +35,7 @@ const SLOT_SIZE: usize = 16384; type ChannelMap = HashMap>>; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct RedisSinkClusterConfig { pub first_contact_points: Vec, pub direct_destination: Option, diff --git a/shotover-proxy/src/transforms/redis/sink_single.rs b/shotover-proxy/src/transforms/redis/sink_single.rs index ce75459d1..042debcb1 100644 --- a/shotover-proxy/src/transforms/redis/sink_single.rs +++ b/shotover-proxy/src/transforms/redis/sink_single.rs @@ -26,7 +26,7 @@ use tokio_util::codec::FramedRead; use tokio_util::codec::FramedWrite; use tracing::Instrument; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct RedisSinkSingleConfig { #[serde(rename = "remote_address")] pub address: String, diff --git a/shotover-proxy/src/transforms/tee.rs b/shotover-proxy/src/transforms/tee.rs index f76491610..bb89b0ae1 100644 --- a/shotover-proxy/src/transforms/tee.rs +++ b/shotover-proxy/src/transforms/tee.rs @@ -98,7 +98,7 @@ pub enum ConsistencyBehavior { SubchainOnMismatch(BufferedChain), } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct TeeConfig { pub behavior: Option, pub timeout_micros: Option, @@ -106,7 +106,7 @@ pub struct TeeConfig { pub buffer_size: Option, } -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub enum ConsistencyBehaviorConfig { Ignore, FailOnMismatch, diff --git a/shotover-proxy/src/transforms/throttling.rs b/shotover-proxy/src/transforms/throttling.rs index 1e1bec5d5..c4c283e08 100644 --- a/shotover-proxy/src/transforms/throttling.rs +++ b/shotover-proxy/src/transforms/throttling.rs @@ -18,7 +18,7 @@ use std::sync::Arc; use super::Transforms; -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug)] pub struct RequestThrottlingConfig { pub max_requests_per_second: NonZeroU32, }