hckit

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MPL-2.0 Imports: 11 Imported by: 0

README

go-hckit

Standard library of reusable abstractions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGlobalTracer

func InitGlobalTracer(service string) (io.Closer, error)

InitGlobalTracer initializes the Jaeger tracer and sets it as the global tracer.

func InjectHeaders

func InjectHeaders(req *http.Request)

InjectHeaders injects tracing headers for distributed tracing.

func TracingMiddleware

func TracingMiddleware(next http.Handler) http.Handler

TracingMiddleware adds tracing to HTTP requests.

Types

type TracingRoundTripper

type TracingRoundTripper struct {
	Proxied http.RoundTripper
}

TracingRoundTripper is an HTTP RoundTripper that adds tracing to outgoing requests.

func (TracingRoundTripper) RoundTrip

func (trt TracingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip wraps the Proxied RoundTripper to inject tracing headers.

Jump to

Keyboard shortcuts

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