AspireQdrantExtensions.AddQdrantClient Method

Definition

Registers Qdrant.Client.QdrantClient as a singleton in the services provided by the builder. Configures logging for the Qdrant.Client.QdrantClient.

public static void AddQdrantClient (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string connectionName, Action<Aspire.Qdrant.Client.QdrantClientSettings>? configureSettings = default);
static member AddQdrantClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Aspire.Qdrant.Client.QdrantClientSettings> -> unit
<Extension()>
Public Sub AddQdrantClient (builder As IHostApplicationBuilder, connectionName As String, Optional configureSettings As Action(Of QdrantClientSettings) = Nothing)

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

connectionName
String

The connection name to use to find a connection string.

configureSettings
Action<QdrantClientSettings>

An optional method that can be used for customizing the QdrantClientSettings. It's invoked after the settings are read from the configuration.

Exceptions

If required ConnectionString is not provided in configuration section

Remarks

Reads the configuration from "Aspire:Qdrant:Client" section.

Applies to