cache

package
v0.0.0-...-76732a0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Host     string
	Port     string
	Password string
	DB       string
}

type RedisClient

type RedisClient struct {
	Client *redis.Client
}

func NewRedisClient

func NewRedisClient(ctx context.Context, options *Options) (*RedisClient, error)

func (*RedisClient) Get

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

func (*RedisClient) Set

func (rc *RedisClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

Jump to

Keyboard shortcuts

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