将代码与测试注释改为中文以符合仓库规范;新增中文部署指南、 示例配置,并完善构建脚本对 VERSION 注入的说明。 Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
//go:build !linux && !windows
|
|
|
|
package service
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
|
|
"mfd-monitor-agent/internal/config"
|
|
)
|
|
|
|
// unsupportedManager 在本平台将服务生命周期操作报告为不支持。
|
|
type unsupportedManager struct{}
|
|
|
|
// newManager 返回在不支持平台上对所有服务操作均失败的管理器。
|
|
func newManager() Manager {
|
|
return unsupportedManager{}
|
|
}
|
|
|
|
// Install 报告本平台不支持服务安装。
|
|
func (unsupportedManager) Install(string, config.Config, InstallOptions) error {
|
|
return fmt.Errorf("service install is not implemented for %s", runtime.GOOS)
|
|
}
|
|
|
|
// Uninstall 报告本平台不支持服务卸载。
|
|
func (unsupportedManager) Uninstall(config.Config) error {
|
|
return fmt.Errorf("service uninstall is not implemented for %s", runtime.GOOS)
|
|
}
|
|
|
|
// Start 报告本平台不支持服务启动。
|
|
func (unsupportedManager) Start(config.Config) error {
|
|
return fmt.Errorf("service start is not implemented for %s", runtime.GOOS)
|
|
}
|
|
|
|
// Stop 报告本平台不支持服务停止。
|
|
func (unsupportedManager) Stop(config.Config) error {
|
|
return fmt.Errorf("service stop is not implemented for %s", runtime.GOOS)
|
|
}
|