grpc

package
v0.1.156 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound checks if a gRPC error has code NotFound.

func IsUnauthorized

func IsUnauthorized(err error) bool

IsUnauthorized checks if a gRPC error has code Unauthenticated.

func MetadataFromRequest

func MetadataFromRequest(ctx context.Context, req *http.Request) metadata.MD

MetadataFromRequest extracts gRPC metadata from an HTTP request, mapping known HTTP headers to context keys.

Types

type GRPC

type GRPC struct {
	// contains filtered or unexported fields
}

GRPC provides gRPC metadata propagation for user identity.

func FromWool

func FromWool(w *wool.Wool) *GRPC

FromWool creates a GRPC helper from a Wool instance.

func (*GRPC) Inject

func (g *GRPC) Inject()

Inject reads gRPC incoming metadata and injects known keys into the Wool context.

func (*GRPC) Metadata

func (g *GRPC) Metadata() metadata.MD

Metadata returns the incoming gRPC metadata from the context.

func (*GRPC) OutgoingContext

func (g *GRPC) OutgoingContext() context.Context

OutgoingContext returns a context with outgoing gRPC metadata populated from the Wool context keys.

Jump to

Keyboard shortcuts

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