add old exported func NewJSONParser

This commit is contained in:
Max U 2018-06-28 16:00:32 -07:00
parent 674b9578d7
commit e25fbed0de
1 changed files with 13 additions and 0 deletions

View File

@ -143,6 +143,19 @@ func newJSONParser(
return parser, nil return parser, nil
} }
func NewJSONParser(
metricName string,
tagKeys []string,
defaultTags map[string]string,
) (Parser, error) {
parser := &json.JSONParser{
MetricName: metricName,
TagKeys: tagKeys,
DefaultTags: defaultTags,
}
return parser, nil
}
func NewNagiosParser() (Parser, error) { func NewNagiosParser() (Parser, error) {
return &nagios.NagiosParser{}, nil return &nagios.NagiosParser{}, nil
} }