Documentation ¶ Overview ¶ Package httpq is an async queue for HTTP requests. Index ¶ type Config type HTTPQueue func New(file string, pass []byte, cfg *Config) (HTTPQueue, error) type Request Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { Workers int DefaultMaxRetries int Client *http.Client Errors chan<- error } Config is used to configure the behaviour of the HTTP queue. type HTTPQueue ¶ type HTTPQueue interface { Enqueue(req *Request) error io.Closer } HTTPQueue sends HTTP requests. func New ¶ func New(file string, pass []byte, cfg *Config) (HTTPQueue, error) New constructs a SQLite3-backed async HTTP queue. When a nil config is given, reasonable defaults will be used. If pass is non-nil, requests stored in the queue are encrypted with the password (see github.com/esote/enc for details). type Request ¶ type Request struct { Body []byte Method string URL *url.URL } Request represents a future HTTP request sent by the queue. Source Files ¶ View all Source files httpq.gopools.go Click to show internal directories. Click to hide internal directories.