Revision f3448a3c doc/design-2.1.rst
b/doc/design-2.1.rst | ||
---|---|---|
361 | 361 |
|
362 | 362 |
A confd query will look like this, on the wire:: |
363 | 363 |
|
364 |
{ |
|
364 |
plj0{
|
|
365 | 365 |
"msg": "{\"type\": 1, |
366 | 366 |
\"rsalt\": \"9aa6ce92-8336-11de-af38-001d093e835f\", |
367 | 367 |
\"protocol\": 1, |
... | ... | |
370 | 370 |
"hmac": "4a4139b2c3c5921f7e439469a0a45ad200aead0f" |
371 | 371 |
} |
372 | 372 |
|
373 |
Detailed explanation of the various fields: |
|
373 |
"plj0" is a fourcc that details the message content. It stands for plain |
|
374 |
json 0, and can be changed as we move on to different type of protocols |
|
375 |
(for example protocol buffers, or encrypted json). What follows is a |
|
376 |
json encoded string, with the following fields: |
|
374 | 377 |
|
375 | 378 |
- 'msg' contains a JSON-encoded query, its fields are: |
376 | 379 |
|
... | ... | |
392 | 395 |
If an answer comes back (which is optional, since confd works over UDP) |
393 | 396 |
it will be in this format:: |
394 | 397 |
|
395 |
{ |
|
398 |
plj0{
|
|
396 | 399 |
"msg": "{\"status\": 0, |
397 | 400 |
\"answer\": 0, |
398 | 401 |
\"serial\": 42, |
... | ... | |
403 | 406 |
|
404 | 407 |
Where: |
405 | 408 |
|
409 |
- 'plj0' the message type magic fourcc, as discussed above |
|
406 | 410 |
- 'msg' contains a JSON-encoded answer, its fields are: |
407 | 411 |
|
408 | 412 |
- 'protocol', integer, is the confd protocol version (initially just |
Also available in: Unified diff