docs(agent): 统一中文注释并补充部署文档
将代码与测试注释改为中文以符合仓库规范;新增中文部署指南、 示例配置,并完善构建脚本对 VERSION 注入的说明。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,25 +2,25 @@ package service
|
||||
|
||||
import "mfd-monitor-agent/internal/config"
|
||||
|
||||
// InstallOptions carries platform-specific service installation inputs.
|
||||
// InstallOptions 携带平台相关的服务安装参数。
|
||||
type InstallOptions struct {
|
||||
// ConfigPath is preserved in the service command line when a config file was supplied.
|
||||
// ConfigPath 在提供了配置文件时,会写入服务命令行中的 -config 参数。
|
||||
ConfigPath string
|
||||
}
|
||||
|
||||
// Manager controls operating system service installation and lifecycle commands.
|
||||
// Manager 控制操作系统服务的安装与生命周期命令。
|
||||
type Manager interface {
|
||||
// Install registers the agent executable as an operating system service.
|
||||
// Install 将 agent 可执行文件注册为操作系统服务。
|
||||
Install(executable string, cfg config.Config, opts InstallOptions) error
|
||||
// Uninstall removes the operating system service registration.
|
||||
// Uninstall 移除操作系统服务注册。
|
||||
Uninstall(cfg config.Config) error
|
||||
// Start asks the operating system service manager to start the agent service.
|
||||
// Start 请求操作系统服务管理器启动 agent 服务。
|
||||
Start(cfg config.Config) error
|
||||
// Stop asks the operating system service manager to stop the agent service.
|
||||
// Stop 请求操作系统服务管理器停止 agent 服务。
|
||||
Stop(cfg config.Config) error
|
||||
}
|
||||
|
||||
// NewManager returns the platform-specific service manager.
|
||||
// NewManager 返回平台相关的服务管理器。
|
||||
func NewManager() Manager {
|
||||
return newManager()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user