nredis

package
v0.0.0-...-3b525e9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RAW_URL    = "redis://127.0.0.1:6379"
	MAX_IDLE   = 5
	MAX_ACTIVE = 10
	TIMEOUT    = 120
)

Redis configuration

Variables

This section is empty.

Functions

func Delete

func Delete(key string) (string, error)

Delete key-value from Redis

func ExampleNJson

func ExampleNJson()

func ExampleNRedis

func ExampleNRedis()

func Get

func Get(key string) (string, error)

Get key-value from Redis.

func GetConnection

func GetConnection() redis.Conn

func GetPool

func GetPool() *redis.Pool

Get redis pool

func InitPool

func InitPool(rawUrl string, maxIdle int, maxActive int, idleTimeout time.Duration) *redis.Pool

func InitPoolConf

func InitPoolConf(name string) *redis.Pool

func Json2Map

func Json2Map(s string) map[string]interface{}

func Map2Json

func Map2Json(data map[string]interface{}) string

func Put

func Put(key string, value string) (string, error)

Put key-value into redis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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