summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/couchbase/gomemcached/mc_constants.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/couchbase/gomemcached/mc_constants.go')
-rw-r--r--vendor/github.com/couchbase/gomemcached/mc_constants.go62
1 files changed, 36 insertions, 26 deletions
diff --git a/vendor/github.com/couchbase/gomemcached/mc_constants.go b/vendor/github.com/couchbase/gomemcached/mc_constants.go
index 1d5027d16c..32f4f51852 100644
--- a/vendor/github.com/couchbase/gomemcached/mc_constants.go
+++ b/vendor/github.com/couchbase/gomemcached/mc_constants.go
@@ -93,9 +93,12 @@ const (
OBSERVE_SEQNO = CommandCode(0x91) // Sequence Number based Observe
OBSERVE = CommandCode(0x92)
- GET_META = CommandCode(0xA0) // Get meta. returns with expiry, flags, cas etc
- SUBDOC_GET = CommandCode(0xc5) // Get subdoc. Returns with xattrs
- SUBDOC_MULTI_LOOKUP = CommandCode(0xd0) // Multi lookup. Doc xattrs and meta.
+ GET_META = CommandCode(0xA0) // Get meta. returns with expiry, flags, cas etc
+ GET_COLLECTIONS_MANIFEST = CommandCode(0xba) // Get entire collections manifest.
+ COLLECTIONS_GET_CID = CommandCode(0xbb) // Get collection id.
+ SUBDOC_GET = CommandCode(0xc5) // Get subdoc. Returns with xattrs
+ SUBDOC_MULTI_LOOKUP = CommandCode(0xd0) // Multi lookup. Doc xattrs and meta.
+
)
// command codes that are counted toward DCP control buffer
@@ -113,29 +116,33 @@ type Status uint16
// Matches with protocol_binary.h as source of truth
const (
- SUCCESS = Status(0x00)
- KEY_ENOENT = Status(0x01)
- KEY_EEXISTS = Status(0x02)
- E2BIG = Status(0x03)
- EINVAL = Status(0x04)
- NOT_STORED = Status(0x05)
- DELTA_BADVAL = Status(0x06)
- NOT_MY_VBUCKET = Status(0x07)
- NO_BUCKET = Status(0x08)
- LOCKED = Status(0x09)
- AUTH_STALE = Status(0x1f)
- AUTH_ERROR = Status(0x20)
- AUTH_CONTINUE = Status(0x21)
- ERANGE = Status(0x22)
- ROLLBACK = Status(0x23)
- EACCESS = Status(0x24)
- NOT_INITIALIZED = Status(0x25)
- UNKNOWN_COMMAND = Status(0x81)
- ENOMEM = Status(0x82)
- NOT_SUPPORTED = Status(0x83)
- EINTERNAL = Status(0x84)
- EBUSY = Status(0x85)
- TMPFAIL = Status(0x86)
+ SUCCESS = Status(0x00)
+ KEY_ENOENT = Status(0x01)
+ KEY_EEXISTS = Status(0x02)
+ E2BIG = Status(0x03)
+ EINVAL = Status(0x04)
+ NOT_STORED = Status(0x05)
+ DELTA_BADVAL = Status(0x06)
+ NOT_MY_VBUCKET = Status(0x07)
+ NO_BUCKET = Status(0x08)
+ LOCKED = Status(0x09)
+ AUTH_STALE = Status(0x1f)
+ AUTH_ERROR = Status(0x20)
+ AUTH_CONTINUE = Status(0x21)
+ ERANGE = Status(0x22)
+ ROLLBACK = Status(0x23)
+ EACCESS = Status(0x24)
+ NOT_INITIALIZED = Status(0x25)
+ UNKNOWN_COMMAND = Status(0x81)
+ ENOMEM = Status(0x82)
+ NOT_SUPPORTED = Status(0x83)
+ EINTERNAL = Status(0x84)
+ EBUSY = Status(0x85)
+ TMPFAIL = Status(0x86)
+ UNKNOWN_COLLECTION = Status(0x88)
+
+ SYNC_WRITE_IN_PROGRESS = Status(0xa2)
+ SYNC_WRITE_AMBIGUOUS = Status(0xa3)
// SUBDOC
SUBDOC_PATH_NOT_FOUND = Status(0xc0)
@@ -261,6 +268,8 @@ func init() {
CommandNames[UPR_CONTROL] = "UPR_CONTROL"
CommandNames[SUBDOC_GET] = "SUBDOC_GET"
CommandNames[SUBDOC_MULTI_LOOKUP] = "SUBDOC_MULTI_LOOKUP"
+ CommandNames[GET_COLLECTIONS_MANIFEST] = "GET_COLLECTIONS_MANIFEST"
+ CommandNames[COLLECTIONS_GET_CID] = "COLLECTIONS_GET_CID"
StatusNames = make(map[Status]string)
StatusNames[SUCCESS] = "SUCCESS"
@@ -285,6 +294,7 @@ func init() {
StatusNames[EINTERNAL] = "EINTERNAL"
StatusNames[EBUSY] = "EBUSY"
StatusNames[TMPFAIL] = "TMPFAIL"
+ StatusNames[UNKNOWN_COLLECTION] = "UNKNOWN_COLLECTION"
StatusNames[SUBDOC_PATH_NOT_FOUND] = "SUBDOC_PATH_NOT_FOUND"
StatusNames[SUBDOC_BAD_MULTI] = "SUBDOC_BAD_MULTI"