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

Unified Diff: service/memcache/interface.go

Issue 1243323002: Refactor a bit. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix golint Created 5 years, 5 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/errors.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/interface.go
diff --git a/service/memcache/interface.go b/service/memcache/interface.go
new file mode 100644
index 0000000000000000000000000000000000000000..346155b42e8b2c5fff93b8027a88f811573592cd
--- /dev/null
+++ b/service/memcache/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
+
+// Interface is the full interface to the memcache service.
+type Interface interface {
+ NewItem(key string) Item
+
+ Add(item Item) error
+ Set(item Item) error
+ Get(key string) (Item, error)
+ Delete(key string) error
+ CompareAndSwap(item Item) error
+
+ AddMulti(items []Item) error
+ SetMulti(items []Item) error
+ GetMulti(keys []string) (map[string]Item, error)
+ DeleteMulti(keys []string) error
+ CompareAndSwapMulti(items []Item) error
+
+ Increment(key string, delta int64, initialValue uint64) (newValue uint64, err error)
+ IncrementExisting(key string, delta int64) (newValue uint64, err error)
+
+ Flush() error
+
+ Stats() (*Statistics, error)
+}
« no previous file with comments | « service/memcache/errors.go ('k') | service/memcache/types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698