grafana/pkg/tsdb/cloud-monitoring/preprocessor.go
Andreas Christou 108acee08e
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
2023-05-22 17:19:54 +01:00

23 lines
440 B
Go

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
}
}