nulls

package
v0.0.0-...-b49207b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

nulls package provides no-op implementations for various interfaces for testing purposes. All methods of Null structs return either default values or safe, noop substitutes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullLogger

type NullLogger struct{}

func (NullLogger) Log

func (NullLogger) Log(context.Context, string, ...any)

func (NullLogger) Sync

func (NullLogger) Sync() error

type NullSpan

type NullSpan struct {
	embedded.Span
}

func (NullSpan) AddEvent

func (NullSpan) AddEvent(name string, options ...trace.EventOption)
func (NullSpan) AddLink(link trace.Link)

func (NullSpan) End

func (NullSpan) End(options ...trace.SpanEndOption)

func (NullSpan) IsRecording

func (NullSpan) IsRecording() bool

func (NullSpan) RecordError

func (NullSpan) RecordError(err error, options ...trace.EventOption)

func (NullSpan) SetAttributes

func (NullSpan) SetAttributes(kv ...attribute.KeyValue)

func (NullSpan) SetName

func (NullSpan) SetName(name string)

func (NullSpan) SetStatus

func (NullSpan) SetStatus(code codes.Code, description string)

func (NullSpan) SpanContext

func (NullSpan) SpanContext() trace.SpanContext

func (NullSpan) TracerProvider

func (NullSpan) TracerProvider() trace.TracerProvider

type NullTracer

type NullTracer struct {
	embedded.Tracer
}

func (NullTracer) Start

func (NullTracer) Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Jump to

Keyboard shortcuts

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