k6runner

package
v0.19.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpRunner

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

func (HttpRunner) Run

func (r HttpRunner) Run(ctx context.Context, script []byte) (*RunResponse, error)

func (HttpRunner) WithLogger

func (r HttpRunner) WithLogger(logger *zerolog.Logger) Runner

type LocalRunner

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

func (LocalRunner) Run

func (r LocalRunner) Run(ctx context.Context, script []byte) (*RunResponse, error)

func (LocalRunner) WithLogger

func (r LocalRunner) WithLogger(logger *zerolog.Logger) Runner

type RunRequest

type RunRequest struct {
	Script   []byte   `json:"script"`
	Settings Settings `json:"settings"`
}

type RunResponse

type RunResponse struct {
	Metrics []byte `json:"metrics"`
	Logs    []byte `json:"logs"`
}

type Runner

type Runner interface {
	WithLogger(logger *zerolog.Logger) Runner
	Run(ctx context.Context, script []byte) (*RunResponse, error)
}

func New

func New(uri string) Runner

type Script

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

func NewScript

func NewScript(script []byte, k6runner Runner) (*Script, error)

func (Script) Run

func (r Script) Run(ctx context.Context, registry *prometheus.Registry, logger logger.Logger, internalLogger zerolog.Logger) (bool, error)

type Settings added in v0.19.0

type Settings struct {
	Timeout int64 `json:"timeout"`
}

Jump to

Keyboard shortcuts

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