func NewSeriesParser(handler *MetricHandler) *Parser {
	return &Parser{
		machine: NewSeriesMachine(handler),
		handler: handler,
	}
}
NewSeriesParser returns a Parser than accepts a measurement and tagset
package protocol
import (
	"fmt"
	"io"
	"strings"
	"sync"
	"time"
)
const (
	maxErrorBufferSize = 1024
)
type TimeFunc func() time.Time
type ParseError struct {
	Offset     int
	LineOffset int
	LineNumber int
	Column     int
	msg        string
	buf        string
}
func (e *ParseError) Error() string {
	buffer := e.buf[e.LineOffset:]
	eol := strings.IndexAny(buffer, "\r\n")
	if eol >= 0 {
		buffer = buffer[:eol]
	}
	if len(buffer) > maxErrorBufferSize {
		buffer = buffer[:maxErrorBufferSize] + "..."
	}
	return fmt.Sprintf("metric parse error: %s at %d:%d: %q", e.msg, e.LineNumber, e.Column, buffer)
}
type Parser struct {
	DefaultTags map[string]string
	sync.Mutex
	*machine
	handler *MetricHandler
}
func NewParser(handler *MetricHandler) *Parser {
	return &Parser{
		machine: NewMachine(handler),
		handler: handler,
	}
}