curl

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	TypeMetricHttp   = "http"
	MetricHttpUsages = "HTTP(http)"

	HttpStatusCode = "http_status_code"
	HttpRespHead   = "http_resp_head"
	HttpData       = "http_data"
	HttpTimeCost   = "http_time_cost"
	HttpTarget     = "http_target"

	HttpErrState = "http_err_state"
	HttpErrMsg   = "http_err_msg"

	HttpTimeCostTotal = "http_time_cost_total"
	HttpErrStateTotal = "http_err_state_total"
	HttpErrMsgTotal   = "http_err_msg_total"

	// Config 中的字段
	ConfigHttpDatas = "http_datas"

	DefaultTimeOut = 1 * time.Minute
	StateSuccess   = float64(1)
	StateFail      = float64(0)
)

Variables

View Source
var ConfigHttpUsages = KeyValueSlice{
	{ConfigHttpDatas, "填写(" + ConfigHttpDatas + ")", ""},
}

ConfigHttpUsages TypeMetricHttp config 中的字段描述

View Source
var KeyHttpUsages = KeyValueSlice{
	{HttpStatusCode, "http响应状态码", ""},
	{HttpRespHead, "http响应头部信息", ""},
	{HttpData, "http响应内容", ""},
	{HttpTimeCost, "http响应用时", ""},
	{HttpTarget, "http请求地址", ""},
	{HttpErrState, "http响应状态", ""},
	{HttpErrMsg, "http响应错误信息", ""},
}

KeyHttpUsages TypeMetricHttp 中的字段名称

Functions

This section is empty.

Types

type HttpDataReq

type HttpDataReq struct {
	Method     string            `json:"method"`
	Url        string            `json:"url"`
	Header     map[string]string `json:"header"`
	Body       string            `json:"body"`
	ExpectCode int               `json:"expect_code"`
	ExpectData string            `json:"expect_data"`
}

type HttpStats

type HttpStats struct {
	HttpDatas string `json:"http_datas"`
}

func (*HttpStats) Collect

func (s *HttpStats) Collect() (datas []map[string]interface{}, err error)

func (*HttpStats) Config

func (*HttpStats) Config() map[string]interface{}

func (*HttpStats) Name

func (*HttpStats) Name() string

func (*HttpStats) Tags

func (*HttpStats) Tags() []string

func (*HttpStats) Usages

func (*HttpStats) Usages() string

Jump to

Keyboard shortcuts

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