mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-09 21:49:39 -05:00
chore: make reg cache expiry tunable
Mostly for the tests, opts: - tuning.register_cache_expiration - tuning.register_cache_cleanup
This commit is contained in:
@@ -235,6 +235,8 @@ type Tuning struct {
|
||||
BatchChangeDelay time.Duration
|
||||
NodeMapSessionBufferedChanSize int
|
||||
BatcherWorkers int
|
||||
RegisterCacheCleanup time.Duration
|
||||
RegisterCacheExpiration time.Duration
|
||||
}
|
||||
|
||||
func validatePKCEMethod(method string) error {
|
||||
@@ -1002,6 +1004,8 @@ func LoadServerConfig() (*Config, error) {
|
||||
}
|
||||
return DefaultBatcherWorkers()
|
||||
}(),
|
||||
RegisterCacheCleanup: viper.GetDuration("tuning.register_cache_cleanup"),
|
||||
RegisterCacheExpiration: viper.GetDuration("tuning.register_cache_expiration"),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user