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