ElasticvueBuilderExtensions Methods
ClassMethods2 members
Provides extension methods for Elasticvue resources to an
Hosting.IDistributedApplicationBuilder . WithElasticvue(IResourceBuilder<ElasticsearchResource>, Action<IResourceBuilder<ElasticvueContainerResource>>, string?) Section titled WithElasticvue(IResourceBuilder<ElasticsearchResource>, Action<IResourceBuilder<ElasticvueContainerResource>>, string?)extensionIResourceBuilder<ElasticsearchResource> Adds an administration and development platform for Elasticsearch to the application model using Elasticvue.
public static class ElasticvueBuilderExtensions{ public static IResourceBuilder<ElasticsearchResource> WithElasticvue( this IResourceBuilder<ElasticsearchResource> builder, Action<IResourceBuilder<ElasticvueContainerResource>>? configureContainer = null, string? containerName = null) { // ... }}Parameters
builderIResourceBuilder<ElasticsearchResource> The Elasticsearch server resource builder.configureContainer Action<IResourceBuilder<ElasticvueContainerResource>> optionalConfiguration callback for Elasticvue container resource.containerName string?optionalThe name of the container (Optional).Returns
IResourceBuilder<ElasticsearchResource> A reference to the ApplicationModel.IResourceBuilder`1 .Remarks
This version of the package defaults to the
Tag tag of the Image container image. Examples
Use in application host with a Elasticsearch resource
var builder = DistributedApplication.CreateBuilder(args);
var elasticsearch = builder.AddElasticsearch("elasticsearch") .WithElasticvue();
var api = builder.AddProject<Projects.Api>("api") .WithReference(elasticsearch);
builder.Build().Run();WithHostPort(IResourceBuilder<ElasticvueContainerResource>, int?) Section titled WithHostPort(IResourceBuilder<ElasticvueContainerResource>, int?)extensionIResourceBuilder<ElasticvueContainerResource> Configures the host port that the Elasticvue resource is exposed on instead of using randomly assigned port.
public static class ElasticvueBuilderExtensions{ public static IResourceBuilder<ElasticvueContainerResource> WithHostPort( this IResourceBuilder<ElasticvueContainerResource> builder, int? port) { // ... }}Parameters
builderIResourceBuilder<ElasticvueContainerResource> The resource builder for Elasticvue.portint?The port to bind on the host. If null is used random port will be assigned.Returns
IResourceBuilder<ElasticvueContainerResource> The resource builder for Elasticvue.