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:
Evgenii Stratonikov 2022-01-27 14:30:19 +03:00 committed by Alex Vanin
parent 20b3ff84b3
commit e976a55358
9 changed files with 22 additions and 27 deletions

View file

@ -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.