Documentation
¶
Index ¶
- Constants
- Variables
- func New(client *http.Client, cacheInteractor cache.Interactor) (err error)
- func NewRoundtrip(defaultRoundTripper http.RoundTripper, cacheActor cache.Interactor) http.RoundTripper
- func NewWithInmemoryCache(client *http.Client, duration ...time.Duration) (err error)
- type RoundTrip
Constants ¶
View Source
const ( HeaderAuthorization = "Authorization" HeaderCacheControl = "Cache-Control" )
Headers
Variables ¶
View Source
var ( // CacheAuthorizedRequest used for determine that a request with Authorization header should be cached or not CacheAuthorizedRequest = false // TODO(bxcodec): Need to revised about this feature )
Functions ¶
func NewRoundtrip ¶
func NewRoundtrip(defaultRoundTripper http.RoundTripper, cacheActor cache.Interactor) http.RoundTripper
NewRoundtrip will create an implementations of cache http roundtripper
Types ¶
type RoundTrip ¶
type RoundTrip struct {
DefaultRoundTripper http.RoundTripper
CacheInteractor cache.Interactor
}
RoundTrip custom plugable' struct of implementation of the http.RoundTripper
Click to show internal directories.
Click to hide internal directories.