setting

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

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// gate conf
	PendingWriteNum        = 2000
	MaxMsgLen       uint32 = 4096
	HTTPTimeout            = 10 * time.Second
	LenMsgLen              = 2
	LittleEndian           = false

	// skeleton conf
	GoLen              = 10000
	TimerDispatcherLen = 10000
	AsynCallLen        = 10000
	ChanRPCLen         = 10000
)
View Source
var AppSetting = &App{}
View Source
var DatabaseSetting = &Database{}
View Source
var LogSetting = &Log{}
View Source
var RedisSetting = &Redis{}
View Source
var ServerSetting = &Server{}

Functions

func Setup

func Setup()

Setup initialize the configuration instance

Types

type App

type App struct {
	RuntimeRootPath string

	ExportSavePath string

	LogSavePath string
	LogSaveName string
	LogFileExt  string
	TimeFormat  string
	LogFlag     int
}

type Database

type Database struct {
	Type        string
	User        string
	Password    string
	Host        string
	Name        string
	TablePrefix string
}

type Log

type Log struct {
	ServiceName string
	App         string
	Http        string
	Default     string
	Login       string
}

type Redis

type Redis struct {
	Host     string
	Password string
	DB       int
	Cluster  bool
	Hosts    []string
}

type Server

type Server struct {
	LogLevel     string
	HttpPort     int
	TcpAddr      string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	MaxConnNum   int
	ConsolePort  int
	ProfilePath  string

	WSAddr   string
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

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