// Destroy kills any container processes and deletes the bundle directory
Destroy kills any container processes and deletes the bundle directory
// Destroy kills any container processes and deletes the bundle directory
func (c *Containerizer) Destroy(handle string) error {
	mlog := plog.Start("destroy", lager.Data{"handle": handle})
	defer mlog.Info("destroyed")
	path, err := c.depot.Lookup(handle)
	if err != nil {
		return mlog.Err("lookup", err)
	}
	if err := c.runner.withLog(mlog).Kill(path); err != nil {
		return mlog.Err("kill", err)
	}
	return c.depot.Destroy(handle)
}
func ( c * Containerizer ) Destroy ( handle string ) error { mlog := plog . Start ( " " , lager . Data { " " : handle } ) defer mlog . Info ( " " ) path , err := c . depot . Lookup ( handle ) if err != nil { return mlog . Err ( " " , err ) } if err := c . runner . withLog ( mlog ) . Kill ( path ) ; err != nil { return mlog . Err ( " " , err ) } return c . depot . Destroy ( handle ) }
Destroy kills any container processes and deletes the bundle directory
Destroy kills any container processes and deletes the bundle directory