Skip to content

Commit

Permalink
v3 proposal ammendment: fix typos, fix consistency issues (#277)
Browse files Browse the repository at this point in the history
* update readcache to make it clearer that response is streamed

* remove transaction state, update message name, add transaction field to write message
  • Loading branch information
edaniszewski committed Feb 14, 2019
1 parent 30ac38a commit 045e336
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
34 changes: 17 additions & 17 deletions proposals/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,25 +855,25 @@ streamed JSON. One block of the streamed JSON will appear as follows:
> **Note**: In the examples below, the key-value pairs in the `context` field
> are arbitrary and only serve as an example of possible values.
A single block of the streamed response JSON would be structured as:

```json
[
{
"device": "a72cs6519ee675b",
"device_type": "temperature",
"type": "temperature",
"value": 20.3,
"timestamp": "2018-02-01T13:47:40Z",
"unit": {
"system": "metric",
"symbol": "C",
"name": "degrees celsius"
},
"context": {
"host": "127.0.0.1",
"sample_rate": 8
}
{
"device": "a72cs6519ee675b",
"device_type": "temperature",
"type": "temperature",
"value": 20.3,
"timestamp": "2018-02-01T13:47:40Z",
"unit": {
"system": "metric",
"symbol": "C",
"name": "degrees celsius"
},
"context": {
"host": "127.0.0.1",
"sample_rate": 8
}
]
}
```

**Fields**
Expand Down
12 changes: 6 additions & 6 deletions proposals/v3/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Get the state and status for the specified write transaction.
| Message | Link |
| :------ | :--- |
| *Request* | [V3TransactionSelector](#v3transactionselector) |
| *Response* | [V3TransactionState](#v3transactionstate) (stream) |
| *Response* | [V3TransactionStatus](#v3transactionstatus) (stream) |


#### Version
Expand All @@ -142,7 +142,7 @@ Write data to the specified plugin device in a synchronous request.
| Message | Link |
| :------ | :--- |
| *Request* | [V3WritePayload](#v3writepayload) |
| *Response* | [V3TransactionState](#v3transactionstate) (stream) |
| *Response* | [V3TransactionStatus](#v3transactionstatus) (stream) |


### Messages
Expand Down Expand Up @@ -302,16 +302,15 @@ Identifying information for a write transaction.
| *id* | string | The ID of a transaction. |


#### V3TransactionState
The state and status for a write transaction.
#### V3TransactionStatus
The status for a write transaction.

| Field | Type | Description |
| :---- | :--- | :---------- |
| *id* | string | The ID of the write transaction. |
| *created* | string | RFC3339 timestamp of when the transaction was created. |
| *updated* | string | RFC3339 timestamp of when the transaction was last updated. |
| *status* | enum WriteStatus | The status of the write (unknown, pending, writing, done). |
| *state* | enum WriteState | The state of the write (ok, error). |
| *status* | enum WriteStatus | The status of the write (pending, writing, done, error). |
| *message* | string | Context information for the asynchronous write when there is an error. |
| *context* | [V3WriteData](#v3writedata) | The data that was written for the write transaction. |
| *timeout* | string | The timeout within which the transaction remains valid. |
Expand Down Expand Up @@ -346,6 +345,7 @@ The data to write to a device.
| :---- | :--- | :---------- |
| *action* | string | The action string for the write. |
| *data* | bytes | The action data for the write. |
| *transaction* | string | A custom transaction ID that the user can specify for the write. |


#### V3WritePayload
Expand Down

0 comments on commit 045e336

Please sign in to comment.