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

Struct callCreds

credentials/sts/sts.go:139–148  ·  view source on GitHub ↗

callCreds provides the implementation of call credentials based on an STS token exchange.

Source from the content-addressed store, hash-verified

137// callCreds provides the implementation of call credentials based on an STS
138// token exchange.
139type callCreds struct {
140 opts Options
141 client httpDoer
142
143 // Cached accessToken to avoid an STS token exchange for every call to
144 // GetRequestMetadata.
145 mu sync.Mutex
146 tokenMetadata map[string]string
147 tokenExpiry time.Time
148}
149
150// GetRequestMetadata returns the cached accessToken, if available and valid, or
151// fetches a new one by performing an STS token exchange.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected