Documentation
¶
Index ¶
- func Factory(natsConfiguration core.CacheProvider, logger core.Logger, stale time.Duration) (core.Storer, error)
- type Nats
- func (provider *Nats) Delete(key string)
- func (provider *Nats) DeleteMany(key string)
- func (provider *Nats) Get(key string) []byte
- func (provider *Nats) GetMultiLevel(key string, req *http.Request, validator *core.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Nats) Init() error
- func (provider *Nats) ListKeys() []string
- func (provider *Nats) MapKeys(prefix string) map[string]string
- func (provider *Nats) Name() string
- func (provider *Nats) Reset() error
- func (provider *Nats) Set(key string, value []byte, _ time.Duration) error
- func (provider *Nats) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- func (provider *Nats) Uuid() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
Nats provider type.
func (*Nats) Delete ¶
Delete method will delete the response in Nats provider if exists corresponding to key param.
func (*Nats) DeleteMany ¶
DeleteMany method will delete the responses in Nats provider if exists corresponding to the regex key param.
func (*Nats) GetMultiLevel ¶
func (provider *Nats) 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.
Click to show internal directories.
Click to hide internal directories.