From 0e44a89046f5e254e7f94fc4882f88ceabc3de90 Mon Sep 17 00:00:00 2001 From: Rudro-25 Date: Fri, 9 Aug 2024 16:50:10 +0600 Subject: [PATCH] update zk client Signed-off-by: Rudro-25 --- zookeeper/kubedb_client_builder.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zookeeper/kubedb_client_builder.go b/zookeeper/kubedb_client_builder.go index 1b529aae..f20a255e 100644 --- a/zookeeper/kubedb_client_builder.go +++ b/zookeeper/kubedb_client_builder.go @@ -35,6 +35,7 @@ const ( type KubeDBClientBuilder struct { kc client.Client db *dbapi.ZooKeeper + ctx context.Context podName string url string } @@ -56,6 +57,11 @@ func (o *KubeDBClientBuilder) WithURL(url string) *KubeDBClientBuilder { return o } +func (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuilder { + o.ctx = ctx + return o +} + func (o *KubeDBClientBuilder) GetZooKeeperClient(ctx context.Context) (*Client, error) { var err error if o.podName != "" {