Documentation ¶
Index ¶
- Variables
- func BodyFileUpload(fileUpload FileParam, Params ...ParamInUploadFile) (*bytes.Buffer, string)
- func ConnectWS(urlStr string, ft func(input string) string, f func(conn *websocket.Conn))
- func ParseReqFile(filename string, url string) *http.Request
- func SendWS(urlStr string, queueWs []Socket, workers int, proxy string, ...)
- func Sends(req []*Request, proxy string, worker int, f func(c DataHandler))
- func SetCookie(req *http.Request, cookies []*http.Cookie) *http.Request
- func UnzipResp(resp *http.Response) string
- type CustomTransport
- func (tr *CustomTransport) ConnDuration() time.Duration
- func (tr *CustomTransport) Dial(network, addr string) (net.Conn, error)
- func (tr *CustomTransport) Duration() time.Duration
- func (tr *CustomTransport) ReqDuration() time.Duration
- func (tr *CustomTransport) RoundTrip(r *http.Request) (*http.Response, error)
- type DataHandler
- type FileParam
- type HandleWs
- type ParamInUploadFile
- type Request
- type Socket
- type TransportWs
- func (tr *TransportWs) ConnDuration() time.Duration
- func (tr *TransportWs) Connect(urlStr string, proxy string) *TransportWs
- func (tr *TransportWs) Duration() time.Duration
- func (tr *TransportWs) ReadMessage(messageChan chan respChan, timeConn int)
- func (tr *TransportWs) ReqDuration() time.Duration
- func (tr *TransportWs) SendMessage(message string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Check bool
Check = True to stop workerpool
View Source
var CheckWs = false //Check if all request is done -> stop process send request
Functions ¶
func BodyFileUpload ¶
func BodyFileUpload(fileUpload FileParam, Params ...ParamInUploadFile) (*bytes.Buffer, string)
Process Upload file body in Post request
func Sends ¶
func Sends(req []*Request, proxy string, worker int, f func(c DataHandler))
Multi worker to send request
Types ¶
type CustomTransport ¶
type CustomTransport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(proxy string) *CustomTransport
NewTransport return CustomTransport
func (*CustomTransport) ConnDuration ¶
func (tr *CustomTransport) ConnDuration() time.Duration
func (*CustomTransport) Dial ¶
func (tr *CustomTransport) Dial(network, addr string) (net.Conn, error)
func (*CustomTransport) Duration ¶
func (tr *CustomTransport) Duration() time.Duration
func (*CustomTransport) ReqDuration ¶
func (tr *CustomTransport) ReqDuration() time.Duration
type DataHandler ¶
type DataHandler struct { Resp *http.Response Req *http.Request Time time.Duration DataRet []rune // contains filtered or unexported fields }
Data of response store
func Append ¶
func Append(data []DataHandler, temp DataHandler) []DataHandler
Insert new node to array and sort by Index
type HandleWs ¶ added in v0.0.5
type ParamInUploadFile ¶
Process Upload File with more param
type Request ¶
type Request struct { Req *http.Request Redirect bool // default false DataRet []rune // default nil }
Create Request to worker
type Socket ¶ added in v0.0.5
func AddqueueWs ¶ added in v0.0.5
Add queue to send websocket request
type TransportWs ¶ added in v0.0.5
type TransportWs struct {
// contains filtered or unexported fields
}
func (*TransportWs) ConnDuration ¶ added in v0.0.5
func (tr *TransportWs) ConnDuration() time.Duration
func (*TransportWs) Connect ¶ added in v0.0.5
func (tr *TransportWs) Connect(urlStr string, proxy string) *TransportWs
func (*TransportWs) Duration ¶ added in v0.0.5
func (tr *TransportWs) Duration() time.Duration
func (*TransportWs) ReadMessage ¶ added in v0.0.5
func (tr *TransportWs) ReadMessage(messageChan chan respChan, timeConn int)
func (*TransportWs) ReqDuration ¶ added in v0.0.5
func (tr *TransportWs) ReqDuration() time.Duration
func (*TransportWs) SendMessage ¶ added in v0.0.5
func (tr *TransportWs) SendMessage(message string) error
Click to show internal directories.
Click to hide internal directories.