From 1ea17d73fe03ea98de37006017bfe840963441e9 Mon Sep 17 00:00:00 2001 From: rajasec Date: Tue, 10 May 2016 15:26:10 +0530 Subject: [PATCH] Updated the libcontainer interface comments Signed-off-by: rajasec --- libcontainer/container.go | 16 ++++++++-------- libcontainer/container_linux.go | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libcontainer/container.go b/libcontainer/container.go index 1a71179c9..6844fbc7a 100644 --- a/libcontainer/container.go +++ b/libcontainer/container.go @@ -75,8 +75,8 @@ type BaseContainer interface { // Returns the current status of the container. // // errors: - // ContainerDestroyed - Container no longer exists, - // SystemError - System error. + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. Status() (Status, error) // State returns the current container's state information. @@ -91,8 +91,8 @@ type BaseContainer interface { // Returns the PIDs inside this container. The PIDs are in the namespace of the calling process. // // errors: - // ContainerDestroyed - Container no longer exists, - // SystemError - System error. + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. // // Some of the returned PIDs may no longer refer to processes in the Container, unless // the Container state is PAUSED in which case every PID in the slice is valid. @@ -101,8 +101,8 @@ type BaseContainer interface { // Returns statistics for the container. // // errors: - // ContainerDestroyed - Container no longer exists, - // SystemError - System error. + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. Stats() (*Stats, error) // Set resources of container as configured @@ -117,7 +117,7 @@ type BaseContainer interface { // start. You can track process lifecycle with passed Process structure. // // errors: - // ContainerDestroyed - Container no longer exists, + // ContainerNotExists - Container no longer exists, // ConfigInvalid - config is invalid, // ContainerPaused - Container is paused, // SystemError - System error. @@ -128,7 +128,7 @@ type BaseContainer interface { // opens the fifo after start returns. // // errors: - // ContainerDestroyed - Container no longer exists, + // ContainerNotExists - Container no longer exists, // ConfigInvalid - config is invalid, // ContainerPaused - Container is paused, // SystemError - System error. diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index 4a80fc400..6535f7355 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -92,7 +92,8 @@ type Container interface { // If the Container state is PAUSED, do nothing. // // errors: - // ContainerDestroyed - Container no longer exists, + // ContainerNotExists - Container no longer exists, + // ContainerNotRunning - Container not running, // Systemerror - System error. Pause() error @@ -101,7 +102,8 @@ type Container interface { // If the Container state is RUNNING, do nothing. // // errors: - // ContainerDestroyed - Container no longer exists, + // ContainerNotExists - Container no longer exists, + // ContainerNotPaused - Container is not paused, // Systemerror - System error. Resume() error