Documentation ¶
Index ¶
Constants ¶
View Source
const CacheExpirationHeader = "x-httpclient-cache-expiration"
Variables ¶
This section is empty.
Functions ¶
func DefaultKeyFunc ¶
Types ¶
type CachedRoundTripper ¶
type CachedRoundTripper struct {
// contains filtered or unexported fields
}
func Wrap ¶
func Wrap(delegate http.RoundTripper, cache Cache, opts ...Option) *CachedRoundTripper
func WrapWithClock ¶
func WrapWithClock(delegate http.RoundTripper, cache Cache, now func() time.Time, opts ...Option) *CachedRoundTripper
type EventListener ¶
type Option ¶
type Option func(*requestOption)
func DefaultExpirationOption ¶
func KeyFuncOption ¶
func ListenerOption ¶
func ListenerOption(l EventListener) Option
Click to show internal directories.
Click to hide internal directories.