mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 20:54:22 -06:00
23 lines
440 B
Go
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
|
||
|
}
|
||
|
}
|