Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

Resource.WithProcessCommandFactory

Method
📦 Aspire.Hosting v17.0.0
func (Resource) WithProcessCommandFactory(
commandName string,
displayName string,
createProcessSpec func(arg ExecuteCommandContext) *ProcessCommandSpecExportData,
options ...*ProcessCommandResultExportOptions,
) Resource

Signature

methodWithProcessCommandFactorybuilder
Adds a command to the resource that starts a local process created by a callback when invoked.
WithProcessCommandFactory(
commandName string,
displayName string,
createProcessSpec func(arg ExecuteCommandContext) *ProcessCommandSpecExportData,
options ...*ProcessCommandResultExportOptions,
) Resource
commandNamestring
displayNamestring
createProcessSpecfunc(arg ExecuteCommandContext) *ProcessCommandSpecExportDatacallback
options...*ProcessCommandResultExportOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *ProcessCommandResultExportOptions struct.

Resource

Returns a handle; failures surface later via Err().

Defined on

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

Applies to

This function applies to the following types: