Documentation
¶
Index ¶
- func DaemonReload(ctx context.Context) error
- func Disable(ctx context.Context, name string) error
- func Enable(ctx context.Context, name string) error
- func IsEnabled(ctx context.Context, name string) (bool, error)
- func Log(ctx context.Context, name string) (string, error)
- func LogClear(ctx context.Context, name string) error
- func LogTail(ctx context.Context, name string, lines int) (string, error)
- func Mask(ctx context.Context, name string) error
- func Reload(ctx context.Context, name string) error
- func Restart(ctx context.Context, name string) error
- func Start(ctx context.Context, name string) error
- func Status(ctx context.Context, name string) (bool, error)
- func Stop(ctx context.Context, name string) error
- func Unmask(ctx context.Context, name string) error
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServiceInfo ¶
type ServiceInfo struct {
Status string // 运行状态 (active, inactive, failed, etc.)
PID int // 主进程 PID
Memory int64 // 内存使用(字节)
CPU float64 // CPU 使用率
Uptime string // 运行时间
}
ServiceInfo 服务详细信息
func GetServiceInfo ¶
func GetServiceInfo(ctx context.Context, name string) (*ServiceInfo, error)
GetServiceInfo 获取服务详细信息
Click to show internal directories.
Click to hide internal directories.