Skip to content
DocsTry Aspire
DocsTry

K6Resource

Handle
📦 CommunityToolkit.Aspire.Hosting.k6 v13.4.0
interface K6Resource
extends IComputeResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport {
readonly primaryEndpoint: EndpointReference;
withK6OtlpEnvironment(): K6Resource;
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string): K6Resource;
}

Properties

propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Grafana k6 instance. This endpoint is used for all API calls over HTTP.

Methods

Set K6 environment variables from the existing OTEL environment set for this resource. See https://grafana.com/docs/k6/latest/results-output/real-time/opentelemetry/#configuration.
withK6OtlpEnvironment(): K6Resource
K6Resource
methodwithScriptbuilder
Runs a k6 JS script when starting the Grafana k6 container resource.
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string): K6Resource
scriptPathstring
virtualUsersnumberoptional= 10
durationstringoptional= 30s
K6Resource