Documentation ¶
Overview ¶
Package protobuf is a generated protocol buffer package.
It is generated from these files:
mutation.proto
It has these top-level messages:
Payload VbConnectionMap VbKeyVersions KeyVersions
Index ¶
- Variables
- type Command
- type KeyVersions
- func (m *KeyVersions) GetCommands() []uint32
- func (m *KeyVersions) GetDocid() []byte
- func (m *KeyVersions) GetKeys() [][]byte
- func (m *KeyVersions) GetOldkeys() [][]byte
- func (m *KeyVersions) GetPartnkeys() [][]byte
- func (m *KeyVersions) GetSeqno() uint64
- func (m *KeyVersions) GetUuids() []uint64
- func (*KeyVersions) ProtoMessage()
- func (m *KeyVersions) Reset()
- func (kv *KeyVersions) Snapshot() (typ uint32, start, end uint64)
- func (m *KeyVersions) String() string
- type Payload
- type VbConnectionMap
- type VbKeyVersions
Constants ¶
This section is empty.
Variables ¶
var Command_name = map[int32]string{
1: "Upsert",
2: "Deletion",
3: "UpsertDeletion",
4: "Sync",
5: "DropData",
6: "StreamBegin",
7: "StreamEnd",
}
var Command_value = map[string]int32{
"Upsert": 1,
"Deletion": 2,
"UpsertDeletion": 3,
"Sync": 4,
"DropData": 5,
"StreamBegin": 6,
"StreamEnd": 7,
}
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command int32
List of possible mutation commands.
func (*Command) UnmarshalJSON ¶
type KeyVersions ¶
type KeyVersions struct { Seqno *uint64 `protobuf:"varint,1,req,name=seqno" json:"seqno,omitempty"` Docid []byte `protobuf:"bytes,2,opt,name=docid" json:"docid,omitempty"` Uuids []uint64 `protobuf:"varint,3,rep,name=uuids" json:"uuids,omitempty"` Commands []uint32 `protobuf:"varint,4,rep,name=commands" json:"commands,omitempty"` Keys [][]byte `protobuf:"bytes,5,rep,name=keys" json:"keys,omitempty"` Oldkeys [][]byte `protobuf:"bytes,6,rep,name=oldkeys" json:"oldkeys,omitempty"` Partnkeys [][]byte `protobuf:"bytes,7,rep,name=partnkeys" json:"partnkeys,omitempty"` XXX_unrecognized []byte `json:"-"` }
mutations are broadly divided into data and control messages. The division is based on the commands.
Interpreting seq.no:
- For Upsert, Deletion, UpsertDeletion messages, sequence number corresponds to kv mutation.
- For Sync message, it is the latest kv mutation sequence-no. received for a vbucket.
- For DropData message, it is the first kv mutation that was dropped due to buffer overflow.
- For StreamBegin, it is zero.
- For StreamEnd, it is the last kv mutation received before ending a vbucket stream with kv.
Interpreting Snapshot marker:
Key versions can contain snapshot-marker {start-seqno, end-seqno}, instead of using separate field for them, following fields are mis-interpreted, uuid - type (8 byte) key - start-seqno (8 byte) oldkey - end-seqno (8 byte)
fields `docid`, `uuids`, `keys`, `oldkeys` are valid only for Upsert, Deletion, UpsertDeletion messages.
func (*KeyVersions) GetCommands ¶
func (m *KeyVersions) GetCommands() []uint32
func (*KeyVersions) GetDocid ¶
func (m *KeyVersions) GetDocid() []byte
func (*KeyVersions) GetKeys ¶
func (m *KeyVersions) GetKeys() [][]byte
func (*KeyVersions) GetOldkeys ¶
func (m *KeyVersions) GetOldkeys() [][]byte
func (*KeyVersions) GetPartnkeys ¶
func (m *KeyVersions) GetPartnkeys() [][]byte
func (*KeyVersions) GetSeqno ¶
func (m *KeyVersions) GetSeqno() uint64
func (*KeyVersions) GetUuids ¶
func (m *KeyVersions) GetUuids() []uint64
func (*KeyVersions) ProtoMessage ¶
func (*KeyVersions) ProtoMessage()
func (*KeyVersions) Reset ¶
func (m *KeyVersions) Reset()
func (*KeyVersions) Snapshot ¶
func (kv *KeyVersions) Snapshot() (typ uint32, start, end uint64)
func (*KeyVersions) String ¶
func (m *KeyVersions) String() string
type Payload ¶
type Payload struct { Version *uint32 `protobuf:"varint,1,req,name=version" json:"version,omitempty"` // -- Following fields are mutually exclusive -- Vbkeys []*VbKeyVersions `protobuf:"bytes,2,rep,name=vbkeys" json:"vbkeys,omitempty"` Vbmap *VbConnectionMap `protobuf:"bytes,3,opt,name=vbmap" json:"vbmap,omitempty"` XXX_unrecognized []byte `json:"-"` }
A single mutation message that will framed and transported by router. For efficiency mutations from mutiple vbuckets (bounded to same connection) can be packed into the same message.
func (*Payload) GetVbkeys ¶
func (m *Payload) GetVbkeys() []*VbKeyVersions
func (*Payload) GetVbmap ¶
func (m *Payload) GetVbmap() *VbConnectionMap
func (*Payload) GetVersion ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
type VbConnectionMap ¶
type VbConnectionMap struct { Bucket *string `protobuf:"bytes,1,req,name=bucket" json:"bucket,omitempty"` Vbuckets []uint32 `protobuf:"varint,3,rep,name=vbuckets" json:"vbuckets,omitempty"` Vbuuids []uint64 `protobuf:"varint,4,rep,name=vbuuids" json:"vbuuids,omitempty"` XXX_unrecognized []byte `json:"-"` }
List of vbuckets that will be streamed via a newly opened connection.
func (*VbConnectionMap) GetBucket ¶
func (m *VbConnectionMap) GetBucket() string
func (*VbConnectionMap) GetVbuckets ¶
func (m *VbConnectionMap) GetVbuckets() []uint32
func (*VbConnectionMap) GetVbuuids ¶
func (m *VbConnectionMap) GetVbuuids() []uint64
func (*VbConnectionMap) ProtoMessage ¶
func (*VbConnectionMap) ProtoMessage()
func (*VbConnectionMap) Reset ¶
func (m *VbConnectionMap) Reset()
func (*VbConnectionMap) String ¶
func (m *VbConnectionMap) String() string
type VbKeyVersions ¶
type VbKeyVersions struct { Vbucket *uint32 `protobuf:"varint,2,req,name=vbucket" json:"vbucket,omitempty"` Vbuuid *uint64 `protobuf:"varint,3,req,name=vbuuid" json:"vbuuid,omitempty"` Bucketname *string `protobuf:"bytes,4,req,name=bucketname" json:"bucketname,omitempty"` Kvs []*KeyVersions `protobuf:"bytes,5,rep,name=kvs" json:"kvs,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*VbKeyVersions) GetBucketname ¶
func (m *VbKeyVersions) GetBucketname() string
func (*VbKeyVersions) GetKvs ¶
func (m *VbKeyVersions) GetKvs() []*KeyVersions
func (*VbKeyVersions) GetVbucket ¶
func (m *VbKeyVersions) GetVbucket() uint32
func (*VbKeyVersions) GetVbuuid ¶
func (m *VbKeyVersions) GetVbuuid() uint64
func (*VbKeyVersions) ProtoMessage ¶
func (*VbKeyVersions) ProtoMessage()
func (*VbKeyVersions) Reset ¶
func (m *VbKeyVersions) Reset()
func (*VbKeyVersions) String ¶
func (m *VbKeyVersions) String() string