grpc

package
v0.0.0-...-91eccfc Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCodeToLevel

func DefaultCodeToLevel(code codes.Code) string

DefaultCodeToLevel is the default implementation of gRPC return codes and interceptor log level for server side.

func UnaryServerInterceptor

func UnaryServerInterceptor(logger hatchet.Logger, opts ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors that logs via a hatchet.Logger.

Types

type CodeToLevel

type CodeToLevel func(code codes.Code) string

CodeToLevel function defines the mapping between gRPC return codes and interceptor log level.

type Option

type Option func(*options)

func WithLevels

func WithLevels(f CodeToLevel) Option

WithLevels customizes the function for mapping gRPC return codes and interceptor log level statements.

Jump to

Keyboard shortcuts

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