middleware

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrpcMethod                         = "grpc_method"
	ReturnCode                         = "return_code"
	GrpcRequestCounter                 = "grpc.server.request_counter"
	GrpcRequestCounterDescription      = "Grpc request counter"
	TotalGrpcRequestCounter            = "grpc.server.total_request_counter"
	TotalGrpcRequestCounterDescription = "Total grpc request counter"
	GrpcStatusCodeCounter              = "grpc.server.grpc_status_code"
	GrpcStatusCodeCounterDescription   = "Grpc status code counter"
)
View Source
const (
	HTTP1Host = "x-zitadel-http1-host"
)

Variables

This section is empty.

Functions

func AuthorizationInterceptor

func AuthorizationInterceptor(verifier *authz.TokenVerifier, authConfig authz.Config) grpc.UnaryServerInterceptor

func DefaultTracingServer

func DefaultTracingServer() grpc.UnaryServerInterceptor

func ErrorHandler

func ErrorHandler() grpc.UnaryServerInterceptor

func InstanceInterceptor

func InstanceInterceptor(verifier authz.InstanceVerifier, headerName string, ignoredServices ...string) grpc.UnaryServerInterceptor

func MetricsHandler

func MetricsHandler(metricTypes []metrics.MetricType, ignoredMethodSuffixes ...string) grpc.UnaryServerInterceptor

func NoCacheInterceptor

func NoCacheInterceptor() grpc.UnaryServerInterceptor

func RegisterGrpcRequestCodeCounter

func RegisterGrpcRequestCodeCounter(ctx context.Context, info *grpc.UnaryServerInfo, err error)

func RegisterGrpcRequestCounter

func RegisterGrpcRequestCounter(ctx context.Context, info *grpc.UnaryServerInfo)

func RegisterGrpcTotalRequestCounter

func RegisterGrpcTotalRequestCounter(ctx context.Context)

func RegisterMetrics

func RegisterMetrics(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, metricTypes []metrics.MetricType, ignoredMethodSuffixes ...string) (_ interface{}, err error)

func ServiceHandler

func ServiceHandler() grpc.UnaryServerInterceptor

func TracingServer

func TracingServer(ignoredMethods ...GRPCMethod) grpc.UnaryServerInterceptor

func TranslationHandler

func TranslationHandler() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func ValidationHandler

func ValidationHandler() grpc.UnaryServerInterceptor

Types

type GRPCMethod

type GRPCMethod string

type InstanceVerifier

type InstanceVerifier interface {
	GetInstance(ctx context.Context)
}

type Localizer

type Localizer interface {
	LocalizationKey() string
	SetLocalizedMessage(string)
}

Jump to

Keyboard shortcuts

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