webserver

package
v3.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithIPv6Listens added in v3.3.6

func WithIPv6Listens(listens []types.Listen) []types.Listen

Types

type Dialect added in v3.3.6

type Dialect struct {
	types.Dialect
	Type Type
}

func Get added in v3.3.6

func Get(t Type) (Dialect, error)

func (Dialect) MergeHTTPSListens added in v3.3.6

func (d Dialect) MergeHTTPSListens(listens []types.Listen, listenIPv6 bool) []types.Listen

MergeHTTPSListens 补充 443 监听,已有的 443 地址补齐 SSL 参数

func (Dialect) NewVhost added in v3.3.6

func (d Dialect) NewVhost(typ, configDir string) (types.Vhost, error)

NewVhost 按网站类型构造站点 vhost,typ 取值 proxy、php、static

func (Dialect) Reload added in v3.3.6

func (d Dialect) Reload(ctx context.Context) error

Reload 重载服务,失败时附带配置测试输出

func (Dialect) ReloadIfRunning added in v3.3.6

func (d Dialect) ReloadIfRunning(ctx context.Context) error

ReloadIfRunning 仅在服务运行时重载,未运行时配置会在下次启动时生效

func (Dialect) Test added in v3.3.6

func (d Dialect) Test(ctx context.Context) (string, error)

Test 执行配置检查并返回输出,各方言的检查命令都已合并 stderr

type Type

type Type string
const (
	TypeNginx         Type = "nginx"
	TypeApache        Type = "apache"
	TypeOpenLiteSpeed Type = "openlitespeed"
	TypeCaddy         Type = "caddy"
)

func Types added in v3.3.6

func Types() []Type

Directories

Path Synopsis
Package conf 是各 Web 服务器配置共用的语法树:指令由名称、参数和可选子块组成, 各方言只负责自己的分词、解析与渲染,查询与修改在这里统一实现
Package conf 是各 Web 服务器配置共用的语法树:指令由名称、参数和可选子块组成, 各方言只负责自己的分词、解析与渲染,查询与修改在这里统一实现

Jump to

Keyboard shortcuts

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