Autoheal functionality
This commit is contained in:
@@ -13,6 +13,7 @@ type ConfigInterface interface {
|
||||
GetNumOfWorkers() int
|
||||
GetRefreshEverySeconds() int
|
||||
GetCacheTimeHours() int
|
||||
EnableRepair() bool
|
||||
GetPort() string
|
||||
GetDirectories() []string
|
||||
MeetsConditions(directory, fileID, fileName string) bool
|
||||
|
||||
@@ -7,4 +7,5 @@ type ZurgConfig struct {
|
||||
NumOfWorkers int `yaml:"concurrent_workers"`
|
||||
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
|
||||
CacheTimeHours int `yaml:"info_cache_time_hours"`
|
||||
CanRepair bool `yaml:"enable_repair"`
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@ func (z *ZurgConfigV1) GetCacheTimeHours() int {
|
||||
return z.CacheTimeHours
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) EnableRepair() bool {
|
||||
return z.CanRepair
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) GetDirectories() []string {
|
||||
rootDirectories := make([]string, len(z.Directories))
|
||||
i := 0
|
||||
|
||||
Reference in New Issue
Block a user