Documentation
¶
Index ¶
Constants ¶
View Source
const PkgName = "http_server"
Variables ¶
This section is empty.
Functions ¶
func DefaultMetricPathRewriter ¶ added in v1.1.9
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 MetricPathRewriter MetricPathRewriter }
func (Config) InitLogger ¶
func (config Config) InitLogger()
type MetricPathRewriter ¶ added in v1.1.9
Click to show internal directories.
Click to hide internal directories.