NgrokExtensions Methods
Class Methods 4 members
Extension methods for adding ngrok to the application model.
AddNgrok(IDistributedApplicationBuilder, string, string?, int?, string?, int?) Section titled AddNgrok(IDistributedApplicationBuilder, string, string?, int?, string?, int?) extension IResourceBuilder<NgrokResource> Configures a container resource for grok which is pre-configured to connect to the resource that this method is used on.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> AddNgrok( this IDistributedApplicationBuilder builder, string name, string? configurationFolder = null, int? endpointPort = null, string? endpointName = null, int? configurationVersion = null) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to. name string The name of the resource. configurationFolder string? optional The folder where temporary ngrok configuration files will be stored; defaults to .ngrok endpointPort int? optional The port of the endpoint for this resource, defaults to a randomly assigned port. endpointName string? optional The name of the endpoint for this resource, defaults to http. configurationVersion int? optional The output version of the ngrok configuration file. Returns
IResourceBuilder<NgrokResource> A reference to the ApplicationModel.IResourceBuilder`1. WithAuthToken(IResourceBuilder<NgrokResource>, string) Section titled WithAuthToken(IResourceBuilder<NgrokResource>, string) extension IResourceBuilder<NgrokResource> Adds a ngrok auth token to a ngrok resource.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithAuthToken( this IResourceBuilder<NgrokResource> builder, string ngrokAuthToken) { // ... }}Parameters
builder IResourceBuilder<NgrokResource> The ngrok resource builder. ngrokAuthToken string The ngrok auth token. Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder. WithAuthToken(IResourceBuilder<NgrokResource>, IResourceBuilder<ParameterResource>) Section titled WithAuthToken(IResourceBuilder<NgrokResource>, IResourceBuilder<ParameterResource>) extension IResourceBuilder<NgrokResource> Adds a ngrok auth token to a ngrok resource.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithAuthToken( this IResourceBuilder<NgrokResource> builder, IResourceBuilder<ParameterResource> ngrokAuthToken) { // ... }}Parameters
builder IResourceBuilder<NgrokResource> The ngrok resource builder. ngrokAuthToken IResourceBuilder<ParameterResource> The ngrok auth token as a parameter resource. Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder. WithTunnelEndpoint(IResourceBuilder<NgrokResource>, IResourceBuilder<TResource>, string, string?, IDictionary<string, string>) Section titled WithTunnelEndpoint(IResourceBuilder<NgrokResource>, IResourceBuilder<TResource>, string, string?, IDictionary<string, string>) extension IResourceBuilder<NgrokResource> Configures a resource with endpoints as a ngrok tunnel endpoint.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithTunnelEndpoint<TResource>( this IResourceBuilder<NgrokResource> builder, IResourceBuilder<TResource> resource, string endpointName, string? ngrokUrl = null, IDictionary<string, string>? labels = null) { // ... }}Parameters
builder IResourceBuilder<NgrokResource> The ngrok resource builder. resource IResourceBuilder<TResource> The resource whose endpoint should be exposed through ngrok. endpointName string The endpoint name to expose. ngrokUrl string? optional The ngrok URL to use, or null to allow ngrok to choose one. labels IDictionary<string, string> optional Optional endpoint labels. Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder. Remarks
This overload is not available in polyglot app hosts. Use the overload that accepts
Generic.IReadOnlyDictionary`2 labels instead.