feat: 添加memory-mode-available,使用available内存

This commit is contained in:
Akizon77
2025-06-18 14:30:12 +08:00
parent 8cec263324
commit 7c79020153
3 changed files with 22 additions and 13 deletions

View File

@@ -58,8 +58,9 @@ func init() {
RootCmd.MarkPersistentFlagRequired("token")
RootCmd.PersistentFlags().StringVarP(&flags.Endpoint, "endpoint", "e", "", "API endpoint")
RootCmd.MarkPersistentFlagRequired("endpoint")
RootCmd.PersistentFlags().BoolVarP(&flags.DisableAutoUpdate, "disable-auto-update", "d", false, "Disable automatic updates")
RootCmd.PersistentFlags().BoolVarP(&flags.DisableWebSsh, "disable-web-ssh", "w", false, "Disable web SSH")
RootCmd.PersistentFlags().BoolVar(&flags.DisableAutoUpdate, "disable-auto-update", false, "Disable automatic updates")
RootCmd.PersistentFlags().BoolVar(&flags.DisableWebSsh, "disable-web-ssh", false, "Disable remote control(web ssh and rce)")
RootCmd.PersistentFlags().BoolVar(&flags.MemoryModeAvailable, "memory-mode-available", false, "Report memory as available instead of used.")
RootCmd.PersistentFlags().Float64VarP(&flags.Interval, "interval", "i", 1.0, "Interval in seconds")
RootCmd.PersistentFlags().BoolVarP(&flags.IgnoreUnsafeCert, "ignore-unsafe-cert", "u", false, "Ignore unsafe certificate errors")
RootCmd.PersistentFlags().IntVarP(&flags.MaxRetries, "max-retries", "r", 3, "Maximum number of retries")