Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3530595
D3468.id10549.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3468.id10549.diff
View Options
diff --git a/services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp b/services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp
--- a/services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp
+++ b/services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp
@@ -1,7 +1,9 @@
#include "BackupServiceImpl.h"
-#include "ServerBidiReactorBase.h"
-#include "ServerReadReactorBase.h"
+#include "CreateNewBackupReactor.h"
+#include "PullBackupReactor.h"
+#include "RecoverBackupKeyReactor.h"
+#include "SendLogReactor.h"
#include <aws/core/Aws.h>
@@ -20,79 +22,25 @@
backup::CreateNewBackupRequest,
backup::CreateNewBackupResponse> *
BackupServiceImpl::CreateNewBackup(grpc::CallbackServerContext *context) {
- class CreateNewBackupReactor : public reactor::ServerBidiReactorBase<
- backup::CreateNewBackupRequest,
- backup::CreateNewBackupResponse> {
- public:
- std::unique_ptr<grpc::Status> handleRequest(
- backup::CreateNewBackupRequest request,
- backup::CreateNewBackupResponse *response) override {
- // TODO handle request
- return std::make_unique<grpc::Status>(
- grpc::StatusCode::UNIMPLEMENTED, "unimplemented");
- }
- };
-
- return new CreateNewBackupReactor();
+ return new reactor::CreateNewBackupReactor();
}
grpc::ServerReadReactor<backup::SendLogRequest> *BackupServiceImpl::SendLog(
grpc::CallbackServerContext *context,
google::protobuf::Empty *response) {
- class SendLogReactor : public reactor::ServerReadReactorBase<
- backup::SendLogRequest,
- google::protobuf::Empty> {
- public:
- using ServerReadReactorBase<
- backup::SendLogRequest,
- google::protobuf::Empty>::ServerReadReactorBase;
- std::unique_ptr<grpc::Status>
- readRequest(backup::SendLogRequest request) override {
- // TODO handle request
- return std::make_unique<grpc::Status>(
- grpc::StatusCode::UNIMPLEMENTED, "unimplemented");
- }
- };
-
- return new SendLogReactor(response);
+ return new reactor::SendLogReactor(response);
}
grpc::ServerBidiReactor<
backup::RecoverBackupKeyRequest,
backup::RecoverBackupKeyResponse> *
BackupServiceImpl::RecoverBackupKey(grpc::CallbackServerContext *context) {
- class RecoverBackupKeyReactor : public reactor::ServerBidiReactorBase<
- backup::RecoverBackupKeyRequest,
- backup::RecoverBackupKeyResponse> {
- public:
- std::unique_ptr<grpc::Status> handleRequest(
- backup::RecoverBackupKeyRequest request,
- backup::RecoverBackupKeyResponse *response) override {
- // TODO handle request
- return std::make_unique<grpc::Status>(
- grpc::StatusCode::UNIMPLEMENTED, "unimplemented");
- }
- };
-
- return new RecoverBackupKeyReactor();
+ return new reactor::RecoverBackupKeyReactor();
}
grpc::ServerBidiReactor<backup::PullBackupRequest, backup::PullBackupResponse> *
BackupServiceImpl::PullBackup(grpc::CallbackServerContext *context) {
- class PullBackupReactor : public reactor::ServerBidiReactorBase<
- backup::PullBackupRequest,
- backup::PullBackupResponse> {
- public:
- std::unique_ptr<grpc::Status> handleRequest(
- backup::PullBackupRequest request,
- backup::PullBackupResponse *response) override {
- // TODO handle request
- return std::make_unique<grpc::Status>(
- grpc::StatusCode::UNIMPLEMENTED, "unimplemented");
- }
- };
-
- return new PullBackupReactor();
+ return new reactor::PullBackupReactor();
}
} // namespace network
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 3:18 AM (9 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703729
Default Alt Text
D3468.id10549.diff (3 KB)
Attached To
Mode
D3468: [services] Backup - Update service implementation
Attached
Detach File
Event Timeline
Log In to Comment