cache

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRDB

func GetRDB() *redis.Client

func NewRdb

func NewRdb() *option

Types

type Cache

type Cache struct {
	Ctx    context.Context
	Client *redis.Client
	Err    error
}

func NewCache

func NewCache(db int) *Cache

func (*Cache) GETDH

func (r *Cache) GETDH(deviceId string) ([]byte, error)

func (*Cache) SETDH

func (r *Cache) SETDH(deviceId string, data []byte) error

type Operator

type Operator interface {
	SETDH(deviceId string, data []byte) error
	GETDH(deviceId string) ([]byte, error)
}

type Redis

type Redis interface {
	Dial(db int) error
}

Jump to

Keyboard shortcuts

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