Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreIdenticalSeriesFast ¶
AreIdenticalSeriesFast returns true if s1 and s2 contains identical Prometheus series with possible different values.
This function is optimized for speed.
func GetRowsDiff ¶
GetRowsDiff returns rows from s1, which are missing in s2.
The returned rows have default value 0 and have no timestamps.
func ParseStream ¶
func ParseStream(r io.Reader, defaultTimestamp int64, isGzipped bool, callback func(rows []Row) error, errLogger func(string)) error
ParseStream parses lines with Prometheus exposition format from r and calls callback for the parsed rows.
The callback can be called concurrently multiple times for streamed data from r.
callback shouldn't hold rows after returning.
Types ¶
type Rows ¶
type Rows struct { Rows []Row // contains filtered or unexported fields }
Rows contains parsed Prometheus rows.
func (*Rows) Unmarshal ¶
Unmarshal unmarshals Prometheus exposition text rows from s.
s shouldn't be modified while rs is in use.
func (*Rows) UnmarshalWithErrLogger ¶
UnmarshalWithErrLogger unmarshal Prometheus exposition text rows from s.
It calls errLogger for logging parsing errors.
s shouldn't be modified while rs is in use.