From 9b9a0ac8ad1b3ad5dd80b52bce28b7989bfa8d14 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 19 Mar 2018 13:44:49 -0400 Subject: [PATCH] Add task.ID() API Signed-off-by: Michael Crosby --- process.go | 2 ++ task.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/process.go b/process.go index 6b1120337..fb1fcdcd8 100644 --- a/process.go +++ b/process.go @@ -30,6 +30,8 @@ import ( // Process represents a system process type Process interface { + // ID of the process + ID() string // Pid is the system specific process id Pid() uint32 // Start starts the process executing the user's defined binary diff --git a/task.go b/task.go index f801d493d..42740b518 100644 --- a/task.go +++ b/task.go @@ -169,6 +169,11 @@ type task struct { pid uint32 } +// ID of the task +func (t *task) ID() string { + return t.id +} + // Pid returns the pid or process id for the task func (t *task) Pid() uint32 { return t.pid