|
39 | 39 | % encoding on wire (used to be decode_msg and encode_msg)
|
40 | 40 |
|
41 | 41 | % these are all top-level messages which can be sent on the wire
|
42 |
| --export_type([sendable/0, request/0, response/0, message/0, update/0]). |
| 42 | +-export_type([sendable/0, request/0, response/0, message/0, update/0, read_result/0]). |
43 | 43 |
|
44 | 44 | -type sendable() ::
|
45 | 45 | #'ApbErrorResp'{}
|
|
59 | 59 | -type bound_object() :: {Key :: binary(), Type :: atom(), Bucket :: binary()}.
|
60 | 60 | -type update() :: {Object :: bound_object(), Op :: atom(), Param :: any()}.
|
61 | 61 | -type error_code() :: unknown | timeout | {error_code, integer()}.
|
62 |
| - |
| 62 | +-type read_result() :: |
| 63 | + {counter, integer()} |
| 64 | +| {set, [binary()]} |
| 65 | +| {reg, binary()} |
| 66 | +| {mvreg, [binary()]} |
| 67 | +| {map, [{{Key :: binary(), Type :: atom()}, Value :: read_result()}]} |
| 68 | +| {flag, boolean()}. |
63 | 69 |
|
64 | 70 | -type request() ::
|
65 | 71 | {start_transaction, {Clock :: binary(), Properties :: list()}}
|
|
72 | 78 |
|
73 | 79 | -type response() ::
|
74 | 80 | {error_resp, {ErrorCode :: error_code(), Message :: binary()}}
|
75 |
| -| {start_transaction_resp, Resp :: atom()} |
76 |
| -| {error_response, Resp :: any()} |
| 81 | +| {start_transaction_resp, Resp :: {ok, TxId :: binary} | {error, Reason::any()}} |
| 82 | +| {error_response, {error_code(), Message :: binary()}} |
77 | 83 | | {static_read_objects_resp, {ok, Results :: list(), CommitTime :: binary()}}
|
78 | 84 | | {read_objects_resp, Resp :: list()}.
|
79 | 85 |
|
|
0 commit comments