This commit is contained in:
partisan 2024-10-14 22:15:38 +02:00
parent 3d47c80446
commit 49f613ddeb
15 changed files with 98 additions and 234 deletions

View file

@ -15,6 +15,7 @@ type Config struct {
WebsiteEnabled bool
LogLevel int
HardCacheDuration time.Duration
HardCacheEnabled bool
}
var defaultConfig = Config{
@ -27,6 +28,7 @@ var defaultConfig = Config{
WebsiteEnabled: true,
LogLevel: 1,
HardCacheDuration: 0,
HardCacheEnabled: false,
}
const configFilePath = "config.ini"
@ -62,6 +64,10 @@ func main() {
startElection()
}
if config.HardCacheDuration > 0 {
config.HardCacheEnabled = true
}
go startNodeClient()
runServer()