Added a comment explaining the function.

This commit is contained in:
Brendan Burns 2014-06-12 11:27:50 -07:00
parent 83c5b2c578
commit c36a7896fd

View File

@ -152,6 +152,9 @@ func (kl *Kubelet) ContainerExists(manifest *api.ContainerManifest, container *a
return false, "", nil
}
// GetContainerID looks at the list of containers on the machine and returns the ID of the container whose name
// matches 'name'. It returns the name of the container, or empty string, if the container isn't found.
// it returns true if the container is found, false otherwise, and any error that occurs.
func (kl *Kubelet) GetContainerID(name string) (string, bool, error) {
containerList, err := kl.DockerClient.ListContainers(docker.ListContainersOptions{})
if err != nil {