middleware

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerKey = ctxKey("LoggerKey")
)

Variables

This section is empty.

Functions

func LoggerFrom

func LoggerFrom(ctx context.Context) kitlog.Logger

LoggerFrom retrieves the stashed logger from a request context, as put there by StashLogger middleware.

func Observe

func Observe() func(e goa.Endpoint) goa.Endpoint

Observe is the transport-independent observability middleware. As transport middlewares are run before application middlewares, we depend on the user having configured the transport-specific o11y middleware for this to work.

func ObserveHTTP

func ObserveHTTP(logger kitlog.Logger) func(h http.Handler) http.Handler

ObserveHTTP configures a standard HTTP o11y stack. The handler wrappers are run in reverse order that they are applied, which means we have to 'wrap' our custom behaviour before any of the vendor middleware that it depends on.

Types

This section is empty.

Jump to

Keyboard shortcuts

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