expv2

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: AGPL-3.0 Imports: 27 Imported by: 1

Documentation

Overview

Package expv2 contains a Cloud output using a Protobuf binary format for encoding payloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output struct {
	output.SampleBuffer
	// contains filtered or unexported fields
}

Output sends result data to the k6 Cloud service.

func New

func New(logger logrus.FieldLogger, conf cloudapi.Config, _ *cloudapi.Client) (*Output, error)

New creates a new cloud output.

func (*Output) AddMetricSamples

func (o *Output) AddMetricSamples(s []metrics.SampleContainer)

AddMetricSamples receives the samples streaming.

func (*Output) SetTestRunID added in v0.46.0

func (o *Output) SetTestRunID(id string)

SetTestRunID sets the Cloud's test run id.

func (*Output) SetTestRunStopCallback

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

SetTestRunStopCallback receives the function that that stops the engine when it is called. It should be called on critical errors.

func (*Output) Start

func (o *Output) Start() error

Start starts the goroutine that would listen for metric samples and send them to the cloud.

func (*Output) StopWithTestError

func (o *Output) StopWithTestError(_ error) error

StopWithTestError gracefully stops all metric emission from the output.

Jump to

Keyboard shortcuts

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