server

package
v0.0.0-...-3ed7d68 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAllServers

func CloseAllServers()

CloseAllServers 关闭所有正在运行的服务器

func GetTLSConfig

func GetTLSConfig(addr string, cfg *config.Config) (*tls.Config, string, string)

getTLSConfig 根据端口自动选择对应的 TLS 配置

func RegisterFullMux

func RegisterFullMux(mux *http.ServeMux, cfg *config.Config)

全功能 = monitor/web + jx + 默认代理

func RegisterJXAndProxyMux

func RegisterJXAndProxyMux(mux *http.ServeMux, cfg *config.Config)

jx + 默认代理

func RegisterMonitorWebMux

func RegisterMonitorWebMux(mux *http.ServeMux, cfg *config.Config)

monitor + web

func RegisterMux

func RegisterMux(addr string, cfg *config.Config) *http.ServeMux

func SecurityHeaders

func SecurityHeaders(next http.Handler) http.Handler

func SetHTTPHandler

func SetHTTPHandler(addr string, h http.Handler)

平滑替换所有端口的 Handler

func StartHTTPServer

func StartHTTPServer(ctx context.Context, addr string, upgrader *tableflip.Upgrader) error

func StartHTTPServerWithConfig

func StartHTTPServerWithConfig(ctx context.Context, addr string, upgrader *tableflip.Upgrader, cfg *config.Config) error

StartHTTPServerWithConfig 启动HTTP服务器并使用指定配置

Types

This section is empty.

Jump to

Keyboard shortcuts

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