forked from TrueCloudLab/frostfs-node
config: replace use_write_cache
with writecache.enabled
This is the way things are done with `grpc.tls` and in neo-go. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
20b3ff84b3
commit
e976a55358
9 changed files with 22 additions and 27 deletions
|
@ -31,6 +31,13 @@ func From(c *config.Config) *Config {
|
|||
return (*Config)(c)
|
||||
}
|
||||
|
||||
// Enabled returns true if write-cache is enabled and false otherwise.
|
||||
//
|
||||
// Panics if value is not a boolean.
|
||||
func (x *Config) Enabled() bool {
|
||||
return config.Bool((*config.Config)(x), "enabled")
|
||||
}
|
||||
|
||||
// Path returns value of "path" config parameter.
|
||||
//
|
||||
// Panics if value is not a non-empty string.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue