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 // RawCB is a simple error callback for most of the methods in RawInterface. |
| 8 type RawCB func(error) |
| 9 |
| 10 // RawItemCB is the callback for RawInterface.GetMulti. It takes the retrieved |
| 11 // item and the error for that item (e.g. ErrCacheMiss) if there was one.. |
| 12 type RawItemCB func(Item, error) |
| 13 |
| 14 // RawInterface is the full interface to the memcache service. |
| 15 type RawInterface interface { |
| 16 NewItem(key string) Item |
| 17 |
| 18 AddMulti(items []Item, cb RawCB) error |
| 19 SetMulti(items []Item, cb RawCB) error |
| 20 GetMulti(keys []string, cb RawItemCB) error |
| 21 DeleteMulti(keys []string, cb RawCB) error |
| 22 CompareAndSwapMulti(items []Item, cb RawCB) error |
| 23 |
| 24 Increment(key string, delta int64, initialValue *uint64) (newValue uint6
4, err error) |
| 25 |
| 26 Flush() error |
| 27 |
| 28 Stats() (*Statistics, error) |
| 29 } |
OLD | NEW |