parser

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 15 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 ParserStorage, exporter storage.MetricsExporter) *Parser

func (*Parser) Put

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

Put takes parser.PutInput, turns it into storage.PutIntput and enqueues it for a write

type ParserStorage

type ParserStorage interface {
	storage.Putter
	storage.Enqueuer
}

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           string
	AggregationType string
}

Jump to

Keyboard shortcuts

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