OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package memcache |
| 6 |
| 7 // Interface is the full interface to the memcache service. |
| 8 type Interface interface { |
| 9 NewItem(key string) Item |
| 10 |
| 11 Add(item Item) error |
| 12 Set(item Item) error |
| 13 Get(key string) (Item, error) |
| 14 Delete(key string) error |
| 15 CompareAndSwap(item Item) error |
| 16 |
| 17 AddMulti(items []Item) error |
| 18 SetMulti(items []Item) error |
| 19 GetMulti(keys []string) (map[string]Item, error) |
| 20 DeleteMulti(keys []string) error |
| 21 CompareAndSwapMulti(items []Item) error |
| 22 |
| 23 Increment(key string, delta int64, initialValue uint64) (newValue uint64
, err error) |
| 24 IncrementExisting(key string, delta int64) (newValue uint64, err error) |
| 25 |
| 26 Flush() error |
| 27 |
| 28 Stats() (*Statistics, error) |
| 29 } |
OLD | NEW |