Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamClientInterceptor ¶
func StreamClientInterceptor() grpc.StreamClientInterceptor
StreamClientInterceptor propagates x-diverge-env metadata from the incoming context to outgoing gRPC streams.
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor extracts x-diverge-env from incoming gRPC metadata and stores it in the context.
func UnaryClientInterceptor ¶
func UnaryClientInterceptor() grpc.UnaryClientInterceptor
UnaryClientInterceptor propagates x-diverge-env metadata from the incoming context to outgoing gRPC calls.
Example Client:
grpc.Dial(addr,
grpc.WithUnaryInterceptor(divergegrpc.UnaryClientInterceptor()),
grpc.WithStreamInterceptor(divergegrpc.StreamClientInterceptor()),
)
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor extracts x-diverge-env from incoming gRPC metadata and stores it in the context for downstream propagation.
Example Server:
grpc.NewServer(
grpc.UnaryInterceptor(divergegrpc.UnaryServerInterceptor()),
grpc.StreamInterceptor(divergegrpc.StreamServerInterceptor()),
)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.