Skip to content
Docs Try Aspire
Docs Try

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

property primaryEndpoint EndpointReference get
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
method withScript builder
Runs a k6 JS script when starting the Grafana k6 container resource.
withScript(
scriptPath: string,
virtualUsers?: number,
duration?: string): K6Resource
scriptPath string
virtualUsers number optional = 10
duration string optional = 30s
K6Resource