File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ mod snapshot;
1313mod version_check;
1414
1515use std:: future:: Future ;
16+ use std:: sync:: Arc ;
1617use std:: thread;
1718
1819use tonic:: codegen:: InterceptedService ;
@@ -82,12 +83,13 @@ pub type QdrantBuilder = QdrantConfig;
8283/// - [`create_collection`](Self::create_collection) - create a new collection
8384/// - [`upsert_points`](Self::upsert_points) - insert or update points
8485/// - [`search_points`](Self::search_points) - search points with similarity search
86+ #[ derive( Clone ) ]
8587pub struct Qdrant {
8688 /// Client configuration
8789 pub config : QdrantConfig ,
8890
8991 /// Internal connection pool
90- channel : ChannelPool ,
92+ channel : Arc < ChannelPool > ,
9193}
9294
9395/// # Construct and connect
@@ -107,7 +109,7 @@ impl Qdrant {
107109 config. keep_alive_while_idle ,
108110 ) ;
109111 let client = Self {
110- channel,
112+ channel : Arc :: new ( channel ) ,
111113 config : config. clone ( ) ,
112114 } ;
113115
@@ -151,7 +153,7 @@ impl Qdrant {
151153 config. keep_alive_while_idle ,
152154 ) ;
153155
154- let client = Self { channel, config } ;
156+ let client = Self { channel : Arc :: new ( channel ) , config } ;
155157
156158 Ok ( client)
157159 }
You can’t perform that action at this time.
0 commit comments