[#1086] services/control: implement RestoreShard RPC

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-25 14:54:35 +03:00 committed by Alex Vanin
parent 2ec4a3c897
commit 18cfd8b042
8 changed files with 763 additions and 122 deletions

View file

@ -148,3 +148,21 @@ func (w *dumpShardResponseWrapper) FromGRPCMessage(m grpc.Message) error {
w.DumpShardResponse = r
return nil
}
type restoreShardResponseWrapper struct {
*RestoreShardResponse
}
func (w *restoreShardResponseWrapper) ToGRPCMessage() grpc.Message {
return w.RestoreShardResponse
}
func (w *restoreShardResponseWrapper) FromGRPCMessage(m grpc.Message) error {
r, ok := m.(*RestoreShardResponse)
if !ok {
return message.NewUnexpectedMessageType(m, (*RestoreShardResponse)(nil))
}
w.RestoreShardResponse = r
return nil
}