server_options

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultNoCacheConfig = noCacheConfig{
		Skipper: middleware.DefaultSkipper,
	}
)

Functions

func ExemptPathUnaryInterceptor

func ExemptPathUnaryInterceptor(exemptPaths []string, interceptor grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

func GetGrpcServerOpts

func GetGrpcServerOpts(enableTracing bool) []grpc.ServerOption

func InterceptorLogger

func InterceptorLogger(l mclog.MCLogger) logging.Logger

InterceptorLogger logs the traceID and spanID along with whatever message is passed

func SetAuthInterceptor

func SetAuthInterceptor(e *echo.Echo, config auth_echo.AuthInterceptorConfig)

func SetCors

func SetCors(e *echo.Echo, cors string)

func SetHttpReqHeader

func SetHttpReqHeader(e *echo.Echo, header map[string]string)

func SetLimits

func SetLimits(e *echo.Echo)

SetLimits sets the max size of a request body and the max size of header bytes.

func SetMethodOverride

func SetMethodOverride(e *echo.Echo)

SetMethodOverride set config that prevents method override in HTTP header.

func SetNoCache

func SetNoCache(e *echo.Echo)

func SetOptions

func SetOptions(e *echo.Echo, cors string)

SetOptions sets all options to echo.Echo defined in this file.

func SetProjectIdInterceptor

func SetProjectIdInterceptor(e *echo.Echo)

func SetRateLimiter

func SetRateLimiter(e *echo.Echo)

SetRateLimiter sets the rate limiter to the server.

func SetRequestValidator

func SetRequestValidator(e *echo.Echo, openapi *openapi3.T)

func SetSecureConfig

func SetSecureConfig(e *echo.Echo)

SetSecureConfig defines some of the secure config related to HTTP headers. Definitions are set based on: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html

func SetTimeout

func SetTimeout(e *echo.Echo)

SetTimeout sets the timeout of a request.

func SetTraceLogger

func SetTraceLogger(e *echo.Echo)

SetTraceLogger logs trace and span IDs along with Method and URI. This is useful to know the traceID that we would like to check on the Grafana Tempo UI

func SetTracing

func SetTracing(e *echo.Echo, serviceName string)

SetTracing enables tracing and also starts the trace logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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