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

Unified Diff: service/memcache/raw_interface.go

Issue 1270063003: Make the rest of the services have a similar raw/user interface structure. (Closed) Base URL: https://github.com/luci/gae.git@add_datastore
Patch Set: address comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/memcache/memcache.go ('k') | service/memcache/types.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/memcache/raw_interface.go
diff --git a/service/memcache/raw_interface.go b/service/memcache/raw_interface.go
new file mode 100644
index 0000000000000000000000000000000000000000..041b40753d1f66b20a377e3fd161345b290a0ede
--- /dev/null
+++ b/service/memcache/raw_interface.go
@@ -0,0 +1,29 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package memcache
+
+// RawCB is a simple error callback for most of the methods in RawInterface.
+type RawCB func(error)
+
+// RawItemCB is the callback for RawInterface.GetMulti. It takes the retrieved
+// item and the error for that item (e.g. ErrCacheMiss) if there was one..
+type RawItemCB func(Item, error)
+
+// RawInterface is the full interface to the memcache service.
+type RawInterface interface {
+ NewItem(key string) Item
+
+ AddMulti(items []Item, cb RawCB) error
+ SetMulti(items []Item, cb RawCB) error
+ GetMulti(keys []string, cb RawItemCB) error
+ DeleteMulti(keys []string, cb RawCB) error
+ CompareAndSwapMulti(items []Item, cb RawCB) error
+
+ Increment(key string, delta int64, initialValue *uint64) (newValue uint64, err error)
+
+ Flush() error
+
+ Stats() (*Statistics, error)
+}
« no previous file with comments | « service/memcache/memcache.go ('k') | service/memcache/types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698