QdrantBuilderExtensions Methods
ClassMethods5 members
Provides extension methods for adding Qdrant resources to the application model.
AddQdrant(IDistributedApplicationBuilder, string, IResourceBuilder<ParameterResource>, int?, int?)Section titled AddQdrant(IDistributedApplicationBuilder, string, IResourceBuilder<ParameterResource>, int?, int?)extensionIResourceBuilder<QdrantServerResource> Adds a Qdrant resource to the application. A container is used for local development.
public static class QdrantBuilderExtensions{ public static IResourceBuilder<QdrantServerResource> AddQdrant( this IDistributedApplicationBuilder builder, string name, IResourceBuilder<ParameterResource>? apiKey = null, int? grpcPort = null, int? httpPort = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder.namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependencyapiKeyIResourceBuilder<ParameterResource>optionalThe parameter used to provide the API Key for the Qdrant resource. If null a random key will be generated as {name}-Key.grpcPortint?optionalThe host port of gRPC endpoint of Qdrant database.httpPortint?optionalThe host port of HTTP endpoint of Qdrant database.Returns
IResourceBuilder<QdrantServerResource>A reference to the ApplicationModel.IResourceBuilder`1.Remarks
The .NET client library uses the gRPC port by default to communicate and this resource exposes that endpoint. This version of the package defaults to the tag of the container image.
WithDataBindMount(IResourceBuilder<QdrantServerResource>, string, bool)Section titled WithDataBindMount(IResourceBuilder<QdrantServerResource>, string, bool)extensionIResourceBuilder<QdrantServerResource> Adds a bind mount for the data folder to a Qdrant container resource.
public static class QdrantBuilderExtensions{ public static IResourceBuilder<QdrantServerResource> WithDataBindMount( this IResourceBuilder<QdrantServerResource> builder, string source, bool isReadOnly = false) { // ... }}Parameters
builderIResourceBuilder<QdrantServerResource>The resource builder.sourcestringThe source directory on the host to mount into the container.isReadOnlybooloptionalA flag that indicates if this is a read-only mount.Returns
IResourceBuilder<QdrantServerResource>The ApplicationModel.IResourceBuilder`1.WithDataVolume(IResourceBuilder<QdrantServerResource>, string?, bool)Section titled WithDataVolume(IResourceBuilder<QdrantServerResource>, string?, bool)extensionIResourceBuilder<QdrantServerResource> Adds a named volume for the data folder to a Qdrant container resource.
public static class QdrantBuilderExtensions{ public static IResourceBuilder<QdrantServerResource> WithDataVolume( this IResourceBuilder<QdrantServerResource> builder, string? name = null, bool isReadOnly = false) { // ... }}Parameters
builderIResourceBuilder<QdrantServerResource>The resource builder.namestring?optionalThe name of the volume. Defaults to an auto-generated name based on the resource name.isReadOnlybooloptionalA flag that indicates if this is a read-only volume.Returns
IResourceBuilder<QdrantServerResource>The ApplicationModel.IResourceBuilder`1.WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>)Section titled WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>)extensionIResourceBuilder<TDestination> Adds a reference to a Qdrant server to the resource.
public static class QdrantBuilderExtensions{ public static IResourceBuilder<TDestination> WithReference<TDestination>( this IResourceBuilder<TDestination> builder, IResourceBuilder<QdrantServerResource> qdrantResource) { // ... }}Parameters
builderIResourceBuilder<TDestination>The resource builder for the destination resource.qdrantResourceIResourceBuilder<QdrantServerResource>The Qdrant server resource.Returns
IResourceBuilder<TDestination>The ApplicationModel.IResourceBuilder`1.Remarks
This overload is not available in polyglot AppHosts. Use the overload that accepts an explicit connection name instead.
WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>, string?)Section titled WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>, string?)extensionIResourceBuilder<TDestination> Adds a reference to a Qdrant server to the resource.
public static class QdrantBuilderExtensions{ public static IResourceBuilder<TDestination> WithReference<TDestination>( this IResourceBuilder<TDestination> builder, IResourceBuilder<QdrantServerResource> qdrantResource, string? connectionName = null) { // ... }}Parameters
builderIResourceBuilder<TDestination>The resource builder for the destination resource.qdrantResourceIResourceBuilder<QdrantServerResource>The Qdrant server resource.connectionNamestring?optional An override of the source resource's logical connection name. Physical environment-variable names are derived from this value when it is not null, unless the source resource specifies IResourceWithConnectionString.ConnectionStringEnvironmentVariable, in which case that explicit physical name is preserved for the gRPC connection and used with an _http suffix for the HTTP connection. Returns
IResourceBuilder<TDestination>The ApplicationModel.IResourceBuilder`1.