feat(cluster_config): change field from int to float64

This is modified for better flexibility, especially for testing.
This commit is contained in:
Yicheng Qin
2014-05-12 22:42:18 -04:00
parent 5367c1c998
commit c0027bfc78
6 changed files with 73 additions and 22 deletions

View File

@ -206,10 +206,10 @@ func (ps *PeerServer) setClusterConfigHttpHandler(w http.ResponseWriter, req *ht
config.ActiveSize = int(activeSize)
}
if removeDelay, ok := m["removeDelay"].(float64); ok {
config.RemoveDelay = int(removeDelay)
config.RemoveDelay = removeDelay
}
if syncInterval, ok := m["syncInterval"].(float64); ok {
config.SyncInterval = int(syncInterval)
config.SyncInterval = syncInterval
}
// Issue command to update.