Move Handler interface into machine where it is used
This commit is contained in:
parent
0c1293ad5e
commit
38ec968b0b
File diff suppressed because it is too large
Load Diff
|
@ -225,6 +225,17 @@ align :=
|
|||
|
||||
%% write data;
|
||||
|
||||
type Handler interface {
|
||||
SetMeasurement(name []byte)
|
||||
AddTag(key []byte, value []byte)
|
||||
AddInt(key []byte, value []byte)
|
||||
AddUint(key []byte, value []byte)
|
||||
AddFloat(key []byte, value []byte)
|
||||
AddString(key []byte, value []byte)
|
||||
AddBool(key []byte, value []byte)
|
||||
SetTimestamp(tm []byte)
|
||||
}
|
||||
|
||||
type machine struct {
|
||||
data []byte
|
||||
cs int
|
||||
|
|
|
@ -15,18 +15,6 @@ var (
|
|||
ErrNoMetric = errors.New("no metric in line")
|
||||
)
|
||||
|
||||
type Handler interface {
|
||||
SetMeasurement(name []byte)
|
||||
AddTag(key []byte, value []byte)
|
||||
AddInt(key []byte, value []byte)
|
||||
AddUint(key []byte, value []byte)
|
||||
AddFloat(key []byte, value []byte)
|
||||
AddString(key []byte, value []byte)
|
||||
AddBool(key []byte, value []byte)
|
||||
SetTimestamp(tm []byte)
|
||||
Reset()
|
||||
}
|
||||
|
||||
type ParseError struct {
|
||||
Offset int
|
||||
msg string
|
||||
|
|
Loading…
Reference in New Issue