middleware

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextMiddleware

func ContextMiddleware(timeout time.Duration, logger logger.LoggerInterface) grpc.UnaryServerInterceptor

func GenerateRequestID

func GenerateRequestID() string

func Method

func Method(ctx context.Context) string

func Operation

func Operation(ctx context.Context) string

func PyroscopeUnaryInterceptor

func PyroscopeUnaryInterceptor() grpc.UnaryServerInterceptor

func RequestID

func RequestID(ctx context.Context) string

func StartTime

func StartTime(ctx context.Context) time.Time

func WithMethod

func WithMethod(ctx context.Context, method string) context.Context

func WithOperation

func WithOperation(ctx context.Context, operation string) context.Context

func WithRequestID

func WithRequestID(ctx context.Context, id string) context.Context

func WithStartTime

func WithStartTime(ctx context.Context, t time.Time) context.Context

Types

type ResilienceInterceptor

type ResilienceInterceptor struct {
	LoadMonitor    *resilience.LoadMonitor
	CircuitBreaker *resilience.CircuitBreaker
	RequestLimiter *resilience.RequestLimiter
}

func (*ResilienceInterceptor) UnaryInterceptor

func (im *ResilienceInterceptor) UnaryInterceptor() grpc.UnaryServerInterceptor

Jump to

Keyboard shortcuts

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