mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 03:13:49 +08:00
CloudMonitoring: Initial GCM Schema (#67739)
* Initial GCM schema work - Split types for convenience - Update conditionals where needed - Update type references * Add additional supporting types * Add some more accessory and legacy types * Add missing type * Rename backend folder * Add missing generated file * Review
This commit is contained in:
22
pkg/tsdb/cloud-monitoring/preprocessor.go
Normal file
22
pkg/tsdb/cloud-monitoring/preprocessor.go
Normal file
@ -0,0 +1,22 @@
|
||||
package cloudmonitoring
|
||||
|
||||
type preprocessorType int
|
||||
|
||||
const (
|
||||
PreprocessorTypeNone preprocessorType = iota
|
||||
PreprocessorTypeRate
|
||||
PreprocessorTypeDelta
|
||||
)
|
||||
|
||||
func toPreprocessorType(preprocessorTypeString string) preprocessorType {
|
||||
switch preprocessorTypeString {
|
||||
case "none":
|
||||
return PreprocessorTypeNone
|
||||
case "rate":
|
||||
return PreprocessorTypeRate
|
||||
case "delta":
|
||||
return PreprocessorTypeDelta
|
||||
default:
|
||||
return PreprocessorTypeNone
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user