Add checkpoint timestamp based on mtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
7baee380ea
commit
3fdc48eb01
7 changed files with 18 additions and 14 deletions
|
@ -314,6 +314,7 @@ func (s *server) listCheckpoints(w http.ResponseWriter, r *http.Request) {
|
|||
Tcp: c.Tcp,
|
||||
Shell: c.Shell,
|
||||
UnixSockets: c.UnixSockets,
|
||||
Timestamp: c.Timestamp,
|
||||
})
|
||||
}
|
||||
if err := json.NewEncoder(w).Encode(out); err != nil {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package v1
|
||||
|
||||
import "time"
|
||||
|
||||
type State struct {
|
||||
Containers []Container `json:"containers"`
|
||||
Machine Machine `json:"machine"`
|
||||
|
@ -58,9 +60,10 @@ type Event struct {
|
|||
}
|
||||
|
||||
type Checkpoint struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Exit bool `json:"exit,omitempty"`
|
||||
Tcp bool `json:"tcp"`
|
||||
UnixSockets bool `json:"unixSockets"`
|
||||
Shell bool `json:"shell"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Timestamp time.Time `json:"timestamp,omitempty"`
|
||||
Exit bool `json:"exit,omitempty"`
|
||||
Tcp bool `json:"tcp"`
|
||||
UnixSockets bool `json:"unixSockets"`
|
||||
Shell bool `json:"shell"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue