lolly/internal/server/upgrade_windows.go
xfy 2458ac1ed1 docs: 为其余模块添加标准化 godoc 注释
为剩余模块添加完整文档注释:
- app: 应用生命周期管理
- cache: 文件缓存
- config: 配置加载器
- handler: 静态文件处理和错误页面
- http2/http3: HTTP/2 和 HTTP/3 适配器
- loadbalance: 负载均衡算法和均衡器
- middleware: bodylimit、compression、rewrite、security
- mimeutil: MIME 类型检测
- netutil: URL 处理工具
- resolver: DNS 解析器
- server: 服务器升级处理
- ssl: SSL/TLS 和 OCSP
- stream: 流处理
- testutil: 测试工具
- variable: 变量池和 SSL 变量

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 10:59:53 +08:00

56 lines
1.5 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//go:build windows
// Package server 提供 Windows 平台的空实现 stub。
//
// Windows 不支持优雅升级(热升级)功能,该文件提供空的 stub
// 以满足编译依赖。
//
// 作者xfy
package server
import (
"net"
)
// UpgradeManager 空的升级管理器 stubWindows 不支持)。
type UpgradeManager struct{}
// NewUpgradeManager 创建空的升级管理器 stub。
//
// Windows 平台不支持优雅升级(热升级)功能,该函数返回
// 一个空的 UpgradeManager 实例,所有方法均为空操作。
//
// 参数:
// - server: 服务器实例Windows 上不使用)
//
// 返回值:
// - *UpgradeManager: 空操作的管理器实例
func NewUpgradeManager(server *Server) *UpgradeManager {
return &UpgradeManager{}
}
// SetPidFile stub。
func (u *UpgradeManager) SetPidFile(path string) {}
// SetListeners stub。
func (u *UpgradeManager) SetListeners(listeners []net.Listener) {}
// WritePid stub。
func (u *UpgradeManager) WritePid() error { return nil }
// IsChild stub。
func (u *UpgradeManager) IsChild() bool { return false }
// GetInheritedListeners stub。
func (u *UpgradeManager) GetInheritedListeners() ([]net.Listener, error) {
return nil, nil
}
// GracefulUpgrade stubWindows 不支持)。
func (u *UpgradeManager) GracefulUpgrade(newBinary string) error {
return nil // Windows 不支持热升级,静默忽略
}
// SetupSignalHandlers stubWindows 不支持 SIGUSR2
func (u *UpgradeManager) SetupSignalHandlers(newBinary string) {}