testemit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmittedData

type EmittedData struct {
	DataSet       protocol.PluginDataSetV3
	Metadata      integration.Definition
	ExtraLabels   data.Map
	EntityRewrite []data.EntityRewrite
}

EmittedData stores both PluginDataSetV3 metric and the plugin metadata

type RecordEmitter

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

RecordEmitter implements a test emitter that stores the submitted data as Plugins structs

func (*RecordEmitter) Emit

func (t *RecordEmitter) Emit(metadata integration.Definition, extraLabels data.Map, entityRewrite []data.EntityRewrite, json []byte) error

func (*RecordEmitter) ExpectTimeout

func (t *RecordEmitter) ExpectTimeout(pluginName string, timeout time.Duration) error

ExpectTimeout returns error if no timeout happens when listening for the plugin emissions. It embeds the emitted metric information in the error, if it has received it

func (*RecordEmitter) ReceiveFrom

func (t *RecordEmitter) ReceiveFrom(pluginName string) (EmittedData, error)

Jump to

Keyboard shortcuts

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