Skip to content
DocsTry Aspire
DocsTry

AspireQdrantExtensions Methods

ClassMethods2 members
Provides extension methods for registering Qdrant-related services in an Hosting.IHostApplicationBuilder.
AddKeyedQdrantClient(IHostApplicationBuilder, string, Action<QdrantClientSettings>)Section titled AddKeyedQdrantClient(IHostApplicationBuilder, string, Action<QdrantClientSettings>)extension
Registers Client.QdrantClient as a keyed singleton for the given name in the services provided by the builder. Configures logging for the Client.QdrantClient.
public static class AspireQdrantExtensions
{
public static void AddKeyedQdrantClient(
this IHostApplicationBuilder builder,
string name,
Action<QdrantClientSettings>? configureSettings = null)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
namestringThe connection name to use to find a connection string.
configureSettingsAction<QdrantClientSettings>optionalAn optional method that can be used for customizing the QdrantClientSettings. It's invoked after the settings are read from the configuration.
InvalidOperationExceptionIf required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:Qdrant:Client" section.
AddQdrantClient(IHostApplicationBuilder, string, Action<QdrantClientSettings>)Section titled AddQdrantClient(IHostApplicationBuilder, string, Action<QdrantClientSettings>)extension
Registers Client.QdrantClient as a singleton in the services provided by the builder. Configures logging for the Client.QdrantClient.
public static class AspireQdrantExtensions
{
public static void AddQdrantClient(
this IHostApplicationBuilder builder,
string connectionName,
Action<QdrantClientSettings>? configureSettings = null)
{
// ...
}
}
builderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder to read config from and add services to.
connectionNamestringThe connection name to use to find a connection string.
configureSettingsAction<QdrantClientSettings>optionalAn optional method that can be used for customizing the QdrantClientSettings. It's invoked after the settings are read from the configuration.
InvalidOperationExceptionIf required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:Qdrant:Client" section.