expv2

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: 27 Imported by: 0

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

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.

Directories

Path Synopsis
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs.
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs.

Jump to

Keyboard shortcuts

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