Documentation ¶
Index ¶
- Variables
- func WithAllowedStatusCodes(allowedStatusCodes []int) func(*CachedRoundTripper)
- func WithCacheStore(store ResponseStorer) func(*CachedRoundTripper)
- func WithDeniedStatusCodes(deniedStatusCodes []int) func(*CachedRoundTripper)
- func WithExpiryTime(expiryTime time.Duration) func(*CachedRoundTripper)
- func WithName(name string) func(*CachedRoundTripper)
- type CachedRoundTripper
- type ResponseStorer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoResponse = errors.New("no stored response")
)
Functions ¶
func WithAllowedStatusCodes ¶
func WithAllowedStatusCodes(allowedStatusCodes []int) func(*CachedRoundTripper)
func WithCacheStore ¶
func WithCacheStore(store ResponseStorer) func(*CachedRoundTripper)
func WithDeniedStatusCodes ¶
func WithDeniedStatusCodes(deniedStatusCodes []int) func(*CachedRoundTripper)
func WithExpiryTime ¶
func WithExpiryTime(expiryTime time.Duration) func(*CachedRoundTripper)
func WithName ¶
func WithName(name string) func(*CachedRoundTripper)
Types ¶
type CachedRoundTripper ¶
type CachedRoundTripper struct {
// contains filtered or unexported fields
}
func NewCachedRoundTripper ¶
func NewCachedRoundTripper(options ...func(*CachedRoundTripper)) *CachedRoundTripper
Click to show internal directories.
Click to hide internal directories.