add (*Pod).CreateCommand()

Add a method to Pod to easily access its .config.CreateCommand.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2020-06-05 15:34:04 +02:00
parent 557a9c1211
commit b4a410215e

View File

@ -129,6 +129,12 @@ func (p *Pod) CreatedTime() time.Time {
return p.config.CreatedTime
}
// CreateCommand returns the os.Args of the process with which the pod has been
// created.
func (p *Pod) CreateCommand() []string {
return p.config.CreateCommand
}
// CgroupParent returns the pod's CGroup parent
func (p *Pod) CgroupParent() string {
return p.config.CgroupParent