Update ingress godeps
This commit is contained in:
parent
d43021b3f1
commit
28db8fb16d
1068 changed files with 461467 additions and 117300 deletions
25
vendor/k8s.io/kubernetes/pkg/api/context.go
generated
vendored
25
vendor/k8s.io/kubernetes/pkg/api/context.go
generated
vendored
|
|
@ -22,6 +22,7 @@ import (
|
|||
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/kubernetes/pkg/auth/user"
|
||||
"k8s.io/kubernetes/pkg/types"
|
||||
)
|
||||
|
||||
// Context carries values across API boundaries.
|
||||
|
|
@ -49,11 +50,16 @@ type Context interface {
|
|||
// The key type is unexported to prevent collisions
|
||||
type key int
|
||||
|
||||
// namespaceKey is the context key for the request namespace.
|
||||
const namespaceKey key = 0
|
||||
const (
|
||||
// namespaceKey is the context key for the request namespace.
|
||||
namespaceKey key = iota
|
||||
|
||||
// userKey is the context key for the request user.
|
||||
const userKey key = 1
|
||||
// userKey is the context key for the request user.
|
||||
userKey
|
||||
|
||||
// uidKey is the context key for the uid to assign to an object on create.
|
||||
uidKey
|
||||
)
|
||||
|
||||
// NewContext instantiates a base context object for request flows.
|
||||
func NewContext() Context {
|
||||
|
|
@ -119,3 +125,14 @@ func UserFrom(ctx Context) (user.Info, bool) {
|
|||
user, ok := ctx.Value(userKey).(user.Info)
|
||||
return user, ok
|
||||
}
|
||||
|
||||
// WithUID returns a copy of parent in which the uid value is set
|
||||
func WithUID(parent Context, uid types.UID) Context {
|
||||
return WithValue(parent, uidKey, uid)
|
||||
}
|
||||
|
||||
// UIDFrom returns the value of the uid key on the ctx
|
||||
func UIDFrom(ctx Context) (types.UID, bool) {
|
||||
uid, ok := ctx.Value(uidKey).(types.UID)
|
||||
return uid, ok
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue