Documentation ¶
Index ¶
- func Factory(c configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
- type Default
- func (provider *Default) Delete(key string)
- func (provider *Default) DeleteMany(key string)
- func (provider *Default) Get(key string) []byte
- func (provider *Default) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Default) Init() error
- func (provider *Default) ListKeys() []string
- func (provider *Default) MapKeys(prefix string) map[string]string
- func (provider *Default) Name() string
- func (provider *Default) Reset() error
- func (provider *Default) Set(key string, value []byte, duration time.Duration) error
- func (provider *Default) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- func (provider *Default) Uuid() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Factory ¶
func Factory(c configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
Factory function create new Default instance
Types ¶
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
Default provider type
func (*Default) Delete ¶
Delete method will delete the response in Badger provider if exists corresponding to key param
func (*Default) DeleteMany ¶
DeleteMany method will delete the responses in Badger provider if exists corresponding to the regex key param
func (*Default) GetMultiLevel ¶
func (provider *Default) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
GetMultiLevel tries to load the key and check if one of linked keys is a fresh/stale candidate.
func (*Default) SetMultiLevel ¶
func (provider *Default) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, etag string, duration time.Duration, realKey string) error
SetMultiLevel tries to store the key with the given value and update the mapping key to store metadata.
Click to show internal directories.
Click to hide internal directories.