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

Function newComposeRecoverContext

agent/app/service/backup_compose.go:524–536  ·  view source on GitHub ↗
(req dto.CommonRecover)

Source from the content-addressed store, hash-verified

522}
523
524func newComposeRecoverContext(req dto.CommonRecover) (*composeRecoverContext, error) {
525 tmpDir := path.Join(path.Dir(req.File), strings.TrimSuffix(path.Base(req.File), ".tar.gz"))
526 ctx := &composeRecoverContext{
527 req: req,
528 fileOp: files.NewFileOp(),
529 tmpDir: tmpDir,
530 meta: composeBackupMeta{
531 Files: make([]composeBackupFile, 0),
532 Containers: make([]string, 0),
533 },
534 }
535 return ctx, nil
536}
537
538func (c *composeRecoverContext) close() {
539 if c.tmpDir != "" {

Callers 1

handleComposeRecoverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected