Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultParser ¶
type DefaultParser struct {
// contains filtered or unexported fields
}
DefaultParser is in charge of parsing the incoming request based on the format and running the preprocessors on the format.
func NewParser ¶
func NewParser() *DefaultParser
NewParser returns a parser with the correct mapping of format and format parser.
func (*DefaultParser) AddPreprocessor ¶
func (p *DefaultParser) AddPreprocessor(pre Preprocessor)
AddPreprocessor adds a Preprocessor to the array of preprocessors.
func (DefaultParser) ParseRequest ¶
func (d DefaultParser) ParseRequest(r *http.Request, req *prompb.WriteRequest) error
ParseRequest runs the correct parser on the format of the request and runs the preprocessors on the payload afterwards.
type Preprocessor ¶
type Preprocessor interface {
Process(*http.Request, *prompb.WriteRequest) error
}
Preprocessor is used to transform the incoming write request before sending it for ingestion.
Click to show internal directories.
Click to hide internal directories.