Merge pull request #441 from hqhq/hq_change_set_api
add parameter to Set api
This commit is contained in:
commit
4622c8ac95
|
@ -96,7 +96,7 @@ type Container interface {
|
||||||
//
|
//
|
||||||
// errors:
|
// errors:
|
||||||
// Systemerror - System error.
|
// Systemerror - System error.
|
||||||
Set() error
|
Set(config configs.Config) error
|
||||||
|
|
||||||
// Start a process inside the container. Returns error if process fails to
|
// Start a process inside the container. Returns error if process fails to
|
||||||
// start. You can track process lifecycle with passed Process structure.
|
// start. You can track process lifecycle with passed Process structure.
|
||||||
|
|
|
@ -78,9 +78,10 @@ func (c *linuxContainer) Stats() (*Stats, error) {
|
||||||
return stats, nil
|
return stats, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *linuxContainer) Set() error {
|
func (c *linuxContainer) Set(config configs.Config) error {
|
||||||
c.m.Lock()
|
c.m.Lock()
|
||||||
defer c.m.Unlock()
|
defer c.m.Unlock()
|
||||||
|
c.config = &config
|
||||||
return c.cgroupManager.Set(c.config)
|
return c.cgroupManager.Set(c.config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue