moby/daemon/list_windows.go
David Calavera 6bb0d1816a Move Container to its own package.
So other packages don't need to import the daemon package when they
want to use this struct.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-03 17:39:49 +01:00

20 lines
519 B
Go

package daemon
import (
"strings"
"github.com/docker/docker/container"
)
// excludeByIsolation is a platform specific helper function to support PS
// filtering by Isolation. This is a Windows-only concept, so is a no-op on Unix.
func excludeByIsolation(container *container.Container, ctx *listContext) iterationAction {
i := strings.ToLower(string(container.HostConfig.Isolation))
if i == "" {
i = "default"
}
if !ctx.filters.Match("isolation", i) {
return excludeContainer
}
return includeContainer
}