Murphy-OrangeMud commented on code in PR #2735: URL: https://github.com/apache/incubator-opendal/pull/2735#discussion_r1300627991
########## core/src/services/zookeeper/backend.rs: ########## @@ -0,0 +1,214 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::cell::OnceCell; +use std::collections::HashMap; +use zookeeper_client as zk; + +use crate::raw::adapters::kv; +use crate::Scheme; +use async_trait::async_trait; + +use crate::Builder; +use crate::Error; +use crate::ErrorKind; +use crate::*; + +use std::fmt::Debug; +use std::fmt::Formatter; + +const DEFAULT_ZOOKEEPER_ENDPOINT: &str = "127.0.0.1:2181"; +/// The scheme for zookeeper authentication +/// currently we do not support sasl authentication +const ZOOKEEPER_AUTH_SCHEME: &str = "digest"; + +#[derive(Clone, Default)] +pub struct ZookeeperBuilder { + /// network address of the Zookeeper service + /// Default: 127.0.0.1:2181 + endpoint: Option<String>, Review Comment: I have tried but the client sdk only supports single endpoint/single cluster and maintaining multiple endpoints and get connections several times when setting or getting data seems a bit weird. Haven't come up with a neat way to implement this yet. I'll continue to try this way currently. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
