expv2

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: AGPL-3.0 Imports: 22 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, cloudClient *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) SetReferenceID

func (o *Output) SetReferenceID(refID string)

SetReferenceID 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(testErr 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