Documentation ¶
Index ¶
Constants ¶
View Source
const ( Drives = "drives" Exclude = "exclude" Expiry = "expiry" MaxUse = "maxuse" Quota = "quota" EnvCacheDrives = "MINIO_CACHE_DRIVES" EnvCacheExclude = "MINIO_CACHE_EXCLUDE" EnvCacheExpiry = "MINIO_CACHE_EXPIRY" EnvCacheMaxUse = "MINIO_CACHE_MAXUSE" EnvCacheQuota = "MINIO_CACHE_QUOTA" EnvCacheEncryptionMasterKey = "MINIO_CACHE_ENCRYPTION_MASTER_KEY" DefaultExpiry = "90" DefaultQuota = "80" )
Cache ENVs
Variables ¶
View Source
var ( DefaultKVS = config.KVS{ config.KV{ Key: Drives, Value: "", }, config.KV{ Key: Exclude, Value: "", }, config.KV{ Key: Expiry, Value: DefaultExpiry, }, config.KV{ Key: Quota, Value: DefaultQuota, }, } )
DefaultKVS - default KV settings for caching.
View Source
var ( Help = config.HelpKVS{ config.HelpKV{ Key: Drives, Description: `comma separated mountpoints e.g. "/optane1,/optane2"`, Type: "csv", }, config.HelpKV{ Key: Expiry, Description: `cache expiry duration in days e.g. "90"`, Optional: true, Type: "number", }, config.HelpKV{ Key: Quota, Description: `limit cache drive usage in percentage e.g. "90"`, Optional: true, Type: "number", }, config.HelpKV{ Key: Exclude, Description: `comma separated wildcard exclusion patterns e.g. "bucket/*.tmp,*.exe"`, Optional: true, Type: "csv", }, config.HelpKV{ Key: config.Comment, Description: config.DefaultComment, Optional: true, Type: "sentence", }, } )
Help template for caching feature.
Functions ¶
func SetCacheConfig ¶
SetCacheConfig - One time migration code needed, for migrating from older config to new for Cache.
Types ¶
type Config ¶
type Config struct { Enabled bool `json:"-"` Drives []string `json:"drives"` Expiry int `json:"expiry"` MaxUse int `json:"maxuse"` Quota int `json:"quota"` Exclude []string `json:"exclude"` }
Config represents cache config settings
func LookupConfig ¶
LookupConfig - extracts cache configuration provided by environment variables and merge them with provided CacheConfiguration.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON - implements JSON unmarshal interface for unmarshalling json entries for CacheConfig.
Click to show internal directories.
Click to hide internal directories.