💥 feat(agent)!: 添加主机监控代理首版
* 实现周期采集、快照缓存、本地 HTTP API 和主动上报 * 补齐 Linux 和 Windows 主机、网络、资源、进程和 TCP 采集 * 添加服务生命周期管理、配置加载、构建脚本和测试覆盖 BREAKING CHANGE: network.ips 拆分为 network.ipv4s 和 network.ipv6s。
This commit is contained in:
38
internal/service/service_other.go
Normal file
38
internal/service/service_other.go
Normal file
@@ -0,0 +1,38 @@
|
||||
//go:build !linux && !windows
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"mfd-monitor-agent/internal/config"
|
||||
)
|
||||
|
||||
// unsupportedManager reports service lifecycle operations as unsupported on this platform.
|
||||
type unsupportedManager struct{}
|
||||
|
||||
// newManager returns a manager that fails all service operations on unsupported platforms.
|
||||
func newManager() Manager {
|
||||
return unsupportedManager{}
|
||||
}
|
||||
|
||||
// Install reports that service installation is unsupported on this platform.
|
||||
func (unsupportedManager) Install(string, config.Config, InstallOptions) error {
|
||||
return fmt.Errorf("service install is not implemented for %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
// Uninstall reports that service removal is unsupported on this platform.
|
||||
func (unsupportedManager) Uninstall(config.Config) error {
|
||||
return fmt.Errorf("service uninstall is not implemented for %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
// Start reports that service start is unsupported on this platform.
|
||||
func (unsupportedManager) Start(config.Config) error {
|
||||
return fmt.Errorf("service start is not implemented for %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
// Stop reports that service stop is unsupported on this platform.
|
||||
func (unsupportedManager) Stop(config.Config) error {
|
||||
return fmt.Errorf("service stop is not implemented for %s", runtime.GOOS)
|
||||
}
|
||||
Reference in New Issue
Block a user