MCPcopy Create free account
hub / github.com/containerd/nerdctl / ContainerStatus

Function ContainerStatus

pkg/containerutil/containerutil.go:81–88  ·  view source on GitHub ↗

ContainerStatus returns the container's status from its task.

(ctx context.Context, c containerd.Container)

Source from the content-addressed store, hash-verified

79
80// ContainerStatus returns the container's status from its task.
81func ContainerStatus(ctx context.Context, c containerd.Container) (containerd.Status, error) {
82 task, err := c.Task(ctx, nil)
83 if err != nil {
84 return containerd.Status{}, err
85 }
86
87 return task.Status(ctx)
88}
89
90// ContainerNetNSPath returns the netns path of a container.
91func ContainerNetNSPath(ctx context.Context, c containerd.Container) (string, error) {

Callers 5

RemoveFunction · 0.92
psActionFunction · 0.92
startContainersFunction · 0.92
topActionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…