Freigeben über


KafkaBuilderExtensions.WithHostPort Method

Definition

Configures the host port that the KafkaUI resource is exposed on instead of using randomly assigned port.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.KafkaUIContainerResource> WithHostPort (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.KafkaUIContainerResource> builder, int? port);
static member WithHostPort : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.KafkaUIContainerResource> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.KafkaUIContainerResource>
<Extension()>
Public Function WithHostPort (builder As IResourceBuilder(Of KafkaUIContainerResource), port As Nullable(Of Integer)) As IResourceBuilder(Of KafkaUIContainerResource)

Parameters

builder
IResourceBuilder<KafkaUIContainerResource>

The resource builder for KafkaUI.

port
Nullable<Int32>

The port to bind on the host. If null is used random port will be assigned.

Returns

The resource builder for KafkaUI.

Applies to