Documentation
¶
Index ¶
- Variables
- func AddStat(URL *url.URL)
- func BuildHttpRequest(tr *TextRequest) (*http.Request, error)
- func BuildTextResponse(response http.Response)
- func InitTextRequest(tr *TextRequest, hr *http.Request)
- func Run()
- type AdminHandle
- type HostMap
- type Statistics
- type TextRequest
- type TextResponse
- type URLMap
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ERROR_NOT_IN_WHITELIST int = 1001
)
View Source
var StatisticsMap = &HostMap{hostmap: make(map[string]*URLMap)}
View Source
var (
UserHeader = []string{
"Content-Type",
"Accept",
"Accept-Language",
"User-Agent",
"Referer",
"Cache-Control",
"Cookie",
"If-Modified-Since",
"Etag",
"Accept-Encoding",
}
)
Functions ¶
func BuildHttpRequest ¶
func BuildHttpRequest(tr *TextRequest) (*http.Request, error)
func BuildTextResponse ¶
func InitTextRequest ¶
func InitTextRequest(tr *TextRequest, hr *http.Request)
Types ¶
type AdminHandle ¶
type AdminHandle struct{}
func (*AdminHandle) ServeHTTP ¶
func (*AdminHandle) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HostMap ¶
type HostMap struct {
// contains filtered or unexported fields
}
func (*HostMap) AddStatistic ¶
type Statistics ¶
type TextRequest ¶
type TextRequest struct { Header map[string]string `json:"header"` Method string `json:"method"` Cookies map[string]string `json:"cookies"` Data string `json:"data"` URL string `json:"url"` Status string `json:-` Retry int `json:"retry"` Timeout int `json:"timeout"` UserRequset *http.Request `json:-` Tag string `json:tag` }
type TextResponse ¶
func SendRequest ¶
func SendRequest(hr *http.Request) (*TextResponse, error)
Click to show internal directories.
Click to hide internal directories.