Package io.qdrant.client
Class QdrantGrpcClient.Builder
java.lang.Object
io.qdrant.client.QdrantGrpcClient.Builder
- Enclosing class:
- QdrantGrpcClient
builder for
QdrantGrpcClient-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance ofQdrantGrpcClientwithApiKey(String apiKey) Sets the API key to use for authenticationwithCallCredentials(io.grpc.CallCredentials callCredentials) Sets the credential data that will be propagated to the server via request metadata for each RPC.withHeaders(Map<String, String> headers) Sets custom headers to send with every gRPC request.withTimeout(Duration timeout) Sets a default timeout for all requests.
-
Method Details
-
withApiKey
Sets the API key to use for authentication- Parameters:
apiKey- The API key to use.- Returns:
- this
-
withTimeout
Sets a default timeout for all requests.- Parameters:
timeout- The timeout.- Returns:
- this
-
withCallCredentials
public QdrantGrpcClient.Builder withCallCredentials(@Nullable io.grpc.CallCredentials callCredentials) Sets the credential data that will be propagated to the server via request metadata for each RPC.Note: If both
withApiKey(String)/withHeaders(Map)and this method are used, this method takes precedence and the API key and headers will be ignored.- Parameters:
callCredentials- The call credentials to use.- Returns:
- this
-
withHeaders
Sets custom headers to send with every gRPC request.- Parameters:
headers- The headers to send.- Returns:
- this
-
build
Builds a new instance ofQdrantGrpcClient- Returns:
- a new instance of
QdrantGrpcClient
-