etcd-cpp-apiv3/etcd/v3/AsyncUpdateAction.hpp

28 lines
600 B
C++

#ifndef __ASYNC_UPDATE_HPP__
#define __ASYNC_UPDATE_HPP__
#include <grpc++/grpc++.h>
#include "proto/rpc.grpc.pb.h"
#include "etcd/v3/Action.hpp"
#include "etcd/v3/AsyncTxnResponse.hpp"
using grpc::ClientAsyncResponseReader;
using etcdserverpb::TxnResponse;
using etcdserverpb::KV;
namespace etcdv3
{
class AsyncUpdateAction : public etcdv3::Action
{
public:
AsyncUpdateAction(etcdv3::ActionParameters param);
AsyncTxnResponse ParseResponse();
private:
TxnResponse reply;
std::unique_ptr<ClientAsyncResponseReader<TxnResponse>> response_reader;
};
}
#endif