Adding dep files and dependencies.
This commit is contained in:
parent
45f9efa578
commit
b341c0a0e4
539 changed files with 313111 additions and 0 deletions
18
vendor/github.com/mesos/mesos-go/api/v0/messenger/sessionid/sessionid.go
generated
vendored
Normal file
18
vendor/github.com/mesos/mesos-go/api/v0/messenger/sessionid/sessionid.go
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
package sessionid
|
||||
|
||||
import (
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
type key int
|
||||
|
||||
const sessionIDKey = 0
|
||||
|
||||
func NewContext(ctx context.Context, sessionID string) context.Context {
|
||||
return context.WithValue(ctx, sessionIDKey, sessionID)
|
||||
}
|
||||
|
||||
func FromContext(ctx context.Context) (string, bool) {
|
||||
sessionID, ok := ctx.Value(sessionIDKey).(string)
|
||||
return sessionID, ok
|
||||
}
|
Reference in a new issue