grpcmw

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGRPCNotEnabled = errors.New("grpc middleware requires build tag 'grpc'")

ErrGRPCNotEnabled indicates that the gRPC middleware was built without gRPC support.

Functions

func UnaryServerInterceptor

func UnaryServerInterceptor(opts ...Option) func(ctx context.Context, req any, info any, handler any) (any, error)

UnaryServerInterceptor returns a stub interceptor when the gRPC build tag is not provided.

Types

type Option

type Option func(*options)

Option defines a configuration option for the gRPC middleware.

func WithRequestKey

func WithRequestKey(string) Option

WithRequestKey is a no-op placeholder without gRPC support.

func WithTraceKey

func WithTraceKey(string) Option

WithTraceKey is a no-op placeholder without gRPC support.

Jump to

Keyboard shortcuts

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