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

Unified Diff: impl/cloud/context.go

Issue 1957953002: Add cloud datastore implementation. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Adjust minimum coverage. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | impl/cloud/datastore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/cloud/context.go
diff --git a/impl/cloud/context.go b/impl/cloud/context.go
new file mode 100644
index 0000000000000000000000000000000000000000..527f8e3d149fabf23a4616b61726e3381266288f
--- /dev/null
+++ b/impl/cloud/context.go
@@ -0,0 +1,26 @@
+// Copyright 2016 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package cloud
+
+import (
+ "google.golang.org/cloud/datastore"
+
+ "golang.org/x/net/context"
+)
+
+// Use installs the cloud services implementation into the supplied Context.
+//
+// This includes:
+// - github.com/luci/gae/service/info
+// - github.com/luci/gae/service/datastore
+//
+// This is built around the ability to use cloud datastore.
+func Use(c context.Context, client *datastore.Client) context.Context {
+ cds := cloudDatastore{
+ client: client,
+ }
+
+ return cds.use(useInfo(c))
+}
« 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