(typ clientmetric.Type)
| 141 | } |
| 142 | |
| 143 | func asMetricType(typ clientmetric.Type) proto.Stats_Metric_Type { |
| 144 | switch typ { |
| 145 | case clientmetric.TypeGauge: |
| 146 | return proto.Stats_Metric_GAUGE |
| 147 | case clientmetric.TypeCounter: |
| 148 | return proto.Stats_Metric_COUNTER |
| 149 | default: |
| 150 | panic(fmt.Sprintf("unknown metric type: %d", typ)) |
| 151 | } |
| 152 | } |