monitoringtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package monitoringtest wraps test components for the monitoring package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMonitor

func NewMonitor(t TestingT, opts ...monitorStubOpt) monitoring.Monitor

func WithLogger

func WithLogger(l logger.Logger) monitorStubOpt

func WithTracer

func WithTracer(tr tracer.Tracer) monitorStubOpt

Types

type MockMonitor

type MockMonitor struct {
	mock.Mock
}

MockMonitor is an autogenerated mock type for the Monitor type

func NewMockMonitor

func NewMockMonitor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMonitor

NewMockMonitor creates a new instance of MockMonitor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMonitor) EXPECT

func (_m *MockMonitor) EXPECT() *MockMonitor_Expecter

func (*MockMonitor) Logger

func (_mock *MockMonitor) Logger() logger.Logger

Logger provides a mock function for the type MockMonitor

func (*MockMonitor) Tracer

func (_mock *MockMonitor) Tracer() tracer.Tracer

Tracer provides a mock function for the type MockMonitor

type MockMonitor_Expecter

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

func (*MockMonitor_Expecter) Logger

Logger is a helper method to define mock.On call

func (*MockMonitor_Expecter) Tracer

Tracer is a helper method to define mock.On call

type MockMonitor_Logger_Call

type MockMonitor_Logger_Call struct {
	*mock.Call
}

MockMonitor_Logger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logger'

func (*MockMonitor_Logger_Call) Return

func (*MockMonitor_Logger_Call) Run

func (_c *MockMonitor_Logger_Call) Run(run func()) *MockMonitor_Logger_Call

func (*MockMonitor_Logger_Call) RunAndReturn

func (_c *MockMonitor_Logger_Call) RunAndReturn(run func() logger.Logger) *MockMonitor_Logger_Call

type MockMonitor_Tracer_Call

type MockMonitor_Tracer_Call struct {
	*mock.Call
}

MockMonitor_Tracer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tracer'

func (*MockMonitor_Tracer_Call) Return

func (*MockMonitor_Tracer_Call) Run

func (_c *MockMonitor_Tracer_Call) Run(run func()) *MockMonitor_Tracer_Call

func (*MockMonitor_Tracer_Call) RunAndReturn

func (_c *MockMonitor_Tracer_Call) RunAndReturn(run func() tracer.Tracer) *MockMonitor_Tracer_Call

type TestingT

type TestingT interface {
	mock.TestingT
	Cleanup(func())
}

TestingT is satisfied by both *testing.T and *testing.B so benchmarks can reuse the stub monitor.

Jump to

Keyboard shortcuts

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