server: store containers state on disk
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
2ddc062bbe
commit
da0b8a6157
7 changed files with 30 additions and 0 deletions
|
@ -2,6 +2,7 @@ package oci
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -64,6 +65,11 @@ func NewContainer(id string, name string, bundlePath string, logPath string, net
|
|||
return c, nil
|
||||
}
|
||||
|
||||
// StatePath returns the containers state.json path
|
||||
func (c *Container) StatePath() string {
|
||||
return filepath.Join(c.dir, "state.json")
|
||||
}
|
||||
|
||||
// CreatedAt returns the container creation time
|
||||
func (c *Container) CreatedAt() time.Time {
|
||||
return c.state.Created
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue