conf

package
v0.0.0-...-e7f8777 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFailoverRedis

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

func InitRedis

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

func MakeAccessLog

func MakeAccessLog() *accesslog.AccessLog

Types

type Config

type Config struct {
	ServiceID     string
	NodeID        int64
	Listen        string `default:":8080"`
	PublicAddress string
	PublicPort    uint16 `default:"8080"`
	Tags          []string
	EtcdEndpoints string
	RedisAddrs    string
	Driver        string `default:"mysql"`
	BaseDB        string
	MessageDB     string
	LogLevel      string `default:"debug"`
}

func Init

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

func (Config) String

func (c Config) String() string

type Server

type Server struct {
}

Jump to

Keyboard shortcuts

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