mock

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventGeneratorMock

func NewEventGeneratorMock() transaction.EventGenerator

NewEventGeneratorMock - Create a new mock event generator

func SetMockCollector

func SetMockCollector(c *CollectorMock)

Types

type CollectorMock

type CollectorMock struct {
	sync.WaitGroup
	Details  []metric.Detail
	Expected int
}

func GetMockCollector

func GetMockCollector() *CollectorMock

func (*CollectorMock) AddMetricDetail

func (c *CollectorMock) AddMetricDetail(metricDetail metric.Detail)

type EventGeneratorMock

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

EventGeneratorMock - mock event generator

func (*EventGeneratorMock) CreateEvent

func (c *EventGeneratorMock) CreateEvent(logEvent transaction.LogEvent, eventTime time.Time, metaData, eventFields common.MapStr, privateData interface{}) (event beat.Event, err error)

CreateEvent - Creates a new mocked event for tests

func (*EventGeneratorMock) CreateEvents

func (c *EventGeneratorMock) CreateEvents(summaryEvent transaction.LogEvent, detailEvents []transaction.LogEvent, eventTime time.Time, metaData, eventFields common.MapStr, privateData interface{}) ([]beat.Event, error)

CreateEvents - Creates a new mocked event for tests

func (*EventGeneratorMock) SetUseTrafficForAggregation

func (c *EventGeneratorMock) SetUseTrafficForAggregation(useTrafficForAggregation bool)

SetUseTrafficForAggregation - set the flag to use traffic events for aggregation.

Jump to

Keyboard shortcuts

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