mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-06-02 05:10:40 +00:00
refactor: remove MixOptions and use StandaloneOptions only (#3893)
* refactor: remove MixOptions and use StandaloneOptions only * refactor: refactor code by code review comments 1. Use '&self' in frontend_options() and datanode_options(); 2. Remove unused 'clone()'; Signed-off-by: zyy17 <zyylsxm@gmail.com> * ci: fix integration error --------- Signed-off-by: zyy17 <zyylsxm@gmail.com>
This commit is contained in:
@@ -75,6 +75,25 @@ impl From<StandaloneWalConfig> for MetasrvWalConfig {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<MetasrvWalConfig> for StandaloneWalConfig {
|
||||
fn from(config: MetasrvWalConfig) -> Self {
|
||||
match config {
|
||||
MetasrvWalConfig::RaftEngine => Self::RaftEngine(RaftEngineConfig::default()),
|
||||
MetasrvWalConfig::Kafka(config) => Self::Kafka(StandaloneKafkaConfig {
|
||||
broker_endpoints: config.broker_endpoints,
|
||||
num_topics: config.num_topics,
|
||||
selector_type: config.selector_type,
|
||||
topic_name_prefix: config.topic_name_prefix,
|
||||
num_partitions: config.num_partitions,
|
||||
replication_factor: config.replication_factor,
|
||||
create_topic_timeout: config.create_topic_timeout,
|
||||
backoff: config.backoff,
|
||||
..Default::default()
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<StandaloneWalConfig> for DatanodeWalConfig {
|
||||
fn from(config: StandaloneWalConfig) -> Self {
|
||||
match config {
|
||||
|
||||
Reference in New Issue
Block a user