observability

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMetricMiddlewareOpt

type MockMetricMiddlewareOpt struct {
	mock.Mock
}

MockMetricMiddlewareOpt is an autogenerated mock type for the MetricMiddlewareOpt type

func NewMockMetricMiddlewareOpt

func NewMockMetricMiddlewareOpt(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMetricMiddlewareOpt

NewMockMetricMiddlewareOpt creates a new instance of MockMetricMiddlewareOpt. 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 (*MockMetricMiddlewareOpt) EXPECT

func (*MockMetricMiddlewareOpt) Execute

Execute provides a mock function with given fields: _a0

type MockMetricMiddlewareOpt_Execute_Call

type MockMetricMiddlewareOpt_Execute_Call struct {
	*mock.Call
}

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

func (*MockMetricMiddlewareOpt_Execute_Call) Return

func (*MockMetricMiddlewareOpt_Execute_Call) Run

func (*MockMetricMiddlewareOpt_Execute_Call) RunAndReturn

type MockMetricMiddlewareOpt_Expecter

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

func (*MockMetricMiddlewareOpt_Expecter) Execute

Execute is a helper method to define mock.On call

  • _a0 *observability.MetricMiddlewareOpts

type MockObservability

type MockObservability struct {
	mock.Mock
}

MockObservability is an autogenerated mock type for the Observability type

func NewMockObservability

func NewMockObservability(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockObservability

NewMockObservability creates a new instance of MockObservability. 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 (*MockObservability) AreMetricsEnabled

func (_m *MockObservability) AreMetricsEnabled() bool

AreMetricsEnabled provides a mock function with no fields

func (*MockObservability) EXPECT

func (*MockObservability) IsProfilingEnabled

func (_m *MockObservability) IsProfilingEnabled() bool

IsProfilingEnabled provides a mock function with no fields

func (*MockObservability) IsTracingEnabled

func (_m *MockObservability) IsTracingEnabled() bool

IsTracingEnabled provides a mock function with no fields

func (*MockObservability) Log

func (_m *MockObservability) Log() *otelzap.Logger

Log provides a mock function with no fields

func (*MockObservability) LogSpan

func (_m *MockObservability) LogSpan(ctx context.Context, spanName string, fields ...zapcore.Field) (context.Context, func(), otelzap.LoggerWithCtx)

LogSpan provides a mock function with given fields: ctx, spanName, fields

func (*MockObservability) LogSpanWithTimeout

func (_m *MockObservability) LogSpanWithTimeout(ctx context.Context, spanName string, timeout time.Duration, fields ...zapcore.Field) (context.Context, func(), otelzap.LoggerWithCtx)

LogSpanWithTimeout provides a mock function with given fields: ctx, spanName, timeout, fields

func (*MockObservability) Meter

func (_m *MockObservability) Meter(name string, opts ...metric.MeterOption) metric.Meter

Meter provides a mock function with given fields: name, opts

func (*MockObservability) Metrics

func (_m *MockObservability) Metrics() *observability.Metrics

Metrics provides a mock function with no fields

func (*MockObservability) SetupGinMiddleware

func (_m *MockObservability) SetupGinMiddleware(router *gin.Engine, opts ...observability.MetricMiddlewareOpt)

SetupGinMiddleware provides a mock function with given fields: router, opts

func (*MockObservability) Shutdown

func (_m *MockObservability) Shutdown(ctx context.Context) error

Shutdown provides a mock function with given fields: ctx

func (*MockObservability) Span

func (_m *MockObservability) Span(ctx context.Context, spanName string, fields ...zapcore.Field) (context.Context, func())

Span provides a mock function with given fields: ctx, spanName, fields

func (*MockObservability) WithSpanKind

func (_m *MockObservability) WithSpanKind(spanKind trace.SpanKind) *observability.Impl

WithSpanKind provides a mock function with given fields: spanKind

type MockObservability_AreMetricsEnabled_Call

type MockObservability_AreMetricsEnabled_Call struct {
	*mock.Call
}

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

func (*MockObservability_AreMetricsEnabled_Call) Return

func (*MockObservability_AreMetricsEnabled_Call) Run

func (*MockObservability_AreMetricsEnabled_Call) RunAndReturn

type MockObservability_Expecter

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

func (*MockObservability_Expecter) AreMetricsEnabled

AreMetricsEnabled is a helper method to define mock.On call

func (*MockObservability_Expecter) IsProfilingEnabled

IsProfilingEnabled is a helper method to define mock.On call

func (*MockObservability_Expecter) IsTracingEnabled

IsTracingEnabled is a helper method to define mock.On call

func (*MockObservability_Expecter) Log

Log is a helper method to define mock.On call

func (*MockObservability_Expecter) LogSpan

func (_e *MockObservability_Expecter) LogSpan(ctx interface{}, spanName interface{}, fields ...interface{}) *MockObservability_LogSpan_Call

LogSpan is a helper method to define mock.On call

  • ctx context.Context
  • spanName string
  • fields ...zapcore.Field

func (*MockObservability_Expecter) LogSpanWithTimeout

func (_e *MockObservability_Expecter) LogSpanWithTimeout(ctx interface{}, spanName interface{}, timeout interface{}, fields ...interface{}) *MockObservability_LogSpanWithTimeout_Call

LogSpanWithTimeout is a helper method to define mock.On call

  • ctx context.Context
  • spanName string
  • timeout time.Duration
  • fields ...zapcore.Field

func (*MockObservability_Expecter) Meter

func (_e *MockObservability_Expecter) Meter(name interface{}, opts ...interface{}) *MockObservability_Meter_Call

Meter is a helper method to define mock.On call

  • name string
  • opts ...metric.MeterOption

func (*MockObservability_Expecter) Metrics

Metrics is a helper method to define mock.On call

func (*MockObservability_Expecter) SetupGinMiddleware

func (_e *MockObservability_Expecter) SetupGinMiddleware(router interface{}, opts ...interface{}) *MockObservability_SetupGinMiddleware_Call

SetupGinMiddleware is a helper method to define mock.On call

  • router *gin.Engine
  • opts ...observability.MetricMiddlewareOpt

func (*MockObservability_Expecter) Shutdown

func (_e *MockObservability_Expecter) Shutdown(ctx interface{}) *MockObservability_Shutdown_Call

Shutdown is a helper method to define mock.On call

  • ctx context.Context

func (*MockObservability_Expecter) Span

func (_e *MockObservability_Expecter) Span(ctx interface{}, spanName interface{}, fields ...interface{}) *MockObservability_Span_Call

Span is a helper method to define mock.On call

  • ctx context.Context
  • spanName string
  • fields ...zapcore.Field

func (*MockObservability_Expecter) WithSpanKind

func (_e *MockObservability_Expecter) WithSpanKind(spanKind interface{}) *MockObservability_WithSpanKind_Call

WithSpanKind is a helper method to define mock.On call

  • spanKind trace.SpanKind

type MockObservability_IsProfilingEnabled_Call

type MockObservability_IsProfilingEnabled_Call struct {
	*mock.Call
}

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

func (*MockObservability_IsProfilingEnabled_Call) Return

func (*MockObservability_IsProfilingEnabled_Call) Run

func (*MockObservability_IsProfilingEnabled_Call) RunAndReturn

type MockObservability_IsTracingEnabled_Call

type MockObservability_IsTracingEnabled_Call struct {
	*mock.Call
}

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

func (*MockObservability_IsTracingEnabled_Call) Return

func (*MockObservability_IsTracingEnabled_Call) Run

func (*MockObservability_IsTracingEnabled_Call) RunAndReturn

type MockObservability_LogSpanWithTimeout_Call

type MockObservability_LogSpanWithTimeout_Call struct {
	*mock.Call
}

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

func (*MockObservability_LogSpanWithTimeout_Call) Return

func (*MockObservability_LogSpanWithTimeout_Call) Run

func (*MockObservability_LogSpanWithTimeout_Call) RunAndReturn

type MockObservability_LogSpan_Call

type MockObservability_LogSpan_Call struct {
	*mock.Call
}

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

func (*MockObservability_LogSpan_Call) Return

func (*MockObservability_LogSpan_Call) Run

func (*MockObservability_LogSpan_Call) RunAndReturn

type MockObservability_Log_Call

type MockObservability_Log_Call struct {
	*mock.Call
}

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

func (*MockObservability_Log_Call) Return

func (*MockObservability_Log_Call) Run

func (*MockObservability_Log_Call) RunAndReturn

type MockObservability_Meter_Call

type MockObservability_Meter_Call struct {
	*mock.Call
}

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

func (*MockObservability_Meter_Call) Return

func (*MockObservability_Meter_Call) Run

func (*MockObservability_Meter_Call) RunAndReturn

type MockObservability_Metrics_Call

type MockObservability_Metrics_Call struct {
	*mock.Call
}

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

func (*MockObservability_Metrics_Call) Return

func (*MockObservability_Metrics_Call) Run

func (*MockObservability_Metrics_Call) RunAndReturn

type MockObservability_SetupGinMiddleware_Call

type MockObservability_SetupGinMiddleware_Call struct {
	*mock.Call
}

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

func (*MockObservability_SetupGinMiddleware_Call) Return

func (*MockObservability_SetupGinMiddleware_Call) Run

func (*MockObservability_SetupGinMiddleware_Call) RunAndReturn

type MockObservability_Shutdown_Call

type MockObservability_Shutdown_Call struct {
	*mock.Call
}

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

func (*MockObservability_Shutdown_Call) Return

func (*MockObservability_Shutdown_Call) Run

func (*MockObservability_Shutdown_Call) RunAndReturn

type MockObservability_Span_Call

type MockObservability_Span_Call struct {
	*mock.Call
}

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

func (*MockObservability_Span_Call) Return

func (*MockObservability_Span_Call) Run

func (_c *MockObservability_Span_Call) Run(run func(ctx context.Context, spanName string, fields ...zapcore.Field)) *MockObservability_Span_Call

func (*MockObservability_Span_Call) RunAndReturn

type MockObservability_WithSpanKind_Call

type MockObservability_WithSpanKind_Call struct {
	*mock.Call
}

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

func (*MockObservability_WithSpanKind_Call) Return

func (*MockObservability_WithSpanKind_Call) Run

func (*MockObservability_WithSpanKind_Call) RunAndReturn

type MockObservability_meterProvider_Call

type MockObservability_meterProvider_Call struct {
	*mock.Call
}

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

func (*MockObservability_meterProvider_Call) Return

func (*MockObservability_meterProvider_Call) Run

func (*MockObservability_meterProvider_Call) RunAndReturn

Jump to

Keyboard shortcuts

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