Add stream health overview collection + apis

This commit is contained in:
Gabe Kangas
2022-03-24 23:06:47 -07:00
parent 729de44fce
commit 410b413b84
8 changed files with 210 additions and 56 deletions

View File

@ -318,7 +318,7 @@ func FindInSlice(slice []string, val string) (int, bool) {
return -1, false
}
// StringSliceToMap is a convinience function to convert a slice of strings into
// StringSliceToMap is a convenience function to convert a slice of strings into
// a map using the string as the key.
func StringSliceToMap(stringSlice []string) map[string]interface{} {
stringMap := map[string]interface{}{}
@ -330,6 +330,17 @@ func StringSliceToMap(stringSlice []string) map[string]interface{} {
return stringMap
}
// Float64MapToSlice is a convenience function to convert a map of floats into.
func Float64MapToSlice(float64Map map[string]float64) []float64 {
float64Slice := []float64{}
for _, val := range float64Map {
float64Slice = append(float64Slice, val)
}
return float64Slice
}
// StringMapKeys returns a slice of string keys from a map.
func StringMapKeys(stringMap map[string]interface{}) []string {
stringSlice := []string{}