Documentation
¶
Index ¶
- Constants
- Variables
- func AddNetInflight(delta int64)
- func AddRawInflight(delta int64)
- func AddTaskGateWait(d time.Duration)
- func ApplyHeaderLines(req *retryablehttp.Request, headerLines []string, overwrite bool)
- func CheckProtocol(host string) (string, error)
- func CloseIdleConnections()
- func ContextFromVariableMap(variableMap map[string]any) context.Context
- func DefaultAcceptEnabled() bool
- func Get(target string) ([]byte, int, error)
- func GetDefaultTimeout() time.Duration
- func GetMaxDefaultBody() int64
- func GetReqLimitPerTarget() int
- func GetTimeout(target string, timeout time.Duration) ([]byte, int, error)
- func Init(opt *Options) (err error)
- func IsCheckProtocolSuppressed(err error) bool
- func IsCriticalHeader(key string) bool
- func ParseRequest(oReq *http.Request) (*proto.Request, error)
- func Request(target string, header []string, rule poc.Rule, variableMap map[string]any) error
- func ReverseGet(target string) ([]byte, error)
- func SetReqLimitPerTarget(rate int)
- func StartAutoReqLimit(stop <-chan struct{}, minRate int, maxRate int)
- func Url2UrlType(u *url.URL) *proto.UrlType
- func WaitHostPort(ctx context.Context, host string, port string) error
- func WriteHTTPRequestToVars(variableMap map[string]any, req *retryablehttp.Request, body string, ...)
- func WriteHTTPResponseToVars(variableMap map[string]any, resp *http.Response, body []byte, latency int64)
- type LiveMetrics
- type Options
Constants ¶
View Source
const ContextVarKey = "__ctx"
Variables ¶
View Source
var ( RtryRedirect *retryablehttp.Client RtryNoRedirect *retryablehttp.Client )
View Source
var ( HTTP_PREFIX = "http://" HTTPS_PREFIX = "https://" )
Functions ¶
func AddNetInflight ¶ added in v3.2.8
func AddNetInflight(delta int64)
func AddRawInflight ¶ added in v3.2.8
func AddRawInflight(delta int64)
func AddTaskGateWait ¶ added in v3.2.8
func ApplyHeaderLines ¶ added in v3.2.8
func ApplyHeaderLines(req *retryablehttp.Request, headerLines []string, overwrite bool)
func CheckProtocol ¶
func CloseIdleConnections ¶ added in v3.5.3
func CloseIdleConnections()
func ContextFromVariableMap ¶ added in v3.2.8
func DefaultAcceptEnabled ¶ added in v3.3.5
func DefaultAcceptEnabled() bool
func GetDefaultTimeout ¶
func GetMaxDefaultBody ¶
func GetMaxDefaultBody() int64
func GetReqLimitPerTarget ¶ added in v3.2.8
func GetReqLimitPerTarget() int
func IsCheckProtocolSuppressed ¶ added in v3.3.5
func IsCriticalHeader ¶ added in v3.2.8
func SetReqLimitPerTarget ¶ added in v3.2.8
func SetReqLimitPerTarget(rate int)
func StartAutoReqLimit ¶ added in v3.2.8
func WaitHostPort ¶ added in v3.2.8
func WriteHTTPRequestToVars ¶ added in v3.2.8
Types ¶
type LiveMetrics ¶ added in v3.2.8
type LiveMetrics struct {
HTTPInflight int64
RawInflight int64
NetInflight int64
ReqLimitWaitNs int64
ReqLimitWaitCount int64
TaskGateWaitNs int64
TaskGateWaitCount int64
}
func GetLiveMetrics ¶ added in v3.2.8
func GetLiveMetrics() LiveMetrics
Click to show internal directories.
Click to hide internal directories.