Documentation ¶
Index ¶
- Variables
- func BackendCheck(log *zerolog.Logger, b backend.Backend) grpc.UnaryServerInterceptor
- func GetRequestID(ctx context.Context) string
- func InternalError() error
- func Observer(log *zerolog.Logger, mrec metric.Recorder) grpc.UnaryServerInterceptor
- func Recover(log *zerolog.Logger) grpc.UnaryServerInterceptor
- func SetRequestID() grpc.UnaryServerInterceptor
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 ¶
GetRequestID returns request ID from context.
func InternalError ¶
func InternalError() error
InternalError returns status.Error with codes.Internal code.
func Recover ¶
func Recover(log *zerolog.Logger) grpc.UnaryServerInterceptor
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.
Click to show internal directories.
Click to hide internal directories.