diff --git a/services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h b/services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h new file mode 100644 --- /dev/null +++ b/services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h @@ -0,0 +1,45 @@ +#pragma once + +#include "ServerReadReactorBase.h" + +#include "../_generated/backup.grpc.pb.h" +#include "../_generated/backup.pb.h" + +#include +#include +#include + +namespace comm { +namespace network { +namespace reactor { + +class SendLogReactor : public ServerReadReactorBase< + backup::SendLogRequest, + google::protobuf::Empty> { + +public: + using ServerReadReactorBase:: + ServerReadReactorBase; + + std::unique_ptr + readRequest(backup::SendLogRequest request) override; + void doneCallback() override; +}; + +std::unique_ptr +SendLogReactor::readRequest(backup::SendLogRequest request) { + // TODO implement + std::cout << "handle request log chunk " << request.logdata().size() + << std::endl; + return nullptr; +} + +void SendLogReactor::doneCallback() { + // TODO implement + std::cout << "receive logs done " << this->status.error_code() << "/" + << this->status.error_message() << std::endl; +} + +} // namespace reactor +} // namespace network +} // namespace comm