Documentation
¶
Index ¶
- func MappingElection(provider types.Storer, item []byte, req *http.Request, ...) (resultFresh *http.Response, resultStale *http.Response, e error)
- func MappingUpdater(key string, item []byte, now, freshTime, staleTime time.Time, ...) (val []byte, e error)
- func ParseRequest(req *http.Request) *types.Revalidator
- func ValidateETagFromHeader(etag string, validator *types.Revalidator)
- type KeyIndex
- type StorageMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MappingElection ¶ added in v1.7.3
func MappingUpdater ¶ added in v1.7.3
func ParseRequest ¶
func ParseRequest(req *http.Request) *types.Revalidator
func ValidateETagFromHeader ¶
func ValidateETagFromHeader(etag string, validator *types.Revalidator)
Types ¶
type KeyIndex ¶ added in v1.7.3
type KeyIndex struct { StoredAt time.Time `json:"stored_at,omitempty"` FreshTime time.Time `json:"fresh_time,omitempty"` StaleTime time.Time `json:"stale_time,omitempty"` VariedHeaders map[string][]string `json:"varied_headers,omitempty"` Etag string `json:"etag,omitempty"` RealKey string `json:"real_key,omitempty"` }
type StorageMapper ¶ added in v1.7.3
func DecodeMapping ¶ added in v1.7.3
func DecodeMapping(item []byte) (*StorageMapper, error)
Click to show internal directories.
Click to hide internal directories.