interceptor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGenerateRequestIDFailed = errors.New("unable to generate a random UUID for chart ID")

ErrGenerateRequestIDFailed contains error message about failed request ID generation.

Functions

func BackendCheck

BackendCheck checks if backend is healthy and returns codes.Unavailable status.Status if it's not.

func GetRequestID

func GetRequestID(ctx context.Context) string

GetRequestID returns request ID from context.

func InternalError

func InternalError() error

InternalError returns status.Error with codes.Internal code.

func Observer

Observer handles observability (metrics and logging) for every request.

func Recover

Recover represents interceptro to catch panics.

func SetRequestID

func SetRequestID() grpc.UnaryServerInterceptor

SetRequestID generates and sets request ID into context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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