feat: reload cluster node settings from settings file #169

This commit is contained in:
Jacky 2024-05-08 15:32:45 +08:00
parent 29f1b7db89
commit e0366f949f
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
13 changed files with 110 additions and 34 deletions

View file

@ -7,3 +7,13 @@ type Cluster struct {
var ClusterSettings = Cluster{
Node: []string{},
}
func ReloadCluster() (err error) {
err = load()
if err != nil {
return err
}
return mapTo("cluster", &ClusterSettings)
}