cache

package
v0.0.0-...-5599d74 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: GPL-3.0 Imports: 5 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 {
	Addr     string
	Password string
	DB       int
}

type RedisClient

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

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

func (rc *RedisClient) Publish(ctx context.Context, channel string, message interface{}) error

func (*RedisClient) Set

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

func (*RedisClient) Subscribe

func (rc *RedisClient) Subscribe(ctx context.Context, channel string) <-chan string

Jump to

Keyboard shortcuts

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