forked from TrueCloudLab/frostfs-node
[#1559] local_object_storage: Provide readOnly flag to Open
We should be able to reopen storage in readonly in runtime. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
e38b0aa4ba
commit
1e786233bf
20 changed files with 70 additions and 49 deletions
|
@ -106,9 +106,9 @@ func WithLogger(l *logger.Logger) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// ReadOnly returns an option to open Blobovnicza in read-only mode.
|
||||
func ReadOnly() Option {
|
||||
// WithReadOnly returns an option to open Blobovnicza in read-only mode.
|
||||
func WithReadOnly(ro bool) Option {
|
||||
return func(c *cfg) {
|
||||
c.boltOptions.ReadOnly = true
|
||||
c.boltOptions.ReadOnly = ro
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue