code cleanup
This commit is contained in:
@@ -39,12 +39,6 @@ type Config struct {
|
||||
|
||||
// Mount configuration
|
||||
MountsDir string // Path to mounts configuration (default: /meta-core/mounts)
|
||||
|
||||
// Cache configuration
|
||||
CacheEnabled bool // Enable WebDAV caching (default: true)
|
||||
CachePath string // Path to cache directory (default: /meta-core/cache)
|
||||
CacheMaxSizeGB int // Maximum cache size in GB (default: 100)
|
||||
CacheTTLSeconds int // Cache entry TTL in seconds (default: 3600)
|
||||
}
|
||||
|
||||
// Load creates a Config from environment variables
|
||||
@@ -72,12 +66,6 @@ func Load() *Config {
|
||||
// Set mounts directory
|
||||
cfg.MountsDir = cfg.MetaCorePath + "/mounts"
|
||||
|
||||
// Set cache configuration
|
||||
cfg.CacheEnabled = getEnvBool("CACHE_ENABLED", true)
|
||||
cfg.CachePath = getEnv("CACHE_PATH", cfg.MetaCorePath+"/cache")
|
||||
cfg.CacheMaxSizeGB = getEnvInt("CACHE_MAX_SIZE_GB", 100)
|
||||
cfg.CacheTTLSeconds = getEnvInt("CACHE_TTL_SECONDS", 3600)
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
@@ -111,16 +99,6 @@ func (c *Config) MountsErrorDir() string {
|
||||
return c.MountsDir + "/errors"
|
||||
}
|
||||
|
||||
// CacheDir returns the path to the cache directory
|
||||
func (c *Config) CacheDir() string {
|
||||
return c.CachePath
|
||||
}
|
||||
|
||||
// CacheIndexPath returns the path to the cache index file
|
||||
func (c *Config) CacheIndexPath() string {
|
||||
return c.CachePath + "/cache-index.json"
|
||||
}
|
||||
|
||||
// WatchersFilePath returns the path to the watchers configuration file
|
||||
func (c *Config) WatchersFilePath() string {
|
||||
return c.MetaCorePath + "/watchers.json"
|
||||
|
||||
Reference in New Issue
Block a user