Dela via


AspireQdrantExtensions.AddKeyedQdrantClient Method

Definition

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

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

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
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