forked from TrueCloudLab/frostfs-node
[#1320] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
d99800ee93
commit
cc7a723d77
182 changed files with 802 additions and 802 deletions
|
@ -11,7 +11,7 @@ const (
|
|||
subsection = "storage"
|
||||
|
||||
// ShardPoolSizeDefault is a default value of routine pool size per-shard to
|
||||
// process object PUT operations in storage engine.
|
||||
// process object PUT operations in a storage engine.
|
||||
ShardPoolSizeDefault = 20
|
||||
)
|
||||
|
||||
|
@ -47,9 +47,9 @@ func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config))
|
|||
}
|
||||
}
|
||||
|
||||
// ShardPoolSize returns value of "shard_pool_size" config parameter from "storage" section.
|
||||
// ShardPoolSize returns the value of "shard_pool_size" config parameter from "storage" section.
|
||||
//
|
||||
// Returns ShardPoolSizeDefault if value is not a positive number.
|
||||
// Returns ShardPoolSizeDefault if the value is not a positive number.
|
||||
func ShardPoolSize(c *config.Config) uint32 {
|
||||
v := config.Uint32Safe(c.Sub(subsection), "shard_pool_size")
|
||||
if v > 0 {
|
||||
|
@ -59,9 +59,9 @@ func ShardPoolSize(c *config.Config) uint32 {
|
|||
return ShardPoolSizeDefault
|
||||
}
|
||||
|
||||
// ShardErrorThreshold returns value of "shard_ro_error_threshold" config parameter from "storage" section.
|
||||
// ShardErrorThreshold returns the value of "shard_ro_error_threshold" config parameter from "storage" section.
|
||||
//
|
||||
// Returns 0 if the value is missing.
|
||||
// Returns 0 if the the value is missing.
|
||||
func ShardErrorThreshold(c *config.Config) uint32 {
|
||||
return config.Uint32Safe(c.Sub(subsection), "shard_ro_error_threshold")
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ func From(c *config.Config) *Config {
|
|||
return (*Config)(c)
|
||||
}
|
||||
|
||||
// Size returns value of "size" config parameter.
|
||||
// Size returns the value of "size" config parameter.
|
||||
//
|
||||
// Returns SizeDefault if value is not a positive number.
|
||||
// Returns SizeDefault if the value is not a positive number.
|
||||
func (x *Config) Size() uint64 {
|
||||
s := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -44,9 +44,9 @@ func (x *Config) Size() uint64 {
|
|||
return SizeDefault
|
||||
}
|
||||
|
||||
// ShallowDepth returns value of "depth" config parameter.
|
||||
// ShallowDepth returns the value of "depth" config parameter.
|
||||
//
|
||||
// Returns ShallowDepthDefault if value is not a positive number.
|
||||
// Returns ShallowDepthDefault if the value is not a positive number.
|
||||
func (x *Config) ShallowDepth() uint64 {
|
||||
d := config.UintSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -60,9 +60,9 @@ func (x *Config) ShallowDepth() uint64 {
|
|||
return ShallowDepthDefault
|
||||
}
|
||||
|
||||
// ShallowWidth returns value of "width" config parameter.
|
||||
// ShallowWidth returns the value of "width" config parameter.
|
||||
//
|
||||
// Returns ShallowWidthDefault if value is not a positive number.
|
||||
// Returns ShallowWidthDefault if the value is not a positive number.
|
||||
func (x *Config) ShallowWidth() uint64 {
|
||||
d := config.UintSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -76,9 +76,9 @@ func (x *Config) ShallowWidth() uint64 {
|
|||
return ShallowWidthDefault
|
||||
}
|
||||
|
||||
// OpenedCacheSize returns value of "opened_cache_capacity" config parameter.
|
||||
// OpenedCacheSize returns the value of "opened_cache_capacity" config parameter.
|
||||
//
|
||||
// Returns OpenedCacheSizeDefault if value is not a positive number.
|
||||
// Returns OpenedCacheSizeDefault if the value is not a positive number.
|
||||
func (x *Config) OpenedCacheSize() int {
|
||||
d := config.IntSafe(
|
||||
(*config.Config)(x),
|
||||
|
|
|
@ -29,9 +29,9 @@ func From(c *config.Config) *Config {
|
|||
return (*Config)(c)
|
||||
}
|
||||
|
||||
// Path returns value of "path" config parameter.
|
||||
// Path returns the value of "path" config parameter.
|
||||
//
|
||||
// Panics if value is not a non-empty string.
|
||||
// Panics if the value is not a non-empty string.
|
||||
func (x *Config) Path() string {
|
||||
p := config.String(
|
||||
(*config.Config)(x),
|
||||
|
@ -45,9 +45,9 @@ func (x *Config) Path() string {
|
|||
return p
|
||||
}
|
||||
|
||||
// Perm returns value of "perm" config parameter as a fs.FileMode.
|
||||
// Perm returns the value of "perm" config parameter as a fs.FileMode.
|
||||
//
|
||||
// Returns PermDefault if value is not a non-zero number.
|
||||
// Returns PermDefault if the value is not a non-zero number.
|
||||
func (x *Config) Perm() fs.FileMode {
|
||||
p := config.UintSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -61,9 +61,9 @@ func (x *Config) Perm() fs.FileMode {
|
|||
return fs.FileMode(p)
|
||||
}
|
||||
|
||||
// ShallowDepth returns value of "depth" config parameter.
|
||||
// ShallowDepth returns the value of "depth" config parameter.
|
||||
//
|
||||
// Returns ShallowDepthDefault if value is out of
|
||||
// Returns ShallowDepthDefault if the value is out of
|
||||
// [1:fstree.MaxDepth] range.
|
||||
func (x *Config) ShallowDepth() int {
|
||||
d := config.IntSafe(
|
||||
|
@ -78,9 +78,9 @@ func (x *Config) ShallowDepth() int {
|
|||
return ShallowDepthDefault
|
||||
}
|
||||
|
||||
// Compress returns value of "compress" config parameter.
|
||||
// Compress returns the value of "compress" config parameter.
|
||||
//
|
||||
// Returns false if value is not a valid bool.
|
||||
// Returns false if the value is not a valid bool.
|
||||
func (x *Config) Compress() bool {
|
||||
return config.BoolSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -88,18 +88,18 @@ func (x *Config) Compress() bool {
|
|||
)
|
||||
}
|
||||
|
||||
// UncompressableContentTypes returns value of "compress_skip_content_types" config parameter.
|
||||
// UncompressableContentTypes returns the value of "compress_skip_content_types" config parameter.
|
||||
//
|
||||
// Returns nil if a value is missing or is invalid.
|
||||
// Returns nil if a the value is missing or is invalid.
|
||||
func (x *Config) UncompressableContentTypes() []string {
|
||||
return config.StringSliceSafe(
|
||||
(*config.Config)(x),
|
||||
"compression_exclude_content_types")
|
||||
}
|
||||
|
||||
// SmallSizeLimit returns value of "small_object_size" config parameter.
|
||||
// SmallSizeLimit returns the value of "small_object_size" config parameter.
|
||||
//
|
||||
// Returns SmallSizeLimitDefault if value is not a positive number.
|
||||
// Returns SmallSizeLimitDefault if the value is not a positive number.
|
||||
func (x *Config) SmallSizeLimit() uint64 {
|
||||
l := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
|
|
@ -52,9 +52,9 @@ func (x *Config) GC() *gcconfig.Config {
|
|||
)
|
||||
}
|
||||
|
||||
// RefillMetabase returns value of "resync_metabase" config parameter.
|
||||
// RefillMetabase returns the value of "resync_metabase" config parameter.
|
||||
//
|
||||
// Returns false if value is not a valid bool.
|
||||
// Returns false if the value is not a valid bool.
|
||||
func (x *Config) RefillMetabase() bool {
|
||||
return config.BoolSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -62,9 +62,9 @@ func (x *Config) RefillMetabase() bool {
|
|||
)
|
||||
}
|
||||
|
||||
// Mode return value of "mode" config parameter.
|
||||
// Mode return the value of "mode" config parameter.
|
||||
//
|
||||
// Panics if read value is not one of predefined
|
||||
// Panics if read the value is not one of predefined
|
||||
// shard modes.
|
||||
func (x *Config) Mode() (m shard.Mode) {
|
||||
s := config.StringSafe(
|
||||
|
|
|
@ -24,10 +24,10 @@ func From(c *config.Config) *Config {
|
|||
return (*Config)(c)
|
||||
}
|
||||
|
||||
// RemoverBatchSize returns value of "remover_batch_size"
|
||||
// RemoverBatchSize returns the value of "remover_batch_size"
|
||||
// config parameter.
|
||||
//
|
||||
// Returns RemoverBatchSizeDefault if value is not a positive number.
|
||||
// Returns RemoverBatchSizeDefault if the value is not a positive number.
|
||||
func (x *Config) RemoverBatchSize() int {
|
||||
s := config.IntSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -41,10 +41,10 @@ func (x *Config) RemoverBatchSize() int {
|
|||
return RemoverBatchSizeDefault
|
||||
}
|
||||
|
||||
// RemoverSleepInterval returns value of "remover_sleep_interval"
|
||||
// RemoverSleepInterval returns the value of "remover_sleep_interval"
|
||||
// config parameter.
|
||||
//
|
||||
// Returns RemoverSleepIntervalDefault if value is not a positive number.
|
||||
// Returns RemoverSleepIntervalDefault if the value is not a positive number.
|
||||
func (x *Config) RemoverSleepInterval() time.Duration {
|
||||
s := config.DurationSafe(
|
||||
(*config.Config)(x),
|
||||
|
|
|
@ -21,9 +21,9 @@ func From(c *config.Config) *Config {
|
|||
return (*Config)(c)
|
||||
}
|
||||
|
||||
// Path returns value of "path" config parameter.
|
||||
// Path returns the value of "path" config parameter.
|
||||
//
|
||||
// Panics if value is not a non-empty string.
|
||||
// Panics if the value is not a non-empty string.
|
||||
func (x *Config) Path() string {
|
||||
p := config.String(
|
||||
(*config.Config)(x),
|
||||
|
@ -37,9 +37,9 @@ func (x *Config) Path() string {
|
|||
return p
|
||||
}
|
||||
|
||||
// Perm returns value of "perm" config parameter as a fs.FileMode.
|
||||
// Perm returns the value of "perm" config parameter as a fs.FileMode.
|
||||
//
|
||||
// Returns PermDefault if value is not a positive number.
|
||||
// Returns PermDefault if the value is not a positive number.
|
||||
func (x *Config) Perm() fs.FileMode {
|
||||
p := config.UintSafe(
|
||||
(*config.Config)(x),
|
||||
|
|
|
@ -33,14 +33,14 @@ func From(c *config.Config) *Config {
|
|||
|
||||
// Enabled returns true if write-cache is enabled and false otherwise.
|
||||
//
|
||||
// Panics if value is not a boolean.
|
||||
// Panics if the value is not a boolean.
|
||||
func (x *Config) Enabled() bool {
|
||||
return config.Bool((*config.Config)(x), "enabled")
|
||||
}
|
||||
|
||||
// Path returns value of "path" config parameter.
|
||||
// Path returns the value of "path" config parameter.
|
||||
//
|
||||
// Panics if value is not a non-empty string.
|
||||
// Panics if the value is not a non-empty string.
|
||||
func (x *Config) Path() string {
|
||||
p := config.String(
|
||||
(*config.Config)(x),
|
||||
|
@ -54,9 +54,9 @@ func (x *Config) Path() string {
|
|||
return p
|
||||
}
|
||||
|
||||
// MemSize returns value of "memcache_capacity" config parameter.
|
||||
// MemSize returns the value of "memcache_capacity" config parameter.
|
||||
//
|
||||
// Returns MemSizeDefault if value is not a positive number.
|
||||
// Returns MemSizeDefault if the value is not a positive number.
|
||||
func (x *Config) MemSize() uint64 {
|
||||
s := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -70,9 +70,9 @@ func (x *Config) MemSize() uint64 {
|
|||
return MemSizeDefault
|
||||
}
|
||||
|
||||
// SmallObjectSize returns value of "small_object_size" config parameter.
|
||||
// SmallObjectSize returns the value of "small_object_size" config parameter.
|
||||
//
|
||||
// Returns SmallSizeDefault if value is not a positive number.
|
||||
// Returns SmallSizeDefault if the value is not a positive number.
|
||||
func (x *Config) SmallObjectSize() uint64 {
|
||||
s := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -86,9 +86,9 @@ func (x *Config) SmallObjectSize() uint64 {
|
|||
return SmallSizeDefault
|
||||
}
|
||||
|
||||
// MaxObjectSize returns value of "max_object_size" config parameter.
|
||||
// MaxObjectSize returns the value of "max_object_size" config parameter.
|
||||
//
|
||||
// Returns MaxSizeDefault if value is not a positive number.
|
||||
// Returns MaxSizeDefault if the value is not a positive number.
|
||||
func (x *Config) MaxObjectSize() uint64 {
|
||||
s := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -102,9 +102,9 @@ func (x *Config) MaxObjectSize() uint64 {
|
|||
return MaxSizeDefault
|
||||
}
|
||||
|
||||
// WorkersNumber returns value of "workers_number" config parameter.
|
||||
// WorkersNumber returns the value of "workers_number" config parameter.
|
||||
//
|
||||
// Returns WorkersNumberDefault if value is not a positive number.
|
||||
// Returns WorkersNumberDefault if the value is not a positive number.
|
||||
func (x *Config) WorkersNumber() int {
|
||||
c := config.IntSafe(
|
||||
(*config.Config)(x),
|
||||
|
@ -118,9 +118,9 @@ func (x *Config) WorkersNumber() int {
|
|||
return WorkersNumberDefault
|
||||
}
|
||||
|
||||
// SizeLimit returns value of "capacity" config parameter.
|
||||
// SizeLimit returns the value of "capacity" config parameter.
|
||||
//
|
||||
// Returns SizeLimitDefault if value is not a positive number.
|
||||
// Returns SizeLimitDefault if the value is not a positive number.
|
||||
func (x *Config) SizeLimit() uint64 {
|
||||
c := config.SizeInBytesSafe(
|
||||
(*config.Config)(x),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue