server

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// 如果 Handler 字段的值为 nil,则会调用 http.DefaultServeMux 来处理请求
	Handler http.Handler
	// ReadHeaderTimeout 是允许读取请求头的时间量。在读取了请求头之后,连接的读取截止时间将被重置,处理程序可以决定对请求体来说什么被认为是过于慢的。如果 ReadHeaderTimeout 为零,则使用 ReadTimeout 的值。如果两者都为零,则没有超时。
	ReadHeaderTimeout time.Duration
	WebAddr           string
	// 是否是https
	Ishttps bool
	// 证书文件
	CertFile string
	// 私钥文件
	KeyFile string
}

func (*Config) Server

func (h *Config) Server() error

启动服务

Jump to

Keyboard shortcuts

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