Merge pull request #441 from hqhq/hq_change_set_api

add parameter to Set api
This commit is contained in:
Victor Marmol 2015-03-18 10:56:20 -07:00
commit 4622c8ac95
2 changed files with 3 additions and 2 deletions

View File

@ -96,7 +96,7 @@ type Container interface {
//
// errors:
// Systemerror - System error.
Set() error
Set(config configs.Config) error
// Start a process inside the container. Returns error if process fails to
// start. You can track process lifecycle with passed Process structure.

View File

@ -78,9 +78,10 @@ func (c *linuxContainer) Stats() (*Stats, error) {
return stats, nil
}
func (c *linuxContainer) Set() error {
func (c *linuxContainer) Set(config configs.Config) error {
c.m.Lock()
defer c.m.Unlock()
c.config = &config
return c.cgroupManager.Set(c.config)
}