Documentation ¶
Overview ¶
Package httpcache introduces an in-memory-cached http client into the KrakenD stack
Index ¶
Constants ¶
View Source
const Namespace = "github.com/davron112/krakend-httpcache"
Namespace is the key to use to store and access the custom config data
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(cfg *config.Backend, nextF client.HTTPClientFactory) client.HTTPClientFactory
NewHTTPClient creates a HTTPClientFactory using an in-memory-cached http client
Types ¶
type Cache ¶
type Cache interface { // Get returns the []byte representation of a cached response and a bool // set to true if the value isn't empty Get(key string) (responseBytes []byte, ok bool) // Set stores the []byte representation of a response against a key Set(key string, responseBytes []byte) // Delete removes the value associated with the key Delete(key string) }
Click to show internal directories.
Click to hide internal directories.