redis

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

tao-redis

Documentation

Index

Constants

View Source
const ConfigKey = "redis"

ConfigKey for this repo

Variables

R config of redis

Rdb to describe redis db client 1. If the MasterName option is specified, a sentinel-backed FailoverClient is returned. 2. if the number of Addrs is two or more, a ClusterClient is returned. 3. Otherwise, a single-node Client is returned.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addrs            []string `json:"addrs"`
	MasterName       string   `json:"master_name,omitempty"`
	MaxPoolSize      int      `json:"max_pool_size"`
	MinPoolSize      int      `json:"min_pool_size"`
	Username         string   `json:"username,omitempty"`
	Password         string   `json:"password,omitempty"`
	SentinelPassword string   `json:"sentinel_password,omitempty"`
	DB               int      `json:"db"`
	RunAfters        []string `json:"run_after,omitempty"`
}

Config implements tao.Config

func (*Config) Name

func (r *Config) Name() string

Name of Config

func (*Config) RunAfter

func (r *Config) RunAfter() []string

RunAfter defines pre task names

func (*Config) ToTask

func (r *Config) ToTask() tao.Task

ToTask transform itself to Task

func (*Config) ValidSelf

func (r *Config) ValidSelf()

ValidSelf with some default values

Jump to

Keyboard shortcuts

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