Documentation
¶
Index ¶
- Constants
- Variables
- type CountOptions
- 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 CountKeys(ss []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 TopNReverse(b bool) Option
- func TopNSort(s string) Option
- func UriKey(s string) Option
- func UriLabel(s string) Option
- func UriSubexp(s string) Option
- type Options
- type PcapOptions
- type RegexpOptions
- type TopNOptions
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 // topN DefaultTopNSortOption = "restime" )
Variables ¶
View Source
var DefaultPcapServerIPsOption = getDefaultPcapServerIPsOption()
View Source
var DefaultPercentilesOption = []int{90, 95, 99}
Functions ¶
This section is empty.
Types ¶
type CountOptions ¶ added in v1.0.17
type CountOptions struct {
Keys []string `mapstructure:"keys"`
}
type JSONOptions ¶
type JSONOptions struct { UriKey string `mapstructure:"uri_key"` MethodKey string `mapstructure:"method_key"` TimeKey string `mapstructure:"time_key"` ResponseTimeKey string `mapstructure:"response_time_key"` RequestTimeKey string `mapstructure:"request_time_key"` BodyBytesKey string `mapstructure:"body_bytes_key"` StatusKey string `mapstructure:"status_key"` }
type LTSVOptions ¶
type LTSVOptions struct { ApptimeLabel string `mapstructure:"apptime_label"` ReqtimeLabel string `mapstructure:"reqtime_label"` StatusLabel string `mapstructure:"status_label"` SizeLabel string `mapstructure:"size_label"` MethodLabel string `mapstructure:"method_label"` UriLabel string `mapstructure:"uri_label"` TimeLabel string `mapstructure:"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 ¶
func TopNReverse ¶ added in v1.0.19
type Options ¶
type Options struct { File string `mapstructure:"file"` Dump string `mapstructure:"dump"` Load string `mapstructure:"load"` Sort string `mapstructure:"sort"` Reverse bool `mapstructure:"reverse"` QueryString bool `mapstructure:"query_string"` QueryStringIgnoreValues bool `mapstructure:"query_string_ignore_values"` DecodeUri bool `mapstructure:"decode_uri"` Format string `mapstructure:"format"` NoHeaders bool `mapstructure:"noheaders"` Limit int `mapstructure:"limit"` MatchingGroups []string `mapstructure:"matching_groups"` Filters string `mapstructure:"filters"` PosFile string `mapstructure:"pos_file"` NoSavePos bool `mapstructure:"nosave_pos"` Location string `mapstructure:"location"` Output string `mapstructure:"output"` Percentiles []int `mapstructure:"percentiles"` PaginationLimit int `mapstructure:"pagination_limit"` LTSV *LTSVOptions `mapstructure:"ltsv"` Regexp *RegexpOptions `mapstructure:"regexp"` JSON *JSONOptions `mapstructure:"json"` Pcap *PcapOptions `mapstructure:"pcap"` Count *CountOptions `mapstructure:"count"` TopN *TopNOptions `mapstructure:"topN"` }
func NewOptions ¶
func SetOptions ¶
type PcapOptions ¶ added in v1.0.6
type RegexpOptions ¶
type RegexpOptions struct { Pattern string `mapstructure:"pattern"` UriSubexp string `mapstructure:"uri_subexp"` MethodSubexp string `mapstructure:"method_subexp"` TimeSubexp string `mapstructure:"time_subexp"` ResponseTimeSubexp string `mapstructure:"response_time_subexp"` RequestTimeSubexp string `mapstructure:"request_time_subexp"` BodyBytesSubexp string `mapstructure:"body_bytes_subexp"` StatusSubexp string `mapstructure:"status_subexp"` }
type TopNOptions ¶ added in v1.0.19
Click to show internal directories.
Click to hide internal directories.