local

package
v0.0.0-...-6db10bd Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDBConfig

func LoadDBConfig(context *cli.Context)

LoadDBConfig load DBConfig

Types

type DBConfig

type DBConfig struct {
	URL               string `json:"url"`
	Driver            string `json:"driver"`
	SingularTable     bool   `json:"singularTable"`
	LogMode           bool   `json:"logMode"`
	MaxIdleConnection int    `json:"maxIdleConnection"`
	MaxOpenConnection int    `json:"maxOpenConnection"`
}

DBConfig struct

func GetDBConfig

func GetDBConfig() *DBConfig

func Instance

func Instance() *DBConfig

type RedisConfig

type RedisConfig struct {
	Enabled  bool           `json:"enabled"`
	Conn     string         `json:"conn"`
	Password string         `json:"password"`
	DBNum    int            `json:"dbNum"`
	Timeout  int            `json:"timeout"`
	Sentinel *RedisSentinel `json:"sentinel"`
}

func GetRedisConfig

func GetRedisConfig() *RedisConfig

type RedisSentinel

type RedisSentinel struct {
	Enabled bool   `json:"enabled"`
	Master  string `json:"master"`
	XNodes  string `json:"nodes"`
	// contains filtered or unexported fields
}

func (*RedisSentinel) GetNodes

func (s *RedisSentinel) GetNodes() []string

Nodes redis 哨兵节点列表

Jump to

Keyboard shortcuts

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