Documentation ¶
Index ¶
Constants ¶
const ( // MemSizeDefault is a default memory size. MemSizeDefault = 1 << 30 // SmallSizeDefault is a default size of small objects. SmallSizeDefault = 32 << 10 // MaxSizeDefault is a default value of the object payload size limit. MaxSizeDefault = 64 << 20 // WorkersNumberDefault is a default number of workers. WorkersNumberDefault = 20 // SizeLimitDefault is a default write-cache size limit. SizeLimitDefault = 1 << 30 )
config defaults
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config is a wrapper over the config section which provides access to WriteCache configurations.
func (*Config) Enabled ¶ added in v0.27.5
Enabled returns true if write-cache is enabled and false otherwise.
Panics if value is not a boolean.
func (*Config) MaxObjectSize ¶
MaxObjectSize returns value of "max_object_size" config parameter.
Returns MaxSizeDefault if value is not a positive number.
func (*Config) MemSize ¶
MemSize returns value of "memcache_capacity" config parameter.
Returns MemSizeDefault if value is not a positive number.
func (*Config) Path ¶
Path returns value of "path" config parameter.
Panics if value is not a non-empty string.
func (*Config) SizeLimit ¶ added in v0.25.0
SizeLimit returns value of "capacity" config parameter.
Returns SizeLimitDefault if value is not a positive number.
func (*Config) SmallObjectSize ¶
SmallObjectSize returns value of "small_object_size" config parameter.
Returns SmallSizeDefault if value is not a positive number.
func (*Config) WorkersNumber ¶
WorkersNumber returns value of "workers_number" config parameter.
Returns WorkersNumberDefault if value is not a positive number.