| 16 | type AsyncHandler struct{} |
| 17 | |
| 18 | func (AsyncHandler) WithStreams(ctx context.Context) (io.ReadCloser, wrpc.Receiver[[][]string], error) { |
| 19 | slog.DebugContext(ctx, "handling `with-streams`") |
| 20 | buf := io.NopCloser(bytes.NewBuffer([]byte("test"))) |
| 21 | str := wrpc.NewCompleteReceiver([][]string{{"foo"}, {"bar", "baz"}}) |
| 22 | return buf, str, nil |
| 23 | } |
| 24 | |
| 25 | func (AsyncHandler) WithFuture(ctx context.Context, x *async.Something, s io.ReadCloser) (wrpc.Receiver[io.ReadCloser], error) { |
| 26 | slog.DebugContext(ctx, "handling `with-future`", "x", x) |