forked from TrueCloudLab/frostfs-node
[#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:
parent
f2337baedc
commit
aa24702ebe
6 changed files with 624 additions and 79 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue