|
| 1 | +# Protocol Documentation |
| 2 | +<a name="top"></a> |
| 3 | + |
| 4 | +## Table of Contents |
| 5 | + |
| 6 | +- [atomix/counter/v1/counter.proto](#atomix_counter_v1_counter-proto) |
| 7 | + - [DecrementInput](#atomix-counter-v1-DecrementInput) |
| 8 | + - [DecrementOutput](#atomix-counter-v1-DecrementOutput) |
| 9 | + - [DecrementRequest](#atomix-counter-v1-DecrementRequest) |
| 10 | + - [DecrementResponse](#atomix-counter-v1-DecrementResponse) |
| 11 | + - [GetInput](#atomix-counter-v1-GetInput) |
| 12 | + - [GetOutput](#atomix-counter-v1-GetOutput) |
| 13 | + - [GetRequest](#atomix-counter-v1-GetRequest) |
| 14 | + - [GetResponse](#atomix-counter-v1-GetResponse) |
| 15 | + - [IncrementInput](#atomix-counter-v1-IncrementInput) |
| 16 | + - [IncrementOutput](#atomix-counter-v1-IncrementOutput) |
| 17 | + - [IncrementRequest](#atomix-counter-v1-IncrementRequest) |
| 18 | + - [IncrementResponse](#atomix-counter-v1-IncrementResponse) |
| 19 | + - [Precondition](#atomix-counter-v1-Precondition) |
| 20 | + - [SetInput](#atomix-counter-v1-SetInput) |
| 21 | + - [SetOutput](#atomix-counter-v1-SetOutput) |
| 22 | + - [SetRequest](#atomix-counter-v1-SetRequest) |
| 23 | + - [SetResponse](#atomix-counter-v1-SetResponse) |
| 24 | + - [Value](#atomix-counter-v1-Value) |
| 25 | + |
| 26 | + - [Counter](#atomix-counter-v1-Counter) |
| 27 | + |
| 28 | +- [Scalar Value Types](#scalar-value-types) |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +<a name="atomix_counter_v1_counter-proto"></a> |
| 33 | +<p align="right"><a href="#top">Top</a></p> |
| 34 | + |
| 35 | +## atomix/counter/v1/counter.proto |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +<a name="atomix-counter-v1-DecrementInput"></a> |
| 40 | + |
| 41 | +### DecrementInput |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +| Field | Type | Label | Description | |
| 46 | +| ----- | ---- | ----- | ----------- | |
| 47 | +| delta | [int64](#int64) | | | |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +<a name="atomix-counter-v1-DecrementOutput"></a> |
| 55 | + |
| 56 | +### DecrementOutput |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +| Field | Type | Label | Description | |
| 61 | +| ----- | ---- | ----- | ----------- | |
| 62 | +| value | [int64](#int64) | | | |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +<a name="atomix-counter-v1-DecrementRequest"></a> |
| 70 | + |
| 71 | +### DecrementRequest |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +| Field | Type | Label | Description | |
| 76 | +| ----- | ---- | ----- | ----------- | |
| 77 | +| headers | [atomix.runtime.v1.AtomRequestHeaders](#atomix-runtime-v1-AtomRequestHeaders) | | | |
| 78 | +| input | [DecrementInput](#atomix-counter-v1-DecrementInput) | | | |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | +<a name="atomix-counter-v1-DecrementResponse"></a> |
| 86 | + |
| 87 | +### DecrementResponse |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +| Field | Type | Label | Description | |
| 92 | +| ----- | ---- | ----- | ----------- | |
| 93 | +| headers | [atomix.runtime.v1.AtomResponseHeaders](#atomix-runtime-v1-AtomResponseHeaders) | | | |
| 94 | +| output | [DecrementOutput](#atomix-counter-v1-DecrementOutput) | | | |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +<a name="atomix-counter-v1-GetInput"></a> |
| 102 | + |
| 103 | +### GetInput |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | +<a name="atomix-counter-v1-GetOutput"></a> |
| 112 | + |
| 113 | +### GetOutput |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +| Field | Type | Label | Description | |
| 118 | +| ----- | ---- | ----- | ----------- | |
| 119 | +| value | [int64](#int64) | | | |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +<a name="atomix-counter-v1-GetRequest"></a> |
| 127 | + |
| 128 | +### GetRequest |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | +| Field | Type | Label | Description | |
| 133 | +| ----- | ---- | ----- | ----------- | |
| 134 | +| headers | [atomix.runtime.v1.AtomRequestHeaders](#atomix-runtime-v1-AtomRequestHeaders) | | | |
| 135 | +| input | [GetInput](#atomix-counter-v1-GetInput) | | | |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | +<a name="atomix-counter-v1-GetResponse"></a> |
| 143 | + |
| 144 | +### GetResponse |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | +| Field | Type | Label | Description | |
| 149 | +| ----- | ---- | ----- | ----------- | |
| 150 | +| headers | [atomix.runtime.v1.AtomResponseHeaders](#atomix-runtime-v1-AtomResponseHeaders) | | | |
| 151 | +| output | [GetOutput](#atomix-counter-v1-GetOutput) | | | |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | +<a name="atomix-counter-v1-IncrementInput"></a> |
| 159 | + |
| 160 | +### IncrementInput |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | +| Field | Type | Label | Description | |
| 165 | +| ----- | ---- | ----- | ----------- | |
| 166 | +| delta | [int64](#int64) | | | |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | +<a name="atomix-counter-v1-IncrementOutput"></a> |
| 174 | + |
| 175 | +### IncrementOutput |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | +| Field | Type | Label | Description | |
| 180 | +| ----- | ---- | ----- | ----------- | |
| 181 | +| value | [int64](#int64) | | | |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | +<a name="atomix-counter-v1-IncrementRequest"></a> |
| 189 | + |
| 190 | +### IncrementRequest |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | +| Field | Type | Label | Description | |
| 195 | +| ----- | ---- | ----- | ----------- | |
| 196 | +| headers | [atomix.runtime.v1.AtomRequestHeaders](#atomix-runtime-v1-AtomRequestHeaders) | | | |
| 197 | +| input | [IncrementInput](#atomix-counter-v1-IncrementInput) | | | |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | +<a name="atomix-counter-v1-IncrementResponse"></a> |
| 205 | + |
| 206 | +### IncrementResponse |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | +| Field | Type | Label | Description | |
| 211 | +| ----- | ---- | ----- | ----------- | |
| 212 | +| headers | [atomix.runtime.v1.AtomResponseHeaders](#atomix-runtime-v1-AtomResponseHeaders) | | | |
| 213 | +| output | [IncrementOutput](#atomix-counter-v1-IncrementOutput) | | | |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | +<a name="atomix-counter-v1-Precondition"></a> |
| 221 | + |
| 222 | +### Precondition |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | +| Field | Type | Label | Description | |
| 227 | +| ----- | ---- | ----- | ----------- | |
| 228 | +| value | [int64](#int64) | | | |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | +<a name="atomix-counter-v1-SetInput"></a> |
| 236 | + |
| 237 | +### SetInput |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | +| Field | Type | Label | Description | |
| 242 | +| ----- | ---- | ----- | ----------- | |
| 243 | +| value | [int64](#int64) | | | |
| 244 | +| preconditions | [Precondition](#atomix-counter-v1-Precondition) | repeated | | |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | +<a name="atomix-counter-v1-SetOutput"></a> |
| 252 | + |
| 253 | +### SetOutput |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | +| Field | Type | Label | Description | |
| 258 | +| ----- | ---- | ----- | ----------- | |
| 259 | +| value | [int64](#int64) | | | |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | +<a name="atomix-counter-v1-SetRequest"></a> |
| 267 | + |
| 268 | +### SetRequest |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | +| Field | Type | Label | Description | |
| 273 | +| ----- | ---- | ----- | ----------- | |
| 274 | +| headers | [atomix.runtime.v1.AtomRequestHeaders](#atomix-runtime-v1-AtomRequestHeaders) | | | |
| 275 | +| input | [SetInput](#atomix-counter-v1-SetInput) | | | |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | +<a name="atomix-counter-v1-SetResponse"></a> |
| 283 | + |
| 284 | +### SetResponse |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | +| Field | Type | Label | Description | |
| 289 | +| ----- | ---- | ----- | ----------- | |
| 290 | +| headers | [atomix.runtime.v1.AtomResponseHeaders](#atomix-runtime-v1-AtomResponseHeaders) | | | |
| 291 | +| output | [SetOutput](#atomix-counter-v1-SetOutput) | | | |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | +<a name="atomix-counter-v1-Value"></a> |
| 299 | + |
| 300 | +### Value |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | +| Field | Type | Label | Description | |
| 305 | +| ----- | ---- | ----- | ----------- | |
| 306 | +| value | [int64](#int64) | | | |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | +<a name="atomix-counter-v1-Counter"></a> |
| 320 | + |
| 321 | +### Counter |
| 322 | +Counter is a service for a counter primitive |
| 323 | + |
| 324 | +| Method Name | Request Type | Response Type | Description | |
| 325 | +| ----------- | ------------ | ------------- | ------------| |
| 326 | +| Set | [SetRequest](#atomix-counter-v1-SetRequest) | [SetResponse](#atomix-counter-v1-SetResponse) | Set sets the counter value | |
| 327 | +| Get | [GetRequest](#atomix-counter-v1-GetRequest) | [GetResponse](#atomix-counter-v1-GetResponse) | Get gets the current counter value | |
| 328 | +| Increment | [IncrementRequest](#atomix-counter-v1-IncrementRequest) | [IncrementResponse](#atomix-counter-v1-IncrementResponse) | Increment increments the counter value | |
| 329 | +| Decrement | [DecrementRequest](#atomix-counter-v1-DecrementRequest) | [DecrementResponse](#atomix-counter-v1-DecrementResponse) | Decrement decrements the counter value | |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | +## Scalar Value Types |
| 336 | + |
| 337 | +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | |
| 338 | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | |
| 339 | +| <a name="double" /> double | | double | double | float | float64 | double | float | Float | |
| 340 | +| <a name="float" /> float | | float | float | float | float32 | float | float | Float | |
| 341 | +| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | |
| 342 | +| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | |
| 343 | +| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | |
| 344 | +| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | |
| 345 | +| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | |
| 346 | +| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | |
| 347 | +| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | |
| 348 | +| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | |
| 349 | +| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | |
| 350 | +| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | |
| 351 | +| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| 352 | +| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | |
| 353 | +| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | |
| 354 | + |
0 commit comments