(cmd *cobra.Command, expiredAt string)
| 113 | } |
| 114 | |
| 115 | func prometheusClear(cmd *cobra.Command, expiredAt string) { |
| 116 | server := common.GetServerInfo(cmd) |
| 117 | url := fmt.Sprintf("http://%s:%d/v1/prometheus-cleaner-tasks/", server.IP, server.Port) |
| 118 | resp, err := common.CURLPerform(http.MethodPost, url, map[string]interface{}{"EXPIRED_AT": expiredAt}, "", []common.HTTPOption{common.WithTimeout(common.GetTimeout(cmd)), common.WithORGID(common.GetORGID(cmd))}...) |
| 119 | if err != nil { |
| 120 | fmt.Fprintln(os.Stderr, err) |
| 121 | return |
| 122 | } |
| 123 | fmt.Println(resp) |
| 124 | return |
| 125 | } |
no test coverage detected