redis

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: BSD-3-Clause Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(ctx micro.Context, name string) (*R.Client, error)

func IsNil

func IsNil(err error) bool

Types

type Redis

type Redis interface {
	Get(key string) (string, error)
	Set(key string, value string, expiration time.Duration) error
	TTL(key string) (time.Duration, error)
	Expire(key string, expiration time.Duration) error
	Del(key string) error
	HSet(key string, itemKey string, value string) error
	HGet(key string, itemKey string) (string, error)
	HDel(key string, itemKey string) error
}

func GetRedis

func GetRedis(ctx micro.Context, name string) (Redis, error)

type RedisService

type RedisService interface {
	micro.Service
	Client() *R.Client
	ClusterClient() *R.ClusterClient
}

Jump to

Keyboard shortcuts

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