Change Container interface to include Info
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
c869eb0c61
commit
47ececd6b8
8 changed files with 23 additions and 23 deletions
|
@ -25,12 +25,11 @@ type Container struct {
|
|||
shim shim.ShimClient
|
||||
}
|
||||
|
||||
func (c *Container) ID() string {
|
||||
return c.id
|
||||
}
|
||||
|
||||
func (Container) Runtime() string {
|
||||
return runtimeName
|
||||
func (c *Container) Info() containerd.ContainerInfo {
|
||||
return containerd.ContainerInfo{
|
||||
ID: c.id,
|
||||
Runtime: runtimeName,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Container) Start(ctx context.Context) error {
|
||||
|
|
|
@ -51,7 +51,6 @@ type Runtime struct {
|
|||
func (r *Runtime) Create(ctx context.Context, id string, opts containerd.CreateOpts) (containerd.Container, error) {
|
||||
path, err := r.newBundle(id, opts.Spec)
|
||||
if err != nil {
|
||||
os.RemoveAll(path)
|
||||
return nil, err
|
||||
}
|
||||
s, err := newShim(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue