Documentation ¶
Index ¶
- Constants
- func BadgerConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
- func EmbeddedOlricConnectionFactory(configuration t.AbstractConfigurationInterface) (types.Storer, error)
- func EtcdConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
- func NewStorage(configuration configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
- func NewStorages(configuration configurationtypes.AbstractConfigurationInterface) ([]types.Storer, error)
- func NutsConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
- func OlricConnectionFactory(configuration t.AbstractConfigurationInterface) (types.Storer, error)
- func RedisConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
- type Badger
- func (provider *Badger) Delete(key string)
- func (provider *Badger) DeleteMany(key string)
- func (provider *Badger) Get(key string) []byte
- func (provider *Badger) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Badger) Init() error
- func (provider *Badger) ListKeys() []string
- func (provider *Badger) MapKeys(prefix string) map[string]string
- func (provider *Badger) Name() string
- func (provider *Badger) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *Badger) Reset() error
- func (provider *Badger) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Badger) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type EmbeddedOlric
- func (provider *EmbeddedOlric) Delete(key string)
- func (provider *EmbeddedOlric) DeleteMany(key string)
- func (provider *EmbeddedOlric) Destruct() error
- func (provider *EmbeddedOlric) Get(key string) []byte
- func (provider *EmbeddedOlric) GetDM() olric.DMap
- func (provider *EmbeddedOlric) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *EmbeddedOlric) Init() error
- func (provider *EmbeddedOlric) ListKeys() []string
- func (provider *EmbeddedOlric) MapKeys(prefix string) map[string]string
- func (provider *EmbeddedOlric) Name() string
- func (provider *EmbeddedOlric) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *EmbeddedOlric) Reset() error
- func (provider *EmbeddedOlric) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *EmbeddedOlric) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type Etcd
- func (provider *Etcd) Delete(key string)
- func (provider *Etcd) DeleteMany(key string)
- func (provider *Etcd) Get(key string) (item []byte)
- func (provider *Etcd) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Etcd) Init() error
- func (provider *Etcd) ListKeys() []string
- func (provider *Etcd) MapKeys(prefix string) map[string]string
- func (provider *Etcd) Name() string
- func (provider *Etcd) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *Etcd) Reconnect()
- func (provider *Etcd) Reset() error
- func (provider *Etcd) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Etcd) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type Nuts
- func (provider *Nuts) Delete(key string)
- func (provider *Nuts) DeleteMany(key string)
- func (provider *Nuts) Get(key string) (item []byte)
- func (provider *Nuts) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Nuts) Init() error
- func (provider *Nuts) ListKeys() []string
- func (provider *Nuts) MapKeys(prefix string) map[string]string
- func (provider *Nuts) Name() string
- func (provider *Nuts) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *Nuts) Reset() error
- func (provider *Nuts) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Nuts) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type Olric
- func (provider *Olric) Delete(key string)
- func (provider *Olric) DeleteMany(key string)
- func (provider *Olric) Get(key string) []byte
- func (provider *Olric) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Olric) Init() error
- func (provider *Olric) ListKeys() []string
- func (provider *Olric) MapKeys(prefix string) map[string]string
- func (provider *Olric) Name() string
- func (provider *Olric) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *Olric) Reconnect()
- func (provider *Olric) Reset() error
- func (provider *Olric) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Olric) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type Redis
- func (provider *Redis) Delete(key string)
- func (provider *Redis) DeleteMany(key string)
- func (provider *Redis) Get(key string) []byte
- func (provider *Redis) GetMultiLevel(key string, req *http.Request, validator *rfc.Revalidator) (fresh *http.Response, stale *http.Response)
- func (provider *Redis) Init() error
- func (provider *Redis) ListKeys() []string
- func (provider *Redis) MapKeys(prefix string) map[string]string
- func (provider *Redis) Name() string
- func (provider *Redis) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
- func (provider *Redis) Reconnect()
- func (provider *Redis) Reset() error
- func (provider *Redis) Set(key string, value []byte, url t.URL, duration time.Duration) error
- func (provider *Redis) SetMultiLevel(baseKey, variedKey string, value []byte, variedHeaders http.Header, ...) error
- type StorerInstanciator
Constants ¶
const ( StalePrefix = "STALE_" MappingKeyPrefix = "IDX_" )
Variables ¶
This section is empty.
Functions ¶
func BadgerConnectionFactory ¶
func BadgerConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
BadgerConnectionFactory function create new Badger instance
func EmbeddedOlricConnectionFactory ¶
func EmbeddedOlricConnectionFactory(configuration t.AbstractConfigurationInterface) (types.Storer, error)
EmbeddedOlricConnectionFactory function create new EmbeddedOlric instance
func EtcdConnectionFactory ¶
func EtcdConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
EtcdConnectionFactory function create new Etcd instance
func NewStorage ¶
func NewStorage(configuration configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
func NewStorages ¶
func NewStorages(configuration configurationtypes.AbstractConfigurationInterface) ([]types.Storer, error)
func NutsConnectionFactory ¶
func NutsConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
NutsConnectionFactory function create new Nuts instance
func OlricConnectionFactory ¶
func OlricConnectionFactory(configuration t.AbstractConfigurationInterface) (types.Storer, error)
OlricConnectionFactory function create new Olric instance
func RedisConnectionFactory ¶
func RedisConnectionFactory(c t.AbstractConfigurationInterface) (types.Storer, error)
RedisConnectionFactory function create new Nuts instance
Types ¶
type Badger ¶
Badger provider type
func (*Badger) Delete ¶
Delete method will delete the response in Badger provider if exists corresponding to key param
func (*Badger) DeleteMany ¶
DeleteMany method will delete the responses in Badger provider if exists corresponding to the regex key param
func (*Badger) GetMultiLevel ¶
func (provider *Badger) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*Badger) Prefix ¶
func (provider *Badger) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
type EmbeddedOlric ¶
type EmbeddedOlric struct {
// contains filtered or unexported fields
}
EmbeddedOlric provider type
func (*EmbeddedOlric) Delete ¶
func (provider *EmbeddedOlric) Delete(key string)
Delete method will delete the response in EmbeddedOlric provider if exists corresponding to key param
func (*EmbeddedOlric) DeleteMany ¶
func (provider *EmbeddedOlric) DeleteMany(key string)
DeleteMany method will delete the responses in EmbeddedOlric provider if exists corresponding to the regex key param
func (*EmbeddedOlric) Destruct ¶
func (provider *EmbeddedOlric) Destruct() error
Destruct method will reset or close provider
func (*EmbeddedOlric) Get ¶
func (provider *EmbeddedOlric) Get(key string) []byte
Get method returns the populated response if exists, empty response then
func (*EmbeddedOlric) GetDM ¶
func (provider *EmbeddedOlric) GetDM() olric.DMap
GetDM method returns the embbeded instance dm property
func (*EmbeddedOlric) GetMultiLevel ¶
func (provider *EmbeddedOlric) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*EmbeddedOlric) Init ¶
func (provider *EmbeddedOlric) Init() error
Init method will initialize EmbeddedOlric provider if needed
func (*EmbeddedOlric) ListKeys ¶
func (provider *EmbeddedOlric) ListKeys() []string
ListKeys method returns the list of existing keys
func (*EmbeddedOlric) MapKeys ¶
func (provider *EmbeddedOlric) MapKeys(prefix string) map[string]string
MapKeys method returns a map with the key and value
func (*EmbeddedOlric) Name ¶
func (provider *EmbeddedOlric) Name() string
Name returns the storer name
func (*EmbeddedOlric) Prefix ¶
func (provider *EmbeddedOlric) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
func (*EmbeddedOlric) Reset ¶
func (provider *EmbeddedOlric) Reset() error
Reset method will reset or close provider
type Etcd ¶
Etcd provider type
func (*Etcd) Delete ¶
Delete method will delete the response in Etcd provider if exists corresponding to key param
func (*Etcd) DeleteMany ¶
DeleteMany method will delete the responses in Etcd provider if exists corresponding to the regex key param
func (*Etcd) GetMultiLevel ¶
func (provider *Etcd) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*Etcd) Prefix ¶
func (provider *Etcd) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
type Nuts ¶
Nuts provider type
func (*Nuts) Delete ¶
Delete method will delete the response in Nuts provider if exists corresponding to key param
func (*Nuts) DeleteMany ¶
DeleteMany method will delete the responses in Nuts provider if exists corresponding to the regex key param
func (*Nuts) GetMultiLevel ¶
func (provider *Nuts) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*Nuts) Prefix ¶
func (provider *Nuts) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
type Olric ¶
type Olric struct { *olric.ClusterClient // contains filtered or unexported fields }
Olric provider type
func (*Olric) Delete ¶
Delete method will delete the response in Olric provider if exists corresponding to key param
func (*Olric) DeleteMany ¶
DeleteMany method will delete the responses in Olric provider if exists corresponding to the regex key param
func (*Olric) GetMultiLevel ¶
func (provider *Olric) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*Olric) Prefix ¶
func (provider *Olric) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis provider type
func (*Redis) Delete ¶
Delete method will delete the response in Etcd provider if exists corresponding to key param
func (*Redis) DeleteMany ¶
DeleteMany method will delete the responses in Nuts provider if exists corresponding to the regex key param
func (*Redis) GetMultiLevel ¶
func (provider *Redis) GetMultiLevel(key string, req *http.Request, validator *rfc.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 (*Redis) Prefix ¶
func (provider *Redis) Prefix(key string, req *http.Request, validator *rfc.Revalidator) *http.Response
Prefix method returns the populated response if exists, empty response then
type StorerInstanciator ¶
type StorerInstanciator func(configurationtypes.AbstractConfigurationInterface) (types.Storer, error)
func NewStorageFromName ¶
func NewStorageFromName(name string) (StorerInstanciator, error)