conf

package
Version: v0.0.0-...-0c79dac Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFailoverRedis

func InitFailoverRedis(masterName string, sentinelAddrs []string, password string, timeout time.Duration) (*redis.Client, error)

InitFailoverRedis init redis with sentinels

func InitRedis

func InitRedis(addr string, pass string) (*redis.Client, error)

Types

type Config

type Config struct {
	ServiceID       string
	Listen          string `default:":8005"`
	MonitorPort     int    `default:"8006"`
	PublicAddress   string
	PublicPort      int `default:"8005"`
	Tags            []string
	ConsulURL       string
	RedisAddrs      string
	RoyalURL        string
	LogLevel        string `default:"INFO"`
	MessageGPool    int    `default:"5000"`
	ConnectionGPool int    `default:"500"`
}

Config Config

func Init

func Init(file string) (*Config, error)

Init InitConfig

func (Config) String

func (c Config) String() string

type Server

type Server struct {
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL