Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoServer ¶
type EchoServer struct {
// contains filtered or unexported fields
}
EchoServer Echo HTTP服务器
type Params ¶ added in v1.0.6
type Params struct { fx.In Routes []service.RegisterRouter `group:"routes"` Enforcer *casbin.Enforcer Cfg configs.Config Store *configs.Store }
Params 依赖注入参数
type ServerConfig ¶ added in v1.0.6
type ServerConfig struct { // 端口 Port string // 读取超时 ReadTimeout time.Duration // 写入超时 WriteTimeout time.Duration // 空闲超时 IdleTimeout time.Duration // 关闭超时 ShutdownTimeout time.Duration // 是否隐藏Banner HideBanner bool // 是否启用调试模式 Debug bool }
ServerConfig 服务器配置
func DefaultServerConfig ¶ added in v1.0.6
func DefaultServerConfig() *ServerConfig
DefaultServerConfig 默认服务器配置
func FromAppConfig ¶ added in v1.0.6
func FromAppConfig(cfg configs.Config) *ServerConfig
FromAppConfig 从应用配置创建服务器配置
Click to show internal directories.
Click to hide internal directories.