parsers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONKeys

func NewJSONKeys(uri, method, time, responseTime, size, status string) *statKeys

func NewLTSVLabel

func NewLTSVLabel(uri, method, time, responseTime, size, status string) *statKeys

func NewSubexpNames

func NewSubexpNames(uri, method, time, responseTime, size, status string) *statKeys

Types

type JSONParser

type JSONParser struct {
	// contains filtered or unexported fields
}

func (*JSONParser) Parse

func (j *JSONParser) Parse() (*ParsedHTTPStat, error)

func (*JSONParser) ReadBytes

func (j *JSONParser) ReadBytes() int

func (*JSONParser) Seek

func (j *JSONParser) Seek(n int) error

func (*JSONParser) SetReadBytes

func (j *JSONParser) SetReadBytes(n int)

type LTSVParser

type LTSVParser struct {
	// contains filtered or unexported fields
}

func (*LTSVParser) Parse

func (l *LTSVParser) Parse() (*ParsedHTTPStat, error)

func (*LTSVParser) ReadBytes

func (l *LTSVParser) ReadBytes() int

func (*LTSVParser) Seek

func (l *LTSVParser) Seek(n int) error

func (*LTSVParser) SetReadBytes

func (l *LTSVParser) SetReadBytes(n int)

type ParsedHTTPStat

type ParsedHTTPStat struct {
	Uri          string
	Method       string
	Time         string
	ResponseTime float64
	BodyBytes    float64
	Status       int
}

func NewParsedHTTPStat

func NewParsedHTTPStat(uri, method, time string, resTime, bodyBytes float64, status int) *ParsedHTTPStat

type Parser

type Parser interface {
	Parse() (*ParsedHTTPStat, error)
	ReadBytes() int
	SetReadBytes(n int)
	Seek(n int) error
}

func NewJSONParser

func NewJSONParser(r io.Reader, keys *statKeys, query bool) Parser

func NewLTSVParser

func NewLTSVParser(r io.Reader, l *statKeys, query bool) Parser

func NewRegexpParser

func NewRegexpParser(r io.Reader, expr string, names *statKeys, query bool) (Parser, error)

type RegexpParser

type RegexpParser struct {
	// contains filtered or unexported fields
}

func (*RegexpParser) Parse

func (rp *RegexpParser) Parse() (*ParsedHTTPStat, error)

func (*RegexpParser) ReadBytes

func (rp *RegexpParser) ReadBytes() int

func (*RegexpParser) Seek

func (rp *RegexpParser) Seek(n int) error

func (*RegexpParser) SetReadBytes

func (rp *RegexpParser) SetReadBytes(n int)

Jump to

Keyboard shortcuts

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