feat(usage stats): added data source count stats

This commit is contained in:
Torkel Ödegaard
2015-09-29 13:47:56 +02:00
parent 8a39b32b5c
commit c816ed2527
4 changed files with 68 additions and 7 deletions
+21
View File
@@ -12,6 +12,8 @@ const (
DS_ES = "elasticsearch"
DS_OPENTSDB = "opentsdb"
DS_CLOUDWATCH = "cloudwatch"
DS_KAIROSDB = "kairosdb"
DS_PROMETHEUS = "prometheus"
DS_ACCESS_DIRECT = "direct"
DS_ACCESS_PROXY = "proxy"
)
@@ -45,6 +47,25 @@ type DataSource struct {
Updated time.Time
}
func IsStandardDataSource(dsType string) bool {
switch dsType {
case DS_ES:
return true
case DS_INFLUXDB:
return true
case DS_OPENTSDB:
return true
case DS_CLOUDWATCH:
return true
case DS_PROMETHEUS:
return true
case DS_GRAPHITE:
return true
default:
return false
}
}
// ----------------------
// COMMANDS