Add initial framework for stats
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
d9e8fe62cb
commit
2290eaaccd
4 changed files with 33 additions and 1 deletions
|
@ -29,6 +29,16 @@ type Stdio struct {
|
|||
Stdout string
|
||||
}
|
||||
|
||||
type Stat struct {
|
||||
// Timestamp is the time that the statistics where collected
|
||||
Timestamp time.Time
|
||||
// Data is the raw stats
|
||||
// TODO: it is currently an interface because we don't know what type of exec drivers
|
||||
// we will have or what the structure should look like at the moment os the containers
|
||||
// can return what they want and we could marshal to json or whatever.
|
||||
Data interface{}
|
||||
}
|
||||
|
||||
type Checkpoint struct {
|
||||
// Timestamp is the time that checkpoint happened
|
||||
Timestamp time.Time
|
||||
|
@ -75,4 +85,6 @@ type Container interface {
|
|||
DeleteCheckpoint(name string) error
|
||||
// Restore restores the container to that of the checkpoint provided by name
|
||||
Restore(name string) error
|
||||
// Stats returns realtime container stats and resource information
|
||||
Stats() (*Stat, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue