Skip to content

Commit 3c43c45

Browse files
committed
enable reqwest client for data plane
1 parent b63eca0 commit 3c43c45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pinecone/data.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use crate::pinecone::PineconeClient;
22
use crate::protos::vector_service_client::VectorServiceClient;
33
use crate::utils::errors::PineconeError;
44
use once_cell::sync::Lazy;
5+
use std::sync::Arc;
56
use tonic::metadata::{Ascii, MetadataValue as TonicMetadataVal};
67
use tonic::service::interceptor::InterceptedService;
78
use tonic::service::Interceptor;
@@ -12,6 +13,7 @@ use crate::models::{
1213
DescribeIndexStatsResponse, FetchResponse, ListResponse, Metadata, Namespace, QueryResponse,
1314
SparseValues, UpdateResponse, UpsertResponse, Vector,
1415
};
16+
use crate::openapi::apis::vector_operations_api;
1517
use crate::protos;
1618

1719
#[derive(Debug, Clone)]
@@ -38,6 +40,7 @@ pub struct Index {
3840
/// The name of the index.
3941
host: String,
4042
connection: VectorServiceClient<InterceptedService<Channel, ApiKeyInterceptor>>,
43+
client: Arc<PineconeClient>,
4144
}
4245

4346
impl Index {
@@ -623,6 +626,7 @@ impl PineconeClient {
623626
let index = Index {
624627
host: endpoint.clone(),
625628
connection: self.new_index_connection(endpoint).await?,
629+
client: Arc::new(self.clone()),
626630
};
627631

628632
Ok(index)

0 commit comments

Comments
 (0)