CryBase::CouchBase::Services::KV::Request
One outbound packet for the KV service, as a pure value type.
RequestBuffer.make serializes it; RequestWriter#write sends it.
req = KV::Request.new(KV::Opcode::Get, key: "hello")
req.opcode # => KV::Opcode::Get
req.key # => "hello"
req.opaque # => 0_u32
req.to_buffer # => Bytes
The fields:
- opcode — the command code (
Opcode::Get,::Set, etc.) - key — the document/operation key, as UTF-8 text or already encoded binary key bytes
- extras — opcode-specific bytes that precede the body
- value — the document/operation body
- cas — compare-and-swap token, or
0for "any" - opaque — caller-controlled echo field; the server returns it verbatim in the response
- vbucket — key partition id used by document operations
Constructors
Instance methods
cas
clone
Sourcecopy_with(opcode _opcode = @opcode, key _key = @key, extras _extras = @extras, value _value = @value, cas _cas = @cas, opaque _opaque = @opaque, vbucket _vbucket = @vbucket)
Sourceextras
key
opaque
opcode
value
vbucket