Documentation
¶
Index ¶
Constants ¶
View Source
const PkgName = "http_server"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string
Host string // IP地址,默认0.0.0.0
Port int // Port端口,默认80
Timeout time.Duration
SlowLogThreshold time.Duration // 慢日志记录的阈值,默认 1s
EnableTraceInterceptor bool
EnableMetricInterceptor bool
EnableLogInterceptor bool
EnableAccessInterceptor bool // 是否开启记录请求数据,默认开启
EnableFielLogger bool // 将日志输出到文件
FielLoggerPath string
}
func (Config) InitLogger ¶
func (config Config) InitLogger()
Click to show internal directories.
Click to hide internal directories.