grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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