lolly/internal/server/upgrade_windows.go
xfy 26ffc6b60d fix(lint): 修复 Windows 平台文件 lint 错误
- 调整 App 结构体字段对齐以优化内存布局
- 添加文件末尾换行符

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:51:44 +08:00

47 lines
1.2 KiB
Go
Raw 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。
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) {}