次の方法で共有


MilvusBuilderExtensions.WithAttu<T> Method

Definition

Adds an administration and development platform for Milvus to the application model using Attu.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithAttu<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Milvus.AttuResource>>? configureContainer = default, string? containerName = default) where T : Aspire.Hosting.Milvus.MilvusServerResource;
static member WithAttu : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.Milvus.MilvusServerResource)> * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Milvus.AttuResource>> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.Milvus.MilvusServerResource)> (requires 'T :> Aspire.Hosting.Milvus.MilvusServerResource)
<Extension()>
Public Function WithAttu(Of T As MilvusServerResource) (builder As IResourceBuilder(Of T), Optional configureContainer As Action(Of IResourceBuilder(Of AttuResource)) = Nothing, Optional containerName As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The Milvus server resource builder.

configureContainer
Action<IResourceBuilder<AttuResource>>

Configuration callback for Attu container resource.

containerName
String

The name of the container (Optional).

Returns

A reference to the IResourceBuilder<T>.

Examples

Use in application host with a Milvus resource

var builder = DistributedApplication.CreateBuilder(args);

var milvus = builder.AddMilvus("milvus")
  .WithAttu();
var api = builder.AddProject<Projects.Api>("api")
  .WithReference(milvus);

builder.Build().Run();

Remarks

This version of the package defaults to the tag of the container image.

Applies to