MCPcopy
hub / github.com/grpc/grpc-go / GetRequestMetadata

Method GetRequestMetadata

credentials/credentials.go:48–48  ·  view source on GitHub ↗

GetRequestMetadata gets the current request metadata, refreshing tokens if required. This should be called by the transport layer on each request, and the data should be populated in headers or other context. If a status code is returned, it will be used as the status for the RPC (restricted to an a

(ctx context.Context, uri ...string)

Source from the content-addressed store, hash-verified

46 // cancellation. Additionally, RequestInfo data will be available via ctx
47 // to this call.
48 GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
49 // RequireTransportSecurity indicates whether the credentials requires
50 // transport security.
51 RequireTransportSecurity() bool

Implementers 13

TokenSourcecredentials/oauth/oauth.go
jwtAccesscredentials/oauth/oauth.go
oauthAccesscredentials/oauth/oauth.go
serviceAccountcredentials/oauth/oauth.go
callCredscredentials/sts/sts.go
testPerRPCCredscredentials/google/google_test.go
dualPerRPCCredscredentials/google/google.go
jwtTokenFileCallCredscredentials/jwt/token_file_call_creds.
testPerRPCCredentialsbalancer/rls/control_channel_test.go
failPreRPCCredbalancer/grpclb/grpclb_test.go
methodTestCredstest/creds_test.go
testPerRPCCredentialstest/creds_test.go

Calls

no outgoing calls