27 lines
568 B
C++
27 lines
568 B
C++
#ifndef __ASYNC_PUT_HPP__
|
|
#define __ASYNC_PUT_HPP__
|
|
|
|
#include <grpc++/grpc++.h>
|
|
#include "proto/rpc.grpc.pb.h"
|
|
#include "etcd/v3/Action.hpp"
|
|
#include "etcd/v3/AsyncPutResponse.hpp"
|
|
|
|
|
|
using grpc::ClientAsyncResponseReader;
|
|
using etcdserverpb::PutResponse;
|
|
|
|
namespace etcdv3
|
|
{
|
|
class AsyncPutAction : public etcdv3::Action
|
|
{
|
|
public:
|
|
AsyncPutAction(etcdv3::ActionParameters && params);
|
|
AsyncPutResponse ParseResponse();
|
|
private:
|
|
PutResponse reply;
|
|
std::unique_ptr<ClientAsyncResponseReader<PutResponse>> response_reader;
|
|
};
|
|
}
|
|
|
|
#endif
|