k6runner

package
v0.0.0-...-05b72f9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 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

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