eventtest

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	Events   []event.DimensionsInserted
	Error    error
	ChHandle chan *event.DimensionsInserted
}

EventHandler provides a mock implementation that captures events to check.

func NewEventHandler

func NewEventHandler(err error) *EventHandler

NewEventHandler returns a new mock event handler to capture event, with an optional error to return on Handle

func (*EventHandler) Handle

func (handler *EventHandler) Handle(ctx context.Context, event *event.DimensionsInserted) error

Handle captures the given event and stores it for later assertions

type ObservationWriter

type ObservationWriter struct {
	Reader observation.Reader
}

ObservationWriter when used will capture the reader passed to it for assertions. Will return the configured error.

func (*ObservationWriter) WriteAll

func (observationWriter *ObservationWriter) WriteAll(ctx context.Context, reader observation.Reader, instanceID string)

WriteAll will capture the reader passed to it for assertions.

Jump to

Keyboard shortcuts

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