config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DevMode means development mode.
	DevMode = "dev"
	// TestMode means test mode.
	TestMode = "test"
	// ProductionMode means production mode.
	ProductionMode = "prod"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineConf

type EngineConf struct {
	ServerConf
	Pool pool.Config
}

type ServerConf

type ServerConf struct {
	// Protocol 协议名
	// "tcp", "tcp4", "tcp6", "unix" or "unixpacket"
	// 若只想开启IPv4, 使用tcp4即可
	Protocol string `json:",default=tcp4"`
	// Addr 服务地址
	// 地址可直接使用hostname,但强烈不建议这样做,可能会同时监听多个本地IP
	// 如果端口号不填或端口号为0,例如:"127.0.0.1:" 或 ":0",服务端将选择随机可用端口
	Addr string `json:",default=0.0.0.0"`
	// Name 服务端名称,默认为n-net
	Name string `json:",default=n-net"`
	Mode string `json:",default=dev,options=[dev,test,prod]"`
}

Jump to

Keyboard shortcuts

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