redis

package
v0.0.0-...-c80e9bf Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHarborClient

func GetHarborClient() (*redis.Client, error)

GetHarborClient returns the harbor redis client.

func GetRedisPool

func GetRedisPool(name string, rawurl string, param *PoolParam) (*redis.Pool, error)

GetRedisPool get a named redis pool supported rawurl redis://user:pass@redis_host:port/db redis+sentinel://user:pass@redis_sentinel1:port1,redis_sentinel2:port2/monitor_name/db?idle_timeout_seconds=100

func GetRegistryClient

func GetRegistryClient() (*redis.Client, error)

GetRegistryClient returns the registry redis client.

Types

type PoolParam

type PoolParam struct {
	PoolMaxIdle     int
	PoolMaxActive   int
	PoolIdleTimeout time.Duration

	DialConnectionTimeout time.Duration
	DialReadTimeout       time.Duration
	DialWriteTimeout      time.Duration
}

PoolParam ...

Jump to

Keyboard shortcuts

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