parser

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package parser deals with parsing various incoming formats

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
}

func New

func New(log *logrus.Logger, s storage.Putter, exporter storage.MetricsExporter) *Parser

func (*Parser) Put

func (p *Parser) Put(ctx context.Context, in *PutInput) error

Put takes parser.PutInput, turns it into storage.PutIntput and passes it to Putter.

type PutInput

type PutInput struct {
	Format            string
	ContentType       string
	Body              io.Reader
	MultipartBoundary string

	// these parameters are the same as the ones in storage.PutInput
	StartTime       time.Time
	EndTime         time.Time
	Key             *segment.Key
	SpyName         string
	SampleRate      uint32
	Units           metadata.Units
	AggregationType metadata.AggregationType
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL