@@ -29,7 +29,7 @@ import (
29
29
30
30
// Decoder types decode an input stream into metric families.
31
31
type Decoder interface {
32
- Decode (* dto.MetricFamily , model.NameValidationScheme ) error
32
+ Decode (* dto.MetricFamily , model.ValidationScheme ) error
33
33
}
34
34
35
35
// DecodeOptions contains options used by the Decoder and in sample extraction.
@@ -86,7 +86,7 @@ type protoDecoder struct {
86
86
}
87
87
88
88
// Decode implements the Decoder interface.
89
- func (d * protoDecoder ) Decode (v * dto.MetricFamily , nameValidationScheme model.NameValidationScheme ) error {
89
+ func (d * protoDecoder ) Decode (v * dto.MetricFamily , nameValidationScheme model.ValidationScheme ) error {
90
90
opts := protodelim.UnmarshalOptions {
91
91
MaxSize : - 1 ,
92
92
}
@@ -123,7 +123,7 @@ type textDecoder struct {
123
123
}
124
124
125
125
// Decode implements the Decoder interface.
126
- func (d * textDecoder ) Decode (v * dto.MetricFamily , _ model.NameValidationScheme ) error {
126
+ func (d * textDecoder ) Decode (v * dto.MetricFamily , _ model.ValidationScheme ) error {
127
127
if d .err == nil {
128
128
// Read all metrics in one shot.
129
129
var p TextParser
@@ -156,7 +156,7 @@ type SampleDecoder struct {
156
156
157
157
// Decode calls the Decode method of the wrapped Decoder and then extracts the
158
158
// samples from the decoded MetricFamily into the provided model.Vector.
159
- func (sd * SampleDecoder ) Decode (s * model.Vector , nameValidationScheme model.NameValidationScheme ) error {
159
+ func (sd * SampleDecoder ) Decode (s * model.Vector , nameValidationScheme model.ValidationScheme ) error {
160
160
err := sd .Dec .Decode (& sd .f , nameValidationScheme )
161
161
if err != nil {
162
162
return err
0 commit comments