Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClientCacheRedis ¶
type HTTPClientCacheRedis struct {
Config HTTPClientCacheRedisConfig
Client interface {
Do(req *http.Request) (*http.Response, error)
}
Redis *redis.Client
}
HTTPClientCacheRedis caches HTTP responses in Redis, including body, headers, and status code.
type HTTPClientCacheRedisConfig ¶
type HTTPClientCacheRedisConfig struct {
RedisPrefix string `json:"redis_prefix"`
MinTTL time.Duration `json:"min_ttl,format:units"`
}
func (HTTPClientCacheRedisConfig) WithDefaults ¶
func (s HTTPClientCacheRedisConfig) WithDefaults() HTTPClientCacheRedisConfig
Click to show internal directories.
Click to hide internal directories.