NewIndexStat ensures that all index stats have the same shape and 0 values to prevent seeing N/A in ns_server UI
()
| 194 | // have the same shape and 0 values to |
| 195 | // prevent seeing N/A in ns_server UI |
| 196 | func NewIndexStat() map[string]interface{} { |
| 197 | rv := make(map[string]interface{}) |
| 198 | for _, key := range statkeys { |
| 199 | rv[key] = float64(0) |
| 200 | } |
| 201 | return rv |
| 202 | } |
| 203 | |
| 204 | func getRecentInfo() *recentInfo { |
| 205 | return (*recentInfo)(atomic.LoadPointer(&lastRecentInfo)) |