middleware

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestErrorText = "request error"
View Source
var RequestOkText = "request success"
View Source
var ServerErrorText = "server error"

Functions

func WithGrpcErrorLogging

func WithGrpcErrorLogging(log logr.Logger) runtime.ServeMuxOption

WithGrpcErrorLogging logs errors returned from server RPC handlers. Our errors happen in gRPC land, so we cannot introspect into the content of the error message in the WithLogging http.Handler. Normal gRPC middleware was not working for this: https://github.com/grpc-ecosystem/grpc-gateway/issues/1043

func WithLogging

func WithLogging(log logr.Logger, mux *runtime.ServeMux) http.Handler

WithLogging adds basic logging for HTTP requests. Note that this accepts a grpc-gateway ServeMux instead of an http.Handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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