Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedis ¶
func NewRedis(opts ...RedisConfigOption) (*redis.Client, error)
func NewRedisV8 ¶
func NewRedisV8(opts ...RedisConfigOption) (*redisv8.Client, error)
Types ¶
type RedisConfig ¶
type RedisConfig struct {
	Host         string `json:"host" yaml:"host" env:"DEFAULT_REDIS_HOST"`
	Port         uint32 `json:"port" yaml:"port" env:"DEFAULT_REDIS_PORT"`
	Pass         string `json:"pass" yaml:"pass" env:"DEFAULT_REDIS_PASS"`
	DialTimeout  uint32 `json:"dial_timeout" yaml:"dialTimeout" env:"DEFAULT_REDIS_DIAL_TIMEOUT"`
	ReadTimeout  uint32 `json:"read_timeout" yaml:"readTimeout" env:"DEFAULT_REDIS_READ_TIMEOUT"`
	WriteTimeout uint32 `json:"write_timeout" yaml:"writeTimeout" env:"DEFAULT_REDIS_WRITE_TIMEOUT"`
	DB           uint32 `json:"db" yaml:"db" env:"DEFAULT_REDIS_DB"`
	TracerProvider trace.TracerProvider `json:"-"`
	MeterProvider  metric.MeterProvider `json:"-"`
}
    type RedisConfigOption ¶
type RedisConfigOption func(*RedisConfig)
 Click to show internal directories. 
   Click to hide internal directories.