Documentation
¶
Index ¶
- Constants
- Variables
- type JSONOptions
- type LTSVOptions
- type Option
- func ApptimeLabel(s string) Option
- func BodyBytesKey(s string) Option
- func BodyBytesSubexp(s string) Option
- func CSVGroups(csv string) Option
- func DecodeUri(b bool) Option
- func Dump(s string) Option
- func File(s string) Option
- func Filters(s string) Option
- func Format(s string) Option
- func Limit(i int) Option
- func Load(s string) Option
- func Location(s string) Option
- func MatchingGroups(values []string) Option
- func MethodKey(s string) Option
- func MethodLabel(s string) Option
- func MethodSubexp(s string) Option
- func NoHeaders(b bool) Option
- func NoSavePos(b bool) Option
- func Output(s string) Option
- func PaginationLimit(i int) Option
- func Pattern(s string) Option
- func PcapServerIPs(ss []string) Option
- func PcapServerPort(n uint16) Option
- func Percentiles(i []int) Option
- func PosFile(s string) Option
- func QueryString(b bool) Option
- func QueryStringIgnoreValues(b bool) Option
- func ReqtimeLabel(s string) Option
- func RequestTimeKey(s string) Option
- func RequestTimeSubexp(s string) Option
- func ResponseTimeKey(s string) Option
- func ResponseTimeSubexp(s string) Option
- func Reverse(b bool) Option
- func ShowFooters(b bool) Option
- func SizeLabel(s string) Option
- func Sort(s string) Option
- func StatusKey(s string) Option
- func StatusLabel(s string) Option
- func StatusSubexp(s string) Option
- func TimeKey(s string) Option
- func TimeLabel(s string) Option
- func TimeSubexp(s string) Option
- func UriKey(s string) Option
- func UriLabel(s string) Option
- func UriSubexp(s string) Option
- type Options
- type PcapOptions
- type RegexpOptions
Constants ¶
View Source
const ( DefaultSortOption = "count" DefaultFormatOption = "table" DefaultLimitOption = 5000 DefaultLocationOption = "Local" DefaultOutputOption = "all" DefaultPaginationLimit = 100 // ltsv DefaultApptimeLabelOption = "apptime" DefaultReqtimeLabelOption = "reqtime" DefaultStatusLabelOption = "status" DefaultSizeLabelOption = "size" DefaultMethodLabelOption = "method" DefaultUriLabelOption = "uri" DefaultTimeLabelOption = "time" // json DefaultUriKeyOption = "uri" DefaultMethodKeyOption = "method" DefaultTimeKeyOption = "time" DefaultResponseTimeKeyOption = "response_time" DefaultRequestTimeKeyOption = "request_time" DefaultBodyBytesKeyOption = "body_bytes" DefaultStatusKeyOption = "status" // regexp DefaultPatternOption = `^(\S+)\s` + `\S+\s+` + `(\S+\s+)+` + `\[(?P<time>[^]]+)\]\s` + `"(?P<method>\S*)\s?` + `(?P<uri>(?:[^"]*(?:\\")?)*)\s` + `([^"]*)"\s` + `(?P<status>\S+)\s` + `(?P<body_bytes>\S+)\s` + `"((?:[^"]*(?:\\")?)*)"\s` + `"(?:.+)"` + `\s(?P<response_time>\S+)(?:\s(?P<request_time>\S+))?$` DefaultUriSubexpOption = "uri" DefaultMethodSubexpOption = "method" DefaultTimeSubexpOption = "time" DefaultResponseTimeSubexpOption = "response_time" DefaultRequestTimeSubexpOption = "request_time" DefaultBodyBytesSubexpOption = "body_bytes" DefaultStatusSubexpOption = "status" // pcap DefaultPcapServerPortOption = 80 )
Variables ¶
View Source
var DefaultPcapServerIPsOption = getDefaultPcapServerIPsOption()
View Source
var DefaultPercentilesOption = []int{90, 95, 99}
Functions ¶
This section is empty.
Types ¶
type JSONOptions ¶
type JSONOptions struct { UriKey string `yaml:"uri_key"` MethodKey string `yaml:"method_key"` TimeKey string `yaml:"time_key"` ResponseTimeKey string `yaml:"response_time_key"` RequestTimeKey string `yaml:"request_time_key"` BodyBytesKey string `yaml:"body_bytes_key"` StatusKey string `yaml:"status_key"` }
type LTSVOptions ¶
type LTSVOptions struct { 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"` }
type Option ¶
type Option func(*Options)
func BodyBytesKey ¶
func BodyBytesSubexp ¶
func MatchingGroups ¶
func MethodLabel ¶
func MethodSubexp ¶
func PaginationLimit ¶ added in v1.0.11
func PcapServerPort ¶ added in v1.0.6
func Percentiles ¶ added in v1.0.4
func QueryString ¶
func QueryStringIgnoreValues ¶ added in v1.0.5
func ReqtimeLabel ¶ added in v1.0.1
func RequestTimeKey ¶ added in v1.0.1
func RequestTimeSubexp ¶ added in v1.0.1
func ResponseTimeKey ¶
func ResponseTimeSubexp ¶
func ShowFooters ¶
func StatusLabel ¶
func StatusSubexp ¶
func TimeSubexp ¶
type Options ¶
type Options struct { File string `yaml:"file"` Dump string `yaml:"dump"` Load string `yaml:"dump"` Sort string `yaml:"sort"` Reverse bool `yaml:"reverse"` QueryString bool `yaml:"query_string"` QueryStringIgnoreValues bool `yaml:"query_string_ignore_values"` DecodeUri bool `yaml:"decode_uri"` Format string `yaml:"format"` NoHeaders bool `yaml:"noheaders"` Limit int `yaml:"limit"` MatchingGroups []string `yaml:"matching_groups"` Filters string `yaml:"filters"` PosFile string `yaml:"pos_file"` NoSavePos bool `yaml:"nosave_pos"` Location string `yaml:"location"` Output string `yaml:"output"` Percentiles []int `yaml:"percentiles"` PaginationLimit int `yaml:"pagination_limit"` LTSV *LTSVOptions `yaml:"ltsv"` Regexp *RegexpOptions `yaml:"regexp"` JSON *JSONOptions `yaml:"json"` Pcap *PcapOptions `yaml:"pcap"` }
func NewOptions ¶
func SetOptions ¶
type PcapOptions ¶ added in v1.0.6
type RegexpOptions ¶
type RegexpOptions struct { Pattern string `yaml:"pattern"` UriSubexp string `yaml:"uri_subexp"` MethodSubexp string `yaml:"method_subexp"` TimeSubexp string `yaml:"time_subexp"` ResponseTimeSubexp string `yaml:"response_time_subexp"` RequestTimeSubexp string `yaml:"request_time_subexp"` BodyBytesSubexp string `yaml:"body_bytes_subexp"` StatusSubexp string `yaml:"status_subexp"` }
Click to show internal directories.
Click to hide internal directories.