QdrantBuilderExtensions Methods
Class Methods 5 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?) extension IResourceBuilder<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
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder. name string The name of the resource. This name will be used as the connection string name when referenced in a dependency apiKey IResourceBuilder<ParameterResource> optional The parameter used to provide the API Key for the Qdrant resource. If null a random key will be generated as {name}-Key. grpcPort int? optional The host port of gRPC endpoint of Qdrant database. httpPort int? optional The 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) extension IResourceBuilder<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
builder IResourceBuilder<QdrantServerResource> The resource builder. source string The source directory on the host to mount into the container. isReadOnly bool optional A 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) extension IResourceBuilder<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
builder IResourceBuilder<QdrantServerResource> The resource builder. name string? optional The name of the volume. Defaults to an auto-generated name based on the resource name. isReadOnly bool optional A 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>) extension IResourceBuilder<TDestination> Add 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
builder IResourceBuilder<TDestination> An ApplicationModel.IResourceBuilder`1 for ApplicationModel.ProjectResource qdrantResource IResourceBuilder<QdrantServerResource> The Qdrant server resource Returns
IResourceBuilder<TDestination> The ApplicationModel.IResourceBuilder`1. WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>, string?) Section titled WithReference(IResourceBuilder<TDestination>, IResourceBuilder<QdrantServerResource>, string?) extension IResourceBuilder<TDestination> Add 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
builder IResourceBuilder<TDestination> An ApplicationModel.IResourceBuilder`1 for ApplicationModel.ProjectResource qdrantResource IResourceBuilder<QdrantServerResource> The Qdrant server resource connectionName string? optional An override of the source resource's name for the connection string. The resulting connection string will be "ConnectionStrings__connectionName" if this is not null. Returns
IResourceBuilder<TDestination> The ApplicationModel.IResourceBuilder`1.