47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
#ifndef __ASYNC_TXNRESPONSE_HPP__
|
|
#define __ASYNC_TXNRESPONSE_HPP__
|
|
|
|
#include <grpc++/grpc++.h>
|
|
#include "proto/rpc.grpc.pb.h"
|
|
#include "v3/include/V3Response.hpp"
|
|
<<<<<<< 0cb5bd762aca24c5a8d9e959c5f72590d85ad2b4
|
|
=======
|
|
#include "v3/include/grpcClient.hpp"
|
|
|
|
|
|
>>>>>>> Use Txn for add()
|
|
|
|
using grpc::ClientAsyncResponseReader;
|
|
using grpc::ClientContext;
|
|
using grpc::CompletionQueue;
|
|
using grpc::Status;
|
|
using etcdserverpb::TxnResponse;
|
|
|
|
namespace etcdv3
|
|
{
|
|
class AsyncTxnResponse : public etcdv3::V3Response
|
|
{
|
|
public:
|
|
AsyncTxnResponse(){};
|
|
AsyncTxnResponse(const std::string act){action = act;};
|
|
AsyncTxnResponse(const AsyncTxnResponse& other);
|
|
AsyncTxnResponse& operator=(const AsyncTxnResponse& other);
|
|
<<<<<<< 0cb5bd762aca24c5a8d9e959c5f72590d85ad2b4
|
|
AsyncTxnResponse& ParseResponse();
|
|
void waitForResponse();
|
|
=======
|
|
>>>>>>> Use Txn for add()
|
|
TxnResponse reply;
|
|
Status status;
|
|
ClientContext context;
|
|
CompletionQueue cq_;
|
|
std::unique_ptr<ClientAsyncResponseReader<TxnResponse>> response_reader;
|
|
<<<<<<< 0cb5bd762aca24c5a8d9e959c5f72590d85ad2b4
|
|
=======
|
|
AsyncTxnResponse& ParseResponse();
|
|
>>>>>>> Use Txn for add()
|
|
};
|
|
}
|
|
|
|
#endif
|