MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / Restart

Function Restart

agent/utils/compose/compose.go:198–206  ·  view source on GitHub ↗
(filePath string)

Source from the content-addressed store, hash-verified

196}
197
198func Restart(filePath string) (string, error) {
199 if err := checkCmd(); err != nil {
200 return "", err
201 }
202 base, extra := getComposeBaseCmd()
203 args := append(extra, loadFiles(filePath)...)
204 args = append(args, "restart")
205 return cmd.NewCommandMgr(cmd.WithTimeout(20*time.Minute)).RunWithStdout(base, args...)
206}
207
208func Operate(filePath, operation string) (string, error) {
209 if err := checkCmd(); err != nil {

Callers

nothing calls this directly

Calls 4

checkCmdFunction · 0.85
getComposeBaseCmdFunction · 0.85
loadFilesFunction · 0.85
RunWithStdoutMethod · 0.45

Tested by

no test coverage detected