Commit 97fbace
committed
feat(go)!: rework async I/O
- Remove `Completer` abstraction and just always send async values as
"pending" in Go. We may want to revisit this in the future with a
better approach (e.g. encoding nested async values concurrently and
using a `select` to synchronise at encoding position)
- Expose `Close` for stream and future types, although for now the
callers have to assert for it.
This is not the final solution, just an intermediate state.
More breaking changes are incoming for this functionality
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>1 parent abaef30 commit 97fbace
19 files changed
Lines changed: 559 additions & 1205 deletions
File tree
- crates/wit-bindgen-go/src
- examples/go
- hello-client/cmd/hello-client-nats
- hello-server/cmd/hello-server-nats
- resources-server/cmd/resources-server-nats
- streams-client
- bindings/wrpc_examples/streams/handler
- cmd/streams-client-nats
- streams-server
- bindings/exports/wrpc_examples/streams/handler
- cmd/streams-server-nats
- go
- nats
- tests/go
- cmd/sync-server-nats
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments