Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseStream ¶ added in v1.38.1
func ParseStream(r io.Reader, defaultTimestamp int64, isGzipped bool, callback func(rows []Row) error) 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. It is guaranteed that the callback isn't called after ParseStream returns.
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 ¶ added in v1.34.0
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.
Click to show internal directories.
Click to hide internal directories.