rpc

package
v0.29.16-skip-indicies... Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMultiError added in v0.29.12

func ConvertMultiError(err *multierror.Error, msg string, defaultCode codes.Code) error

ConvertMultiError converts a multierror to a grpc status error. If the errors have related status codes, the common code is returned, otherwise defaultCode is used.

func ConvertStorageError added in v0.29.0

func ConvertStorageError(err error) error

ConvertStorageError converts a generic error into a grpc status error, converting storage errors into codes.NotFound

func LoggingInterceptor added in v0.29.0

func LoggingInterceptor(log zerolog.Logger) []grpc.UnaryServerInterceptor

LoggingInterceptor creates the logging interceptors to log incoming GRPC request and response (minus the payload body)

func NewRateLimiterInterceptor

func NewRateLimiterInterceptor(log zerolog.Logger, apiRateLimits map[string]int, apiBurstLimits map[string]int) *rateLimiterInterceptor

NewRateLimiterInterceptor creates a new rate limiter interceptor with the defined per second rate limits and the optional burst limit for each API.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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