feat(usage stats): added data source count stats
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user