Developing lightweight computation at the DSG edge

Commit 776530da authored by Mathias Weber's avatar Mathias Weber
Browse files

update to new CRDT types

parent b9d1b368
{
"spellright.language": "en",
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext"
]
}
\ No newline at end of file
# Antidote Go Client Library
## How to install
Get the library using Go:
```
go get github.com/AntidoteDB/antidote-go-client
```
Then import the library in your code:
```
import (
antidote "github.com/AntidoteDB/antidote-go-client"
)
```
## How to use
To connect to a running Antidote instance, you have to create a client using ``client, err := antidote.NewClient(...)```.
The function takes one or more host definitions consisting of a host name and the protocol buffer port.
To connect to an Antidote instance running on the same machine with default port, you pass `Host{"127.0.0.1", 8087}` to the `NewClient` function.
Do not forget to defer the close method `defer client.Close()`.
The client manages a connection pool and picks a random connection to a random host whenever a connection is required.
Operations are executed on the data store using a `Bucket` object.
```
bucket := antidote.Bucket{[]byte("test")}
```
The bucket name is given as byte-slice.
A bucket object includes functions for reading and updating persistent objects in the data store.
These functions take as parameter a transaction, which can either be an `InteractiveTransaction` or a `StaticTransaction`.
Interactive transactions all to combine multiple read- and update-operations into an atomic transaction.
Updates issued in the context of an interactive transaction are visible to read operations issued in the same context after the updates.
Interactive transactions have to be committed in order to make the updates visible to subsequent transactions.
```
tx, err := client.StartTransaction()
if err != nil {
... // handle error
}
... //use transaction
err = tx.Commit()
```
Static transactions can be seen as one-shot transactions for executing a set of updates or a read operation.
Static transactions do not have to be committed or closed and are mainly handled by the Antidote server.
```
tx := client.CreateStaticTransaction()
```
The `Bucket.Update(...)` function takes, in addition to a transaction, a list of CRDT updates.
These update objects are created using the following functions:
- SetAdd(key Key, elems ...[]byte)
- SetRemove(key Key, elems ...[]byte)
- CounterInc(key Key, inc int64)
- RegPut(key Key, value []byte)
- MVRegPut(key Key, value []byte)
- MapUpdate(key Key, updates ...*CRDTUpdate)
The first 5 updates are straight forward updates of sets, counters, registers and multi-value registers.
The map update is more complex in that it takes update of the keys inside the map as parameter.
To update the key `key1` in map `map1` referring to a counter, the following update is created:
```
antidote.MapUpdate([]byte("map1"),
antidote.CounterInc([]byte("key1"), 1)
)
```
These updates are executed in the context of a transaction using the `Update` function of the `Bucket`.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: antidote.proto
/*
Package antidoteclient is a generated protocol buffer package.
It is generated from these files:
antidote.proto
It has these top-level messages:
ApbErrorResp
ApbCounterUpdate
ApbGetCounterResp
ApbSetUpdate
ApbGetSetResp
ApbRegUpdate
ApbGetRegResp
ApbGetMVRegResp
ApbPolicyUpdate
ApbGetPolicyResp
ApbIntegerUpdate
ApbGetIntegerResp
ApbMapKey
ApbMapUpdate
ApbMapNestedUpdate
ApbGetMapResp
ApbMapEntry
ApbCrdtReset
ApbOperationResp
ApbTxnProperties
ApbBoundObject
ApbReadObjects
ApbUpdateOp
ApbUpdateOperation
ApbUpdateObjects
ApbStartTransaction
ApbAbortTransaction
ApbCommitTransaction
ApbStaticUpdateObjects
ApbStaticReadObjects
ApbStartTransactionResp
ApbReadObjectResp
ApbReadObjectsResp
ApbCommitResp
ApbStaticReadObjectsResp
*/
package antidoteclient
import proto "github.com/golang/protobuf/proto"
......@@ -68,13 +25,12 @@ const (
CRDTType_ORSET CRDTType = 4
CRDTType_LWWREG CRDTType = 5
CRDTType_MVREG CRDTType = 6
CRDTType_INTEGER CRDTType = 7
CRDTType_GMAP CRDTType = 8
CRDTType_AWMAP CRDTType = 9
CRDTType_RWSET CRDTType = 10
CRDTType_RRMAP CRDTType = 11
CRDTType_FATCOUNTER CRDTType = 12
CRDTType_POLICY CRDTType = 13
CRDTType_FLAG_EW CRDTType = 13
CRDTType_FLAG_DW CRDTType = 14
)
var CRDTType_name = map[int32]string{
......@@ -82,26 +38,24 @@ var CRDTType_name = map[int32]string{
4: "ORSET",
5: "LWWREG",
6: "MVREG",
7: "INTEGER",
8: "GMAP",
9: "AWMAP",
10: "RWSET",
11: "RRMAP",
12: "FATCOUNTER",
13: "POLICY",
13: "FLAG_EW",
14: "FLAG_DW",
}
var CRDTType_value = map[string]int32{
"COUNTER": 3,
"ORSET": 4,
"LWWREG": 5,
"MVREG": 6,
"INTEGER": 7,
"GMAP": 8,
"AWMAP": 9,
"RWSET": 10,
"RRMAP": 11,
"FATCOUNTER": 12,
"POLICY": 13,
"FLAG_EW": 13,
"FLAG_DW": 14,
}
func (x CRDTType) Enum() *CRDTType {
......@@ -120,7 +74,9 @@ func (x *CRDTType) UnmarshalJSON(data []byte) error {
*x = CRDTType(value)
return nil
}
func (CRDTType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (CRDTType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{0}
}
type ApbSetUpdate_SetOpType int32
......@@ -154,46 +110,42 @@ func (x *ApbSetUpdate_SetOpType) UnmarshalJSON(data []byte) error {
*x = ApbSetUpdate_SetOpType(value)
return nil
}
func (ApbSetUpdate_SetOpType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
// ------------------
// Error messages
type ApbErrorResp struct {
Errmsg []byte `protobuf:"bytes,1,req,name=errmsg" json:"errmsg,omitempty"`
Errcode *uint32 `protobuf:"varint,2,req,name=errcode" json:"errcode,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ApbErrorResp) Reset() { *m = ApbErrorResp{} }
func (m *ApbErrorResp) String() string { return proto.CompactTextString(m) }
func (*ApbErrorResp) ProtoMessage() {}
func (*ApbErrorResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *ApbErrorResp) GetErrmsg() []byte {
if m != nil {
return m.Errmsg
}
return nil
}
func (m *ApbErrorResp) GetErrcode() uint32 {
if m != nil && m.Errcode != nil {
return *m.Errcode
}
return 0
func (ApbSetUpdate_SetOpType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{2, 0}
}
// Counter increment requenst
type ApbCounterUpdate struct {
// inc indicates the value to be incremented. To decrement, use a negative value. If no value is given, it will be considered as an increment by 1
Inc *int64 `protobuf:"zigzag64,1,opt,name=inc" json:"inc,omitempty"`
XXX_unrecognized []byte `json:"-"`
Inc *int64 `protobuf:"zigzag64,1,opt,name=inc" json:"inc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbCounterUpdate) Reset() { *m = ApbCounterUpdate{} }
func (m *ApbCounterUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbCounterUpdate) ProtoMessage() {}
func (*ApbCounterUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{0}
}
func (m *ApbCounterUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbCounterUpdate.Unmarshal(m, b)
}
func (m *ApbCounterUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbCounterUpdate.Marshal(b, m, deterministic)
}
func (dst *ApbCounterUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbCounterUpdate.Merge(dst, src)
}
func (m *ApbCounterUpdate) XXX_Size() int {
return xxx_messageInfo_ApbCounterUpdate.Size(m)
}
func (m *ApbCounterUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_ApbCounterUpdate.DiscardUnknown(m)
}
func (m *ApbCounterUpdate) Reset() { *m = ApbCounterUpdate{} }
func (m *ApbCounterUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbCounterUpdate) ProtoMessage() {}
func (*ApbCounterUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
var xxx_messageInfo_ApbCounterUpdate proto.InternalMessageInfo
func (m *ApbCounterUpdate) GetInc() int64 {
if m != nil && m.Inc != nil {
......@@ -204,14 +156,35 @@ func (m *ApbCounterUpdate) GetInc() int64 {
// Response operation
type ApbGetCounterResp struct {
Value *int32 `protobuf:"zigzag32,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
Value *int32 `protobuf:"zigzag32,1,req,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbGetCounterResp) Reset() { *m = ApbGetCounterResp{} }
func (m *ApbGetCounterResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetCounterResp) ProtoMessage() {}
func (*ApbGetCounterResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *ApbGetCounterResp) Reset() { *m = ApbGetCounterResp{} }
func (m *ApbGetCounterResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetCounterResp) ProtoMessage() {}
func (*ApbGetCounterResp) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{1}
}
func (m *ApbGetCounterResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbGetCounterResp.Unmarshal(m, b)
}
func (m *ApbGetCounterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbGetCounterResp.Marshal(b, m, deterministic)
}
func (dst *ApbGetCounterResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbGetCounterResp.Merge(dst, src)
}
func (m *ApbGetCounterResp) XXX_Size() int {
return xxx_messageInfo_ApbGetCounterResp.Size(m)
}
func (m *ApbGetCounterResp) XXX_DiscardUnknown() {
xxx_messageInfo_ApbGetCounterResp.DiscardUnknown(m)
}
var xxx_messageInfo_ApbGetCounterResp proto.InternalMessageInfo
func (m *ApbGetCounterResp) GetValue() int32 {
if m != nil && m.Value != nil {
......@@ -222,16 +195,37 @@ func (m *ApbGetCounterResp) GetValue() int32 {
// Set updates request
type ApbSetUpdate struct {
Optype *ApbSetUpdate_SetOpType `protobuf:"varint,1,req,name=optype,enum=ApbSetUpdate_SetOpType" json:"optype,omitempty"`
Adds [][]byte `protobuf:"bytes,2,rep,name=adds" json:"adds,omitempty"`
Rems [][]byte `protobuf:"bytes,3,rep,name=rems" json:"rems,omitempty"`
XXX_unrecognized []byte `json:"-"`
Optype *ApbSetUpdate_SetOpType `protobuf:"varint,1,req,name=optype,enum=ApbSetUpdate_SetOpType" json:"optype,omitempty"`
Adds [][]byte `protobuf:"bytes,2,rep,name=adds" json:"adds,omitempty"`
Rems [][]byte `protobuf:"bytes,3,rep,name=rems" json:"rems,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbSetUpdate) Reset() { *m = ApbSetUpdate{} }
func (m *ApbSetUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbSetUpdate) ProtoMessage() {}
func (*ApbSetUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{2}
}
func (m *ApbSetUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbSetUpdate.Unmarshal(m, b)
}
func (m *ApbSetUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbSetUpdate.Marshal(b, m, deterministic)
}
func (dst *ApbSetUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbSetUpdate.Merge(dst, src)
}
func (m *ApbSetUpdate) XXX_Size() int {
return xxx_messageInfo_ApbSetUpdate.Size(m)
}
func (m *ApbSetUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_ApbSetUpdate.DiscardUnknown(m)
}
func (m *ApbSetUpdate) Reset() { *m = ApbSetUpdate{} }
func (m *ApbSetUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbSetUpdate) ProtoMessage() {}
func (*ApbSetUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
var xxx_messageInfo_ApbSetUpdate proto.InternalMessageInfo
func (m *ApbSetUpdate) GetOptype() ApbSetUpdate_SetOpType {
if m != nil && m.Optype != nil {
......@@ -256,14 +250,35 @@ func (m *ApbSetUpdate) GetRems() [][]byte {
// Get set request
type ApbGetSetResp struct {
Value [][]byte `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
Value [][]byte `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbGetSetResp) Reset() { *m = ApbGetSetResp{} }
func (m *ApbGetSetResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetSetResp) ProtoMessage() {}
func (*ApbGetSetResp) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{3}
}
func (m *ApbGetSetResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbGetSetResp.Unmarshal(m, b)
}
func (m *ApbGetSetResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbGetSetResp.Marshal(b, m, deterministic)
}
func (dst *ApbGetSetResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbGetSetResp.Merge(dst, src)
}
func (m *ApbGetSetResp) XXX_Size() int {
return xxx_messageInfo_ApbGetSetResp.Size(m)
}
func (m *ApbGetSetResp) XXX_DiscardUnknown() {
xxx_messageInfo_ApbGetSetResp.DiscardUnknown(m)
}
func (m *ApbGetSetResp) Reset() { *m = ApbGetSetResp{} }
func (m *ApbGetSetResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetSetResp) ProtoMessage() {}
func (*ApbGetSetResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
var xxx_messageInfo_ApbGetSetResp proto.InternalMessageInfo
func (m *ApbGetSetResp) GetValue() [][]byte {
if m != nil {
......@@ -274,14 +289,35 @@ func (m *ApbGetSetResp) GetValue() [][]byte {
// Register update
type ApbRegUpdate struct {
Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbRegUpdate) Reset() { *m = ApbRegUpdate{} }
func (m *ApbRegUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbRegUpdate) ProtoMessage() {}
func (*ApbRegUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{4}
}
func (m *ApbRegUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbRegUpdate.Unmarshal(m, b)
}
func (m *ApbRegUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbRegUpdate.Marshal(b, m, deterministic)
}
func (dst *ApbRegUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbRegUpdate.Merge(dst, src)
}
func (m *ApbRegUpdate) XXX_Size() int {
return xxx_messageInfo_ApbRegUpdate.Size(m)
}
func (m *ApbRegUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_ApbRegUpdate.DiscardUnknown(m)
}
func (m *ApbRegUpdate) Reset() { *m = ApbRegUpdate{} }
func (m *ApbRegUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbRegUpdate) ProtoMessage() {}
func (*ApbRegUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
var xxx_messageInfo_ApbRegUpdate proto.InternalMessageInfo
func (m *ApbRegUpdate) GetValue() []byte {
if m != nil {
......@@ -292,14 +328,35 @@ func (m *ApbRegUpdate) GetValue() []byte {
// Response operation
type ApbGetRegResp struct {
Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbGetRegResp) Reset() { *m = ApbGetRegResp{} }
func (m *ApbGetRegResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetRegResp) ProtoMessage() {}
func (*ApbGetRegResp) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{5}
}
func (m *ApbGetRegResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbGetRegResp.Unmarshal(m, b)
}
func (m *ApbGetRegResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbGetRegResp.Marshal(b, m, deterministic)
}
func (dst *ApbGetRegResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbGetRegResp.Merge(dst, src)
}
func (m *ApbGetRegResp) XXX_Size() int {
return xxx_messageInfo_ApbGetRegResp.Size(m)
}
func (m *ApbGetRegResp) XXX_DiscardUnknown() {
xxx_messageInfo_ApbGetRegResp.DiscardUnknown(m)
}
func (m *ApbGetRegResp) Reset() { *m = ApbGetRegResp{} }
func (m *ApbGetRegResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetRegResp) ProtoMessage() {}
func (*ApbGetRegResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
var xxx_messageInfo_ApbGetRegResp proto.InternalMessageInfo
func (m *ApbGetRegResp) GetValue() []byte {
if m != nil {
......@@ -310,111 +367,74 @@ func (m *ApbGetRegResp) GetValue() []byte {
// response:
type ApbGetMVRegResp struct {
Values [][]byte `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
XXX_unrecognized []byte `json:"-"`
Values [][]byte `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbGetMVRegResp) Reset() { *m = ApbGetMVRegResp{} }
func (m *ApbGetMVRegResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetMVRegResp) ProtoMessage() {}
func (*ApbGetMVRegResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *ApbGetMVRegResp) GetValues() [][]byte {
if m != nil {
return m.Values
}
return nil
func (m *ApbGetMVRegResp) Reset() { *m = ApbGetMVRegResp{} }
func (m *ApbGetMVRegResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetMVRegResp) ProtoMessage() {}
func (*ApbGetMVRegResp) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{6}
}
type ApbPolicyUpdate struct {
Permissions [][]byte `protobuf:"bytes,1,rep,name=permissions" json:"permissions,omitempty"`
XXX_unrecognized []byte `json:"-"`
func (m *ApbGetMVRegResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbGetMVRegResp.Unmarshal(m, b)
}
func (m *ApbPolicyUpdate) Reset() { *m = ApbPolicyUpdate{} }
func (m *ApbPolicyUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbPolicyUpdate) ProtoMessage() {}
func (*ApbPolicyUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *ApbPolicyUpdate) GetPermissions() [][]byte {
if m != nil {
return m.Permissions
}
return nil
func (m *ApbGetMVRegResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbGetMVRegResp.Marshal(b, m, deterministic)
}
type ApbGetPolicyResp struct {
Permissions [][]byte `protobuf:"bytes,1,rep,name=permissions" json:"permissions,omitempty"`
XXX_unrecognized []byte `json:"-"`
func (dst *ApbGetMVRegResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApbGetMVRegResp.Merge(dst, src)
}
func (m *ApbGetMVRegResp) XXX_Size() int {
return xxx_messageInfo_ApbGetMVRegResp.Size(m)
}
func (m *ApbGetMVRegResp) XXX_DiscardUnknown() {
xxx_messageInfo_ApbGetMVRegResp.DiscardUnknown(m)
}
func (m *ApbGetPolicyResp) Reset() { *m = ApbGetPolicyResp{} }
func (m *ApbGetPolicyResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetPolicyResp) ProtoMessage() {}
func (*ApbGetPolicyResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
var xxx_messageInfo_ApbGetMVRegResp proto.InternalMessageInfo
func (m *ApbGetPolicyResp) GetPermissions() [][]byte {
func (m *ApbGetMVRegResp) GetValues() [][]byte {
if m != nil {
return m.Permissions
return m.Values
}
return nil
}
type ApbIntegerUpdate struct {
// choose one of the following:
// increment the integer
Inc *int64 `protobuf:"zigzag64,1,opt,name=inc" json:"inc,omitempty"`
// set the integer to a number
Set *int64 `protobuf:"zigzag64,2,opt,name=set" json:"set,omitempty"`
XXX_unrecognized []byte `json:"-"`
type ApbMapKey struct {
Key []byte `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
Type *CRDTType `protobuf:"varint,2,req,name=type,enum=CRDTType" json:"type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ApbIntegerUpdate) Reset() { *m = ApbIntegerUpdate{} }
func (m *ApbIntegerUpdate) String() string { return proto.CompactTextString(m) }
func (*ApbIntegerUpdate) ProtoMessage() {}
func (*ApbIntegerUpdate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *ApbIntegerUpdate) GetInc() int64 {
if m != nil && m.Inc != nil {
return *m.Inc
}
return 0
func (m *ApbMapKey) Reset() { *m = ApbMapKey{} }
func (m *ApbMapKey) String() string { return proto.CompactTextString(m) }
func (*ApbMapKey) ProtoMessage() {}
func (*ApbMapKey) Descriptor() ([]byte, []int) {
return fileDescriptor_antidote_ec7f698c38dc7b97, []int{7}
}
func (m *ApbIntegerUpdate) GetSet() int64 {
if m != nil && m.Set != nil {
return *m.Set
}
return 0
func (m *ApbMapKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApbMapKey.Unmarshal(m, b)
}
type ApbGetIntegerResp struct {
Value *int64 `protobuf:"zigzag64,1,req,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
func (m *ApbMapKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApbMapKey.Marshal(b, m, deterministic)
}
func (m *ApbGetIntegerResp) Reset() { *m = ApbGetIntegerResp{} }
func (m *ApbGetIntegerResp) String() string { return proto.CompactTextString(m) }
func (*ApbGetIntegerResp) ProtoMessage() {}
func (*ApbGetIntegerResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *ApbGetIntegerResp) GetValue() int64 {
if m != nil && m.Value != nil {
return *m.Value
}
return 0
func (dst *ApbMapKey) XXX_Merge(src proto.Message) {