Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser encapsulates the config for parsing payloads to metrics.
func NewParser ¶
func NewParser(opts *configpb.OutputMetricsOptions, ptype, probeName string, defaultKind metrics.Kind, l *logger.Logger) (*Parser, error)
NewParser returns a new payload parser, based on the config provided.
func (*Parser) PayloadMetrics ¶
func (p *Parser) PayloadMetrics(em *metrics.EventMetrics, payload, target string) *metrics.EventMetrics
PayloadMetrics parses the given payload and either updates the provided metrics (if we are aggregating in cloudprober) or returns new metrics (if not aggregating or provided metrics are nil)
Click to show internal directories.
Click to hide internal directories.