internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferInterceptor

func BufferInterceptor(handler http.Handler) http.Handler

BufferInterceptor returns a http interceptor that inserts log buffer into context.Context for sampling.Handler.

func IsSamplingHandler

func IsSamplingHandler(handler slog.Handler) bool

func RecoveryInterceptor

func RecoveryInterceptor(handler http.Handler, logHandler slog.Handler) http.Handler

RecoveryInterceptor returns a server interceptor that recovers from HTTP handler panic. It overrides default recovery in http to provide better log integration.

func RegisterUnixProtocol

func RegisterUnixProtocol(transport *http.Transport)

RegisterUnixProtocol registers a protocol handler to the provided http.Transport that can server requests to Unix domain sockets via the "unix" schemes.

Request URLs should have the following form:

unix:socket_file/request/path?query=val&...

The registered transport is based on a clone of the provided transport, and uses the same configuration: timeouts, TLS settings, and so on. Connection pooling should also work as expected.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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