Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fetch ¶
func Fetch(fc *FetchConfig) ([]byte, error)
Fetch makes a request, and is responsible for caching the response data.
Types ¶
type FetchConfig ¶
type FetchConfig struct {
*url.URL
// Method describes which request method to use.
Method string
// Body store the request's body.
Body []byte
http.Header
// Query is the url.Values form of the request's query params.
// These are to be encoded for use by URL's RawQuery.
Query url.Values
// TTL is the time to live for a request's response in cache
TTL time.Duration
}
FetchConfig holds all the information needed by dal.Fetch() to make a request.
Click to show internal directories.
Click to hide internal directories.