[#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
|
@ -29,7 +29,7 @@ type Cache interface {
|
|||
DumpInfo() Info
|
||||
|
||||
Init() error
|
||||
Open() error
|
||||
Open(readOnly bool) error
|
||||
Close() error
|
||||
}
|
||||
|
||||
|
@ -125,8 +125,8 @@ func (c *cache) DumpInfo() Info {
|
|||
}
|
||||
|
||||
// Open opens and initializes database. Reads object counters from the ObjectCounters instance.
|
||||
func (c *cache) Open() error {
|
||||
err := c.openStore()
|
||||
func (c *cache) Open(readOnly bool) error {
|
||||
err := c.openStore(readOnly)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue