Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_TIMEOUT = 10 * time.Second
DEFAULT_TIMEOUT the default timeout of team specification.
Functions ¶
Types ¶
type HTTPAgent ¶
type HTTPAgent interface {
// Do send given request using http, and optionally set custom timeout if
// provided, otherwise will use DEFAULT_TIMEOUT.
//
// This function also help setting any necessary metadata for spotlibs using
// ctx pkg that also come from this lib.
Do(req *http.Request, timeouts ...time.Duration) (Response, error)
}
func NewHTTPAgent ¶
func NewHTTPAgent() HTTPAgent
NewHTTPAgent return HTTPAgent implementer that also set some metadata header before sending the request.
Click to show internal directories.
Click to hide internal directories.