Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from AntidoteDB/dc_management
Browse files Browse the repository at this point in the history
Dc management
  • Loading branch information
bieniusa authored Oct 9, 2018
2 parents a20119a + 32a16ab commit 8361d03
Show file tree
Hide file tree
Showing 6 changed files with 2,248 additions and 812 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: erlang
otp_release:
- 19.3
- 20.3
- 21.0
script:
- make test
- make dialyzer
sudo: required
dist: trusty
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ compile:
$(REBAR) compile

clean:
rm -rf ebin/* test/*.beam logs log
rm -rf ebin/* test/*.beam logs log _build/gpb
$(REBAR) clean

test:
Expand All @@ -25,7 +25,7 @@ shell:

_build/gpb:
mkdir -p _build/
(cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.1.8)
(cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.4.0)

_build/gpb/bin/protoc-erl: _build/gpb
(cd _build/gpb && make)
Expand Down
166 changes: 98 additions & 68 deletions include/antidote_pb.hrl
Original file line number Diff line number Diff line change
@@ -1,121 +1,121 @@
%% -*- coding: utf-8 -*-
%% Automatically generated, do not edit
%% Generated by gpb_compile version 4.1.8
%% Generated by gpb_compile version 4.4.0

-ifndef(antidote_pb).
-define(antidote_pb, true).

-define(antidote_pb_gpb_version, "4.1.8").
-define(antidote_pb_gpb_version, "4.4.0").

-ifndef('APBERRORRESP_PB_H').
-define('APBERRORRESP_PB_H', true).
-record('ApbErrorResp',
{errmsg, % = 1, bytes
errcode % = 2, uint32
{errmsg :: iodata(), % = 1
errcode :: non_neg_integer() % = 2, 32 bits
}).
-endif.

-ifndef('APBCOUNTERUPDATE_PB_H').
-define('APBCOUNTERUPDATE_PB_H', true).
-record('ApbCounterUpdate',
{inc % = 1, sint64 (optional)
{inc :: integer() | undefined % = 1, 32 bits
}).
-endif.

-ifndef('APBGETCOUNTERRESP_PB_H').
-define('APBGETCOUNTERRESP_PB_H', true).
-record('ApbGetCounterResp',
{value % = 1, sint32
{value :: integer() % = 1, 32 bits
}).
-endif.

-ifndef('APBSETUPDATE_PB_H').
-define('APBSETUPDATE_PB_H', true).
-record('ApbSetUpdate',
{optype, % = 1, {enum,'ApbSetUpdate.SetOpType'}
adds = [], % = 2, [bytes]
rems = [] % = 3, [bytes]
{optype :: 'ADD' | 'REMOVE' | integer(), % = 1, enum ApbSetUpdate.SetOpType
adds = [] :: [iodata()] | undefined, % = 2
rems = [] :: [iodata()] | undefined % = 3
}).
-endif.

-ifndef('APBGETSETRESP_PB_H').
-define('APBGETSETRESP_PB_H', true).
-record('ApbGetSetResp',
{value = [] % = 1, [bytes]
{value = [] :: [iodata()] | undefined % = 1
}).
-endif.

-ifndef('APBREGUPDATE_PB_H').
-define('APBREGUPDATE_PB_H', true).
-record('ApbRegUpdate',
{value % = 1, bytes
{value :: iodata() % = 1
}).
-endif.

-ifndef('APBGETREGRESP_PB_H').
-define('APBGETREGRESP_PB_H', true).
-record('ApbGetRegResp',
{value % = 1, bytes
{value :: iodata() % = 1
}).
-endif.

-ifndef('APBGETMVREGRESP_PB_H').
-define('APBGETMVREGRESP_PB_H', true).
-record('ApbGetMVRegResp',
{values = [] % = 1, [bytes]
{values = [] :: [iodata()] | undefined % = 1
}).
-endif.

-ifndef('APBMAPKEY_PB_H').
-define('APBMAPKEY_PB_H', true).
-record('ApbMapKey',
{key, % = 1, bytes
type % = 2, {enum,'CRDT_type'}
{key :: iodata(), % = 1
type :: 'COUNTER' | 'ORSET' | 'LWWREG' | 'MVREG' | 'GMAP' | 'RWSET' | 'RRMAP' | 'FATCOUNTER' | 'FLAG_EW' | 'FLAG_DW' | integer() % = 2, enum CRDT_type
}).
-endif.

-ifndef('APBMAPUPDATE_PB_H').
-define('APBMAPUPDATE_PB_H', true).
-record('ApbMapUpdate',
{updates = [], % = 1, [{msg,'ApbMapNestedUpdate'}]
removedKeys = [] % = 2, [{msg,'ApbMapKey'}]
{updates = [] :: [antidote_pb:'ApbMapNestedUpdate'()] | undefined, % = 1
removedKeys = [] :: [antidote_pb:'ApbMapKey'()] | undefined % = 2
}).
-endif.

-ifndef('APBMAPNESTEDUPDATE_PB_H').
-define('APBMAPNESTEDUPDATE_PB_H', true).
-record('ApbMapNestedUpdate',
{key, % = 1, {msg,'ApbMapKey'}
update % = 2, {msg,'ApbUpdateOperation'}
{key :: antidote_pb:'ApbMapKey'(), % = 1
update :: antidote_pb:'ApbUpdateOperation'() % = 2
}).
-endif.

-ifndef('APBGETMAPRESP_PB_H').
-define('APBGETMAPRESP_PB_H', true).
-record('ApbGetMapResp',
{entries = [] % = 1, [{msg,'ApbMapEntry'}]
{entries = [] :: [antidote_pb:'ApbMapEntry'()] | undefined % = 1
}).
-endif.

-ifndef('APBMAPENTRY_PB_H').
-define('APBMAPENTRY_PB_H', true).
-record('ApbMapEntry',
{key, % = 1, {msg,'ApbMapKey'}
value % = 2, {msg,'ApbReadObjectResp'}
{key :: antidote_pb:'ApbMapKey'(), % = 1
value :: antidote_pb:'ApbReadObjectResp'() % = 2
}).
-endif.

-ifndef('APBFLAGUPDATE_PB_H').
-define('APBFLAGUPDATE_PB_H', true).
-record('ApbFlagUpdate',
{value % = 1, bool
{value :: boolean() | 0 | 1 % = 1
}).
-endif.

-ifndef('APBGETFLAGRESP_PB_H').
-define('APBGETFLAGRESP_PB_H', true).
-record('ApbGetFlagResp',
{value % = 1, bool
{value :: boolean() | 0 | 1 % = 1
}).
-endif.

Expand All @@ -129,146 +129,176 @@
-ifndef('APBOPERATIONRESP_PB_H').
-define('APBOPERATIONRESP_PB_H', true).
-record('ApbOperationResp',
{success, % = 1, bool
errorcode % = 2, uint32 (optional)
{success :: boolean() | 0 | 1, % = 1
errorcode :: non_neg_integer() | undefined % = 2, 32 bits
}).
-endif.

-ifndef('APBTXNPROPERTIES_PB_H').
-define('APBTXNPROPERTIES_PB_H', true).
-record('ApbTxnProperties',
{read_write, % = 1, uint32 (optional)
red_blue % = 2, uint32 (optional)
{read_write :: non_neg_integer() | undefined, % = 1, 32 bits
red_blue :: non_neg_integer() | undefined % = 2, 32 bits
}).
-endif.

-ifndef('APBBOUNDOBJECT_PB_H').
-define('APBBOUNDOBJECT_PB_H', true).
-record('ApbBoundObject',
{key, % = 1, bytes
type, % = 2, {enum,'CRDT_type'}
bucket % = 3, bytes
{key :: iodata(), % = 1
type :: 'COUNTER' | 'ORSET' | 'LWWREG' | 'MVREG' | 'GMAP' | 'RWSET' | 'RRMAP' | 'FATCOUNTER' | 'FLAG_EW' | 'FLAG_DW' | integer(), % = 2, enum CRDT_type
bucket :: iodata() % = 3
}).
-endif.

-ifndef('APBREADOBJECTS_PB_H').
-define('APBREADOBJECTS_PB_H', true).
-record('ApbReadObjects',
{boundobjects = [], % = 1, [{msg,'ApbBoundObject'}]
transaction_descriptor % = 2, bytes
{boundobjects = [] :: [antidote_pb:'ApbBoundObject'()] | undefined, % = 1
transaction_descriptor :: iodata() % = 2
}).
-endif.

-ifndef('APBUPDATEOP_PB_H').
-define('APBUPDATEOP_PB_H', true).
-record('ApbUpdateOp',
{boundobject, % = 1, {msg,'ApbBoundObject'}
operation % = 2, {msg,'ApbUpdateOperation'}
{boundobject :: antidote_pb:'ApbBoundObject'(), % = 1
operation :: antidote_pb:'ApbUpdateOperation'() % = 2
}).
-endif.

-ifndef('APBUPDATEOPERATION_PB_H').
-define('APBUPDATEOPERATION_PB_H', true).
-record('ApbUpdateOperation',
{counterop, % = 1, {msg,'ApbCounterUpdate'} (optional)
setop, % = 2, {msg,'ApbSetUpdate'} (optional)
regop, % = 3, {msg,'ApbRegUpdate'} (optional)
mapop, % = 5, {msg,'ApbMapUpdate'} (optional)
resetop, % = 6, {msg,'ApbCrdtReset'} (optional)
flagop % = 7, {msg,'ApbFlagUpdate'} (optional)
{counterop :: antidote_pb:'ApbCounterUpdate'() | undefined, % = 1
setop :: antidote_pb:'ApbSetUpdate'() | undefined, % = 2
regop :: antidote_pb:'ApbRegUpdate'() | undefined, % = 3
mapop :: antidote_pb:'ApbMapUpdate'() | undefined, % = 5
resetop :: antidote_pb:'ApbCrdtReset'() | undefined, % = 6
flagop :: antidote_pb:'ApbFlagUpdate'() | undefined % = 7
}).
-endif.

-ifndef('APBUPDATEOBJECTS_PB_H').
-define('APBUPDATEOBJECTS_PB_H', true).
-record('ApbUpdateObjects',
{updates = [], % = 1, [{msg,'ApbUpdateOp'}]
transaction_descriptor % = 2, bytes
{updates = [] :: [antidote_pb:'ApbUpdateOp'()] | undefined, % = 1
transaction_descriptor :: iodata() % = 2
}).
-endif.

-ifndef('APBSTARTTRANSACTION_PB_H').
-define('APBSTARTTRANSACTION_PB_H', true).
-record('ApbStartTransaction',
{timestamp, % = 1, bytes (optional)
properties % = 2, {msg,'ApbTxnProperties'} (optional)
{timestamp :: iodata() | undefined, % = 1
properties :: antidote_pb:'ApbTxnProperties'() | undefined % = 2
}).
-endif.

-ifndef('APBABORTTRANSACTION_PB_H').
-define('APBABORTTRANSACTION_PB_H', true).
-record('ApbAbortTransaction',
{transaction_descriptor % = 1, bytes
{transaction_descriptor :: iodata() % = 1
}).
-endif.

-ifndef('APBCOMMITTRANSACTION_PB_H').
-define('APBCOMMITTRANSACTION_PB_H', true).
-record('ApbCommitTransaction',
{transaction_descriptor % = 1, bytes
{transaction_descriptor :: iodata() % = 1
}).
-endif.

-ifndef('APBSTATICUPDATEOBJECTS_PB_H').
-define('APBSTATICUPDATEOBJECTS_PB_H', true).
-record('ApbStaticUpdateObjects',
{transaction, % = 1, {msg,'ApbStartTransaction'}
updates = [] % = 2, [{msg,'ApbUpdateOp'}]
{transaction :: antidote_pb:'ApbStartTransaction'(), % = 1
updates = [] :: [antidote_pb:'ApbUpdateOp'()] | undefined % = 2
}).
-endif.

-ifndef('APBSTATICREADOBJECTS_PB_H').
-define('APBSTATICREADOBJECTS_PB_H', true).
-record('ApbStaticReadObjects',
{transaction, % = 1, {msg,'ApbStartTransaction'}
objects = [] % = 2, [{msg,'ApbBoundObject'}]
{transaction :: antidote_pb:'ApbStartTransaction'(), % = 1
objects = [] :: [antidote_pb:'ApbBoundObject'()] | undefined % = 2
}).
-endif.

-ifndef('APBSTARTTRANSACTIONRESP_PB_H').
-define('APBSTARTTRANSACTIONRESP_PB_H', true).
-record('ApbStartTransactionResp',
{success, % = 1, bool
transaction_descriptor, % = 2, bytes (optional)
errorcode % = 3, uint32 (optional)
{success :: boolean() | 0 | 1, % = 1
transaction_descriptor :: iodata() | undefined, % = 2
errorcode :: non_neg_integer() | undefined % = 3, 32 bits
}).
-endif.

-ifndef('APBREADOBJECTRESP_PB_H').
-define('APBREADOBJECTRESP_PB_H', true).
-record('ApbReadObjectResp',
{counter, % = 1, {msg,'ApbGetCounterResp'} (optional)
set, % = 2, {msg,'ApbGetSetResp'} (optional)
reg, % = 3, {msg,'ApbGetRegResp'} (optional)
mvreg, % = 4, {msg,'ApbGetMVRegResp'} (optional)
map, % = 6, {msg,'ApbGetMapResp'} (optional)
flag % = 7, {msg,'ApbGetFlagResp'} (optional)
{counter :: antidote_pb:'ApbGetCounterResp'() | undefined, % = 1
set :: antidote_pb:'ApbGetSetResp'() | undefined, % = 2
reg :: antidote_pb:'ApbGetRegResp'() | undefined, % = 3
mvreg :: antidote_pb:'ApbGetMVRegResp'() | undefined, % = 4
map :: antidote_pb:'ApbGetMapResp'() | undefined, % = 6
flag :: antidote_pb:'ApbGetFlagResp'() | undefined % = 7
}).
-endif.

-ifndef('APBREADOBJECTSRESP_PB_H').
-define('APBREADOBJECTSRESP_PB_H', true).
-record('ApbReadObjectsResp',
{success, % = 1, bool
objects = [], % = 2, [{msg,'ApbReadObjectResp'}]
errorcode % = 3, uint32 (optional)
{success :: boolean() | 0 | 1, % = 1
objects = [] :: [antidote_pb:'ApbReadObjectResp'()] | undefined, % = 2
errorcode :: non_neg_integer() | undefined % = 3, 32 bits
}).
-endif.

-ifndef('APBCOMMITRESP_PB_H').
-define('APBCOMMITRESP_PB_H', true).
-record('ApbCommitResp',
{success, % = 1, bool
commit_time, % = 2, bytes (optional)
errorcode % = 3, uint32 (optional)
{success :: boolean() | 0 | 1, % = 1
commit_time :: iodata() | undefined, % = 2
errorcode :: non_neg_integer() | undefined % = 3, 32 bits
}).
-endif.

-ifndef('APBSTATICREADOBJECTSRESP_PB_H').
-define('APBSTATICREADOBJECTSRESP_PB_H', true).
-record('ApbStaticReadObjectsResp',
{objects, % = 1, {msg,'ApbReadObjectsResp'}
committime % = 2, {msg,'ApbCommitResp'}
{objects :: antidote_pb:'ApbReadObjectsResp'(), % = 1
committime :: antidote_pb:'ApbCommitResp'() % = 2
}).
-endif.

-ifndef('APBCREATEDC_PB_H').
-define('APBCREATEDC_PB_H', true).
-record('ApbCreateDC',
{nodes = [] :: [iodata()] | undefined % = 1
}).
-endif.

-ifndef('APBGETCONNECTIONDESCRIPTOR_PB_H').
-define('APBGETCONNECTIONDESCRIPTOR_PB_H', true).
-record('ApbGetConnectionDescriptor',
{
}).
-endif.

-ifndef('APBGETCONNECTIONDESCRIPTORRESP_PB_H').
-define('APBGETCONNECTIONDESCRIPTORRESP_PB_H', true).
-record('ApbGetConnectionDescriptorResp',
{success :: boolean() | 0 | 1, % = 1
descriptor :: iodata() | undefined, % = 2
errorcode :: non_neg_integer() | undefined % = 3, 32 bits
}).
-endif.

-ifndef('APBCONNECTTODCS_PB_H').
-define('APBCONNECTTODCS_PB_H', true).
-record('ApbConnectToDCs',
{descriptors = [] :: [iodata()] | undefined % = 1
}).
-endif.

Expand Down
Loading

0 comments on commit 8361d03

Please sign in to comment.