15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASYNC_STREAMING_READ_WRITE_RPC_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASYNC_STREAMING_READ_WRITE_RPC_H
18#include "google/cloud/future.h"
19#include "google/cloud/status.h"
20#include "google/cloud/version.h"
21#include "absl/types/optional.h"
22#include <grpcpp/support/async_stream.h>
29
30
31
32
33
34
35
36template <
typename Request,
typename Response>
42
43
44
45
46
47
51
52
53
54
55
56
57
58
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79 virtual future<absl::optional<Response>>
Read() = 0;
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98 virtual future<
bool>
Write(Request
const&, grpc::WriteOptions) = 0;
101
102
103
104
105
106
107
108
109
110
114
115
116
117
118
119
120
121
122
123
A streaming read-write RPC.
Definition: async_streaming_read_write_rpc.h:37
virtual ~AsyncStreamingReadWriteRpc()=default
virtual future< absl::optional< Response > > Read()=0
Read one response from the streaming RPC.
virtual future< Status > Finish()=0
Return the final status of the streaming RPC.
virtual future< bool > WritesDone()=0
Half-closes the streaming RPC.
virtual future< bool > Write(Request const &, grpc::WriteOptions)=0
Write one request to the streaming RPC.
virtual void Cancel()=0
Sends a best-effort request to cancel the RPC.
virtual future< bool > Start()=0
Start the streaming RPC.
Represents success or an error with info about the error.
Definition: status.h:295
friend class future
Definition: future_generic.h:137
Contains all the Google Cloud C++ Library APIs.
Definition: async_operation.h:23
Definition: async_operation.h:22
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Definition: version.h:45
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
Definition: version.h:43