Dagger
Search

k6

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/prefapp/daggerverse/k6@82e346ac7d06fe65f55ba70deac64f0332b0bab3

Entrypoint

Return Type
K6
Example
dagger -m github.com/prefapp/daggerverse/k6@82e346ac7d06fe65f55ba70deac64f0332b0bab3 call \
func (m *myModule) example() *K6  {
	return dag.
			K6()
}
@function
def example() -> dag.K6:
	return (
		dag.k6()
	)
@func()
example(): K6 {
	return dag
		.k6()
}

Types

K6 🔗

run() 🔗

Returns lines that match a pattern in the files of the provided Directory

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
workingDirDirectory !-The working directory containing the script
scriptString !-k6 Script file to execute
env[String ! ] -Environment variables to set
vusInteger 1Virtual users to emulate
durationString "1s"Duration of the test
Example
dagger -m github.com/prefapp/daggerverse/k6@82e346ac7d06fe65f55ba70deac64f0332b0bab3 call \
 run --working-dir DIR_PATH --script string
func (m *myModule) example(workingDir *Directory, script string) *Container  {
	return dag.
			K6().
			Run(workingDir, script)
}
@function
def example(working_dir: dagger.Directory, script: str) -> dagger.Container:
	return (
		dag.k6()
		.run(working_dir, script)
	)
@func()
example(workingDir: Directory, script: string): Container {
	return dag
		.k6()
		.run(workingDir, script)
}