forked from TrueCloudLab/frostfs-node
[#1204] shard: Save ID in the metabase
`AddShard` must return shard id, so we temporarily open metabase there. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1fe9cd4d36
commit
19ad349b27
6 changed files with 108 additions and 13 deletions
|
@ -96,7 +96,7 @@ func New(opts ...Option) *Shard {
|
|||
return s
|
||||
}
|
||||
|
||||
// WithID returns option to set shard identifier.
|
||||
// WithID returns option to set the default shard identifier.
|
||||
func WithID(id *ID) Option {
|
||||
return func(c *cfg) {
|
||||
c.info.ID = id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue