contextx

package
v0.0.0-...-4fb02c9 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contextx

type Contextx struct {
	context.Context
	*zap.Logger
}

Contextx extends google's context to support logging methods.

func Background

func Background() Contextx

Background returns a non-nil, empty Contextx. It is never canceled, has no values, and has no deadline. Deprecated: Use WithContext instead.

func StartSpan

func StartSpan(c context.Context, spanName string, opts ...trace.SpanStartOption) (Contextx, trace.Span)

StartSpan starts a new span with the given name and options.

func WithContext

func WithContext(c context.Context) Contextx

WithContext returns a copy of parent in which the context is set to ctx.

Jump to

Keyboard shortcuts

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