MCPcopy Index your code
hub / github.com/devspace-sh/devspace / Reset

Method Reset

pkg/devspace/devpod/manager.go:194–207  ·  view source on GitHub ↗
(ctx devspacecontext.Context, name string, options *deploy.PurgeOptions)

Source from the content-addressed store, hash-verified

192}
193
194func (d *devPodManager) Reset(ctx devspacecontext.Context, name string, options *deploy.PurgeOptions) error {
195 lock := d.lockFactory.GetLock(name)
196 lock.Lock()
197 defer lock.Unlock()
198
199 d.stop(name)
200 devPod, ok := ctx.Config().RemoteCache().GetDevPod(name)
201 if ok {
202 _, err := podreplace.NewPodReplacer().RevertReplacePod(ctx, &devPod, options)
203 return err
204 }
205
206 return nil
207}
208
209func (d *devPodManager) Stop(ctx devspacecontext.Context, name string) {
210 lock := d.lockFactory.GetLock(name)

Callers

nothing calls this directly

Calls 9

stopMethod · 0.95
NewPodReplacerFunction · 0.92
LockMethod · 0.80
UnlockMethod · 0.80
GetLockMethod · 0.65
GetDevPodMethod · 0.65
RemoteCacheMethod · 0.65
ConfigMethod · 0.65
RevertReplacePodMethod · 0.65

Tested by

no test coverage detected