providers

package
v1.6.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const VarySeparator = "{-VARY-}"

VarySeparator will separate vary headers from the plain URL

Variables

This section is empty.

Functions

func BadgerConnectionFactory

BadgerConnectionFactory function create new Badger instance

func EtcdConnectionFactory added in v1.6.10

EtcdConnectionFactory function create new Etcd instance

func InitializeProvider

InitializeProvider allow to generate the providers array according to the configuration

func NutsConnectionFactory added in v1.6.9

NutsConnectionFactory function create new Nuts instance

func OlricConnectionFactory

func OlricConnectionFactory(configuration t.AbstractConfigurationInterface) (types.AbstractReconnectProvider, error)

OlricConnectionFactory function create new Olric instance

func RedisConnectionFactory added in v1.6.19

RedisConnectionFactory function create new Nuts instance

Types

type Badger

type Badger struct {
	*badger.DB
	// contains filtered or unexported fields
}

Badger provider type

func (*Badger) Delete

func (provider *Badger) Delete(key string)

Delete method will delete the response in Badger provider if exists corresponding to key param

func (*Badger) DeleteMany

func (provider *Badger) DeleteMany(key string)

DeleteMany method will delete the responses in Badger provider if exists corresponding to the regex key param

func (*Badger) Get

func (provider *Badger) Get(key string) []byte

Get method returns the populated response if exists, empty response then

func (*Badger) Init

func (provider *Badger) Init() error

Init method will

func (*Badger) ListKeys

func (provider *Badger) ListKeys() []string

ListKeys method returns the list of existing keys

func (*Badger) Prefix

func (provider *Badger) Prefix(key string, req *http.Request) []byte

Prefix method returns the populated response if exists, empty response then

func (*Badger) Reset

func (provider *Badger) Reset() error

Reset method will reset or close provider

func (*Badger) Set

func (provider *Badger) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in Badger provider

type EmbeddedOlric

type EmbeddedOlric struct {
	// contains filtered or unexported fields
}

EmbeddedOlric provider type

func EmbeddedOlricConnectionFactory

func EmbeddedOlricConnectionFactory(configuration t.AbstractConfigurationInterface) (*EmbeddedOlric, error)

EmbeddedOlricConnectionFactory function create new EmbeddedOlric instance

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 added in v1.6.9

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 added in v1.6.9

func (provider *EmbeddedOlric) GetDM() olric.DMap

GetDM method returns the embbeded instance dm property

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) Prefix

func (provider *EmbeddedOlric) Prefix(key string, req *http.Request) []byte

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

func (*EmbeddedOlric) Set

func (provider *EmbeddedOlric) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in EmbeddedOlric provider

type Etcd added in v1.6.10

type Etcd struct {
	*clientv3.Client
	// contains filtered or unexported fields
}

Etcd provider type

func (*Etcd) Delete added in v1.6.10

func (provider *Etcd) Delete(key string)

Delete method will delete the response in Etcd provider if exists corresponding to key param

func (*Etcd) DeleteMany added in v1.6.10

func (provider *Etcd) DeleteMany(key string)

DeleteMany method will delete the responses in Etcd provider if exists corresponding to the regex key param

func (*Etcd) Get added in v1.6.10

func (provider *Etcd) Get(key string) (item []byte)

Get method returns the populated response if exists, empty response then

func (*Etcd) Init added in v1.6.10

func (provider *Etcd) Init() error

Init method will

func (*Etcd) ListKeys added in v1.6.10

func (provider *Etcd) ListKeys() []string

ListKeys method returns the list of existing keys

func (*Etcd) Prefix added in v1.6.10

func (provider *Etcd) Prefix(key string, req *http.Request) []byte

Prefix method returns the populated response if exists, empty response then

func (*Etcd) Reconnect added in v1.6.19

func (provider *Etcd) Reconnect()

func (*Etcd) Reset added in v1.6.10

func (provider *Etcd) Reset() error

Reset method will reset or close provider

func (*Etcd) Set added in v1.6.10

func (provider *Etcd) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in Etcd provider

type Nuts added in v1.6.9

type Nuts struct {
	*nutsdb.DB
	// contains filtered or unexported fields
}

Nuts provider type

func (*Nuts) Delete added in v1.6.9

func (provider *Nuts) Delete(key string)

Delete method will delete the response in Nuts provider if exists corresponding to key param

func (*Nuts) DeleteMany added in v1.6.9

func (provider *Nuts) DeleteMany(key string)

DeleteMany method will delete the responses in Nuts provider if exists corresponding to the regex key param

func (*Nuts) Get added in v1.6.9

func (provider *Nuts) Get(key string) (item []byte)

Get method returns the populated response if exists, empty response then

func (*Nuts) Init added in v1.6.9

func (provider *Nuts) Init() error

Init method will

func (*Nuts) ListKeys added in v1.6.9

func (provider *Nuts) ListKeys() []string

ListKeys method returns the list of existing keys

func (*Nuts) Prefix added in v1.6.9

func (provider *Nuts) Prefix(key string, req *http.Request) []byte

Prefix method returns the populated response if exists, empty response then

func (*Nuts) Reset added in v1.6.9

func (provider *Nuts) Reset() error

Reset method will reset or close provider

func (*Nuts) Set added in v1.6.9

func (provider *Nuts) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in Nuts provider

type Olric

type Olric struct {
	*olric.ClusterClient
	// contains filtered or unexported fields
}

Olric provider type

func (*Olric) Delete

func (provider *Olric) Delete(key string)

Delete method will delete the response in Olric provider if exists corresponding to key param

func (*Olric) DeleteMany

func (provider *Olric) DeleteMany(key string)

DeleteMany method will delete the responses in Olric provider if exists corresponding to the regex key param

func (*Olric) Get

func (provider *Olric) Get(key string) []byte

Get method returns the populated response if exists, empty response then

func (*Olric) Init

func (provider *Olric) Init() error

Init method will initialize Olric provider if needed

func (*Olric) ListKeys

func (provider *Olric) ListKeys() []string

ListKeys method returns the list of existing keys

func (*Olric) Prefix

func (provider *Olric) Prefix(key string, req *http.Request) []byte

Prefix method returns the populated response if exists, empty response then

func (*Olric) Reconnect added in v1.6.19

func (provider *Olric) Reconnect()

func (*Olric) Reset

func (provider *Olric) Reset() error

Reset method will reset or close provider

func (*Olric) Set

func (provider *Olric) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in Olric provider

type Redis added in v1.6.19

type Redis struct {
	*redis.Client
	// contains filtered or unexported fields
}

Redis provider type

func (*Redis) Delete added in v1.6.19

func (provider *Redis) Delete(key string)

Delete method will delete the response in Etcd provider if exists corresponding to key param

func (*Redis) DeleteMany added in v1.6.19

func (provider *Redis) DeleteMany(key string)

DeleteMany method will delete the responses in Nuts provider if exists corresponding to the regex key param

func (*Redis) Get added in v1.6.19

func (provider *Redis) Get(key string) (item []byte)

Get method returns the populated response if exists, empty response then

func (*Redis) Init added in v1.6.19

func (provider *Redis) Init() error

Init method will

func (*Redis) ListKeys added in v1.6.19

func (provider *Redis) ListKeys() []string

ListKeys method returns the list of existing keys

func (*Redis) Prefix added in v1.6.19

func (provider *Redis) Prefix(key string, req *http.Request) []byte

Prefix method returns the populated response if exists, empty response then

func (*Redis) Reconnect added in v1.6.19

func (provider *Redis) Reconnect()

func (*Redis) Reset added in v1.6.19

func (provider *Redis) Reset() error

Reset method will reset or close provider

func (*Redis) Set added in v1.6.19

func (provider *Redis) Set(key string, value []byte, url t.URL, duration time.Duration) error

Set method will store the response in Etcd provider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL