stats_options

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSortOption         = "max"
	DefaultApptimeLabelOption = "apptime"
	DefaultReqtimeLabelOption = "reqtime"
	DefaultStatusLabelOption  = "status"
	DefaultSizeLabelOption    = "size"
	DefaultMethodLabelOption  = "method"
	DefaultUriLabelOption     = "uri"
	DefaultTimeLabelOption    = "time"
	DefaultLimitOption        = 5000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func Aggregates

func Aggregates(values []string) Option

func ApptimeLabel

func ApptimeLabel(s string) Option

func CSVAggregates

func CSVAggregates(csv string) Option

func CSVExcludeStatuses

func CSVExcludeStatuses(csv string) Option

func CSVExcludes

func CSVExcludes(csv string) Option

func CSVIncludeStatuses

func CSVIncludeStatuses(csv string) Option

func CSVIncludes

func CSVIncludes(csv string) Option

func EndTime

func EndTime(s string) Option

func EndTimeDuration

func EndTimeDuration(s string) Option

func ExcludeStatuses

func ExcludeStatuses(values []string) Option

func Excludes

func Excludes(values []string) Option

func File

func File(s string) Option

func IncludeStatuses

func IncludeStatuses(values []string) Option

func Includes

func Includes(values []string) Option

func Limit

func Limit(i int) Option

func Location

func Location(s string) Option

func MethodLabel

func MethodLabel(s string) Option

func NoHeaders

func NoHeaders(b bool) Option

func QueryString

func QueryString(b bool) Option

func ReqtimeLabel

func ReqtimeLabel(s string) Option

func Reverse

func Reverse(b bool) Option

func SizeLabel

func SizeLabel(s string) Option

func Sort

func Sort(s string) Option

func StartTime

func StartTime(s string) Option

func StartTimeDuration

func StartTimeDuration(s string) Option

func StatusLabel

func StatusLabel(s string) Option

func TimeLabel

func TimeLabel(s string) Option

func Tsv

func Tsv(b bool) Option

func UriLabel

func UriLabel(s string) Option

type Options

type Options struct {
	File              string   `yaml:"file"`
	Sort              string   `yaml:"sort"`
	Reverse           bool     `yaml:"reverse"`
	QueryString       bool     `yaml:"query_string"`
	Tsv               bool     `yaml:"tsv"`
	NoHeaders         bool     `yaml:no_headers`
	ApptimeLabel      string   `yaml:"apptime_label"`
	ReqtimeLabel      string   `yaml:"reqtime_label"`
	StatusLabel       string   `yaml:"status_label"`
	SizeLabel         string   `yaml:"size_label"`
	MethodLabel       string   `yaml:"method_label"`
	UriLabel          string   `yaml:"uri_label"`
	TimeLabel         string   `yaml:"time_label"`
	Limit             int      `yaml:"limit"`
	Includes          []string `yaml:"includes"`
	Excludes          []string `yaml:"excludes"`
	IncludeStatuses   []string `yaml:"include_statuses"`
	ExcludeStatuses   []string `yaml:"exclude_statuses"`
	Aggregates        []string `yaml:"aggregates"`
	StartTime         string   `yaml:"start_time"`
	EndTime           string   `yaml:"end_time"`
	StartTimeDuration string   `yaml:"start_time_duration"`
	EndTimeDuration   string   `yaml:"end_time_duration"`
	Location          string   `yaml:location`
}

func LoadOptionsFromReader

func LoadOptionsFromReader(r io.Reader) (*Options, error)

func NewOptions

func NewOptions(opt ...Option) *Options

func SetOptions

func SetOptions(options *Options, opt ...Option) *Options

Jump to

Keyboard shortcuts

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