package
0.57.0
Repository: https://github.com/grafana/k6.git
Documentation: pkg.go.dev

# Packages

Package k6 implements the module imported as 'k6' from inside k6.

# Functions

ExportGloballyModule sets all exports of the provided module name on the globalThis.
NewModuleResolver returns a new module resolution instance that will resolve.
NewModuleSystem returns a new ModuleSystem for the provide VU using the provided resoluter.
Register the given mod as an external JavaScript module that can be imported by name.

# Structs

Exports is representation of ESM exports of a module.
ModuleResolver knows how to get base Module that can be initialized.
ModuleSystem is implementing an ESM like module system to resolve js modules for k6 usage.
RunSourceDataResult helps with the asynchronous nature of ESM it wraps the promise that is returned from Sobek while at the same time allowing access to the module record.

# Interfaces

Instance is what a module needs to return.
Module is the interface js modules should implement in order to get access to the VU.
VU gives access to the currently executing VU to a module Instance.

# Type aliases

FileLoader is a type alias for a function that returns the contents of the referenced file.