Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: impl/cloud/context.go

Issue 2217063003: Update cloud package. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | impl/cloud/datastore.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package cloud 5 package cloud
6 6
7 import ( 7 import (
8 » "google.golang.org/cloud/datastore" 8 » "cloud.google.com/go/datastore"
9 9
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
11 ) 11 )
12 12
13 // Use installs the cloud services implementation into the supplied Context. 13 // Use installs the cloud services implementation into the supplied Context.
14 // 14 //
15 // This includes: 15 // This includes:
16 // - github.com/luci/gae/service/info 16 // - github.com/luci/gae/service/info
17 // - github.com/luci/gae/service/datastore 17 // - github.com/luci/gae/service/datastore
18 // 18 //
19 // This is built around the ability to use cloud datastore. 19 // This is built around the ability to use cloud datastore.
20 func Use(c context.Context, client *datastore.Client) context.Context { 20 func Use(c context.Context, client *datastore.Client) context.Context {
21 return UseDS(useInfo(c), client) 21 return UseDS(useInfo(c), client)
22 } 22 }
23 23
24 // UseDS installs the cloud datastore implementation into the supplied Context. 24 // UseDS installs the cloud datastore implementation into the supplied Context.
25 func UseDS(c context.Context, client *datastore.Client) context.Context { 25 func UseDS(c context.Context, client *datastore.Client) context.Context {
26 cds := cloudDatastore{ 26 cds := cloudDatastore{
27 client: client, 27 client: client,
28 } 28 }
29 return cds.use(c) 29 return cds.use(c)
30 } 30 }
OLDNEW
« no previous file with comments | « no previous file | impl/cloud/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698