redis

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(cfg *Config, logger log.Logger) cache.Client

Types

type Client

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

func (*Client) Fetch

func (r *Client) Fetch(ctx context.Context, key string) []byte

Fetch implements cache.Fetch

func (*Client) Shutdown

func (r *Client) Shutdown()

Shutdown implements cache.Shutdown

func (*Client) Store

func (r *Client) Store(ctx context.Context, key string, val []byte)

Store implements cache.Store

type Config

type Config struct {
	ClientConfig cortex_cache.RedisConfig `yaml:",inline"`

	TTL time.Duration `yaml:"ttl"`
}

Jump to

Keyboard shortcuts

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