Merge pull request #11291 from xianzhe-databricks:fix-uds-auth

PiperOrigin-RevId: 712981221
This commit is contained in:
gVisor bot
2025-01-07 11:25:40 -08:00
12 changed files with 283 additions and 55 deletions
+9
View File
@@ -39,6 +39,15 @@ func CredentialsFromContext(ctx context.Context) *Credentials {
return NewAnonymousCredentials()
}
// CredentialsOrNilFromContext returns a copy of the Credentials used by ctx,
// or nil if ctx does not have Credentials.
func CredentialsOrNilFromContext(ctx context.Context) *Credentials {
if v := ctx.Value(CtxCredentials); v != nil {
return v.(*Credentials)
}
return nil
}
// ThreadGroupIDFromContext returns the current thread group ID when ctx
// represents a task context.
func ThreadGroupIDFromContext(ctx context.Context) (tgid int32, ok bool) {