config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConf

type AppConf struct {
	AppName          string     // 服务名称
	MaxPackSize      int        // 数据包最大长度
	MaxConn          int        // 最大允许连接数
	WorkerPoolSize   int        // 工作池容量
	WorkerTaskMaxLen int        // 每个工作队列可执行最大任务数量
	MaxMsgChanLen    int        // 读写通道最大限度
	MaxFlowSecond    int        // 每秒允许的最大请求数量
	ProtocolIsJson   bool       // 是否使用json协议
	ConnRWTimeOut    int        // 连接读写超时时间(秒)
	ServerTCP        ServerConf // tcp服务
	ServerWS         ServerConf // websocket服务
	ServerHTTP       ServerConf // http服务
	ServerKCP        ServerConf // http服务
}

func GetServerConf

func GetServerConf() *AppConf

获取默认配置

type ServerConf

type ServerConf struct {
	Address     string // IP地址
	Port        string // 端口
	TLSCertPath string // ssl证书路径
	TLSKeyPath  string // ssl密钥路径
}

Jump to

Keyboard shortcuts

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