[#401] control: Serve DropObjects RPC

Re-compile protobuf definition of Control service. Implement required
messages on DropObjects RPC request and response messages. Implement
`DropObjects` method on Control service server of the node. Use
`StorageEngine.Delete` method as a deleted object handler on server.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-21 11:30:32 +03:00 committed by Alex Vanin
parent f2337baedc
commit aa24702ebe
6 changed files with 624 additions and 79 deletions

View file

@ -47,6 +47,8 @@ type cfg struct {
netMapSrc netmap.Source
nodeState NodeState
delObjHandler DeletedObjectHandler
}
func defaultCfg() *cfg {
@ -103,3 +105,11 @@ func WithNodeState(state NodeState) Option {
c.nodeState = state
}
}
// WithDeletedObjectHandler returns option to function
// which is called on the objects being deleted.
func WithDeletedObjectHandler(h DeletedObjectHandler) Option {
return func(c *cfg) {
c.delObjHandler = h
}
}