cloud

package
v0.0.0-...-6202178 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cloud implements an Output that flushes to the k6 Cloud platform.

Index

Constants

View Source
const TestName = "k6 test"

TestName is the default k6 Cloud test name

Variables

This section is empty.

Functions

func New

func New(params output.Params) (output.Output, error)

New creates a new cloud output.

Types

type Output

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

Output sends result data to the k6 Cloud service.

func (*Output) Description

func (out *Output) Description() string

Description returns the URL with the test run results.

func (*Output) SetTestRunStopCallback

func (out *Output) SetTestRunStopCallback(stopFunc func(error))

SetTestRunStopCallback receives the function that stops the engine on error

func (*Output) SetThresholds

func (out *Output) SetThresholds(scriptThresholds map[string]metrics.Thresholds)

SetThresholds receives the thresholds before the output is Start()-ed.

func (*Output) Start

func (out *Output) Start() error

Start calls the k6 Cloud API to initialize the test run, and then starts the goroutine that would listen for metric samples and send them to the cloud.

func (*Output) Stop deprecated

func (out *Output) Stop() error

Stop gracefully stops all metric emission from the output: when all metric samples are emitted, it makes a cloud API call to finish the test run.

Deprecated: use StopWithTestError() instead.

func (*Output) StopWithTestError

func (out *Output) StopWithTestError(testErr error) error

StopWithTestError gracefully stops all metric emission from the output: when all metric samples are emitted, it makes a cloud API call to finish the test run. If testErr was specified, it extracts the RunStatus from it.

Directories

Path Synopsis
Package expv2 contains a Cloud output using a Protobuf binary format for encoding payloads.
Package expv2 contains a Cloud output using a Protobuf binary format for encoding payloads.
pbcloud
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs.
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs.
Package insights contains the logic for the k6 cloud insights output.
Package insights contains the logic for the k6 cloud insights output.
Package cloud implements an Output that flushes to the k6 Cloud platform using the version1 of the protocol flushing a json-based payload.
Package cloud implements an Output that flushes to the k6 Cloud platform using the version1 of the protocol flushing a json-based payload.

Jump to

Keyboard shortcuts

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