myredis

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

README

myredis

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("the key not found")
)

Functions

func StreamToObject

func StreamToObject[E any](b []byte) (ret E, err error)

Types

type Client

type Client interface {
	Set(key string, v any, ttl int) error //ttl==0 ,永不过期
	Get(key string, v any) error
	Del(key string) error
	Exist(key string) (bool, error)
	RemainingTTL(key string) (int64, error)
	Expire(key string, ttl int) error
}

func NewClient

func NewClient(address string, password string, db int) Client

Jump to

Keyboard shortcuts

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