exec

package
v0.0.0-...-bb59514 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package exec provides the xk6 Modules implementation for running local commands using Javascript

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOptions

type CommandOptions struct {
	Dir string
}

CommandOptions contains the options that can be passed to command.

type EXEC

type EXEC struct {
	// contains filtered or unexported fields
}

EXEC represents an instance of the EXEC module for every VU.

func (*EXEC) Command

func (*EXEC) Command(name string, args []string, option CommandOptions) string

Command is a wrapper for Go exec.Command

func (*EXEC) Exports

func (exec *EXEC) Exports() modules.Exports

Exports implements the modules.Instance interface and returns the exports of the JS module.

type RootModule

type RootModule struct{}

RootModule is the global module object type. It is instantiated once per test run and will be used to create `k6/x/exec` module instances for each VU.

func (*RootModule) NewModuleInstance

func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance implements the modules.Module interface to return a new instance for each VU.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL