YarpResource
Handle
type YarpResource interface { IComputeResource IContainerFilesDestinationResource Resource ResourceWithArgs ResourceWithEndpoints ResourceWithEnvironment ResourceWithServiceDiscovery ResourceWithWaitSupport}5 members
Methods
In publish mode, generates a Dockerfile that copies static files from the specified resource into /app/wwwroot.
PublishWithStaticFiles(resourceWithFiles ResourceWithContainerFiles) YarpResourceParameters
resourceWithFiles ResourceWithContainerFiles The resource with container files.Returns
YarpResource The updated resource builder.
Returns a handle; failures surface later via Err().
Configure the YARP resource.
WithConfiguration(configurationBuilder func(obj YarpConfigurationBuilder)) YarpResourceParameters
configurationBuilder func(obj YarpConfigurationBuilder) callbackThe delegate to configure YARP.Returns
YarpResource Returns a handle; failures surface later via Err().
Configures the host HTTPS port that the YARP resource is exposed on instead of using randomly assigned port. This will only have effect if an HTTPS endpoint is configured on the YARP resource due to TLS termination being enabled.
WithHostHttpsPort(port *float64) YarpResourceParameters
port*float64The port to bind on the host. If null is used random port will be assigned.Returns
YarpResource The updated resource builder.
Returns a handle; failures surface later via Err().
Configures the host port that the YARP resource is exposed on instead of using randomly assigned port.
WithHostPort(port *float64) YarpResourceParameters
port*float64The port to bind on the host. If null is used random port will be assigned.Returns
YarpResource Returns a handle; failures surface later via Err().
Enables static file serving in the YARP resource.
WithStaticFiles(options ...*WithStaticFilesOptions) YarpResourceParameters
options...*WithStaticFilesOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithStaticFilesOptions argument.
SourcePath *stringReturns
YarpResource Returns a handle; failures surface later via Err().