cleanup
This commit is contained in:
parent
3d47c80446
commit
49f613ddeb
15 changed files with 98 additions and 234 deletions
6
init.go
6
init.go
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue