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)) |
+} |