redis

package
v0.0.0-...-7f75908 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Cache *redis.Client
}

func Init

func Init(config Config) *Cache

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) ([]byte, error)

func (*Cache) Set

func (c *Cache) Set(ctx context.Context, key string, data []byte, ttl time.Duration) error

type Config

type Config struct {
	Host           string
	Password       string
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	MaxRetries     int
	MaxActiveConns int
}

Jump to

Keyboard shortcuts

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