Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Transport ¶
type Transport struct { Transport http.RoundTripper // contains filtered or unexported fields }
Transport implements http.RoundTripper. When set as Transport of http.Client, it will store online requests for offline usage
func (*Transport) RoundTrip ¶
RoundTrip is the core part of this module and implements http.RoundTripper.
If prefer database is true, always try and return value of request from database
If there is data, return it If there is no data, then send the request anyway
Store the result, linking it to the request If the request errors, then attempt to pull from database, otherwise return as is
Click to show internal directories.
Click to hide internal directories.