MCPcopy Create free account
hub / github.com/OpenSN-Library/OpenSN-Library / IsRunning

Method IsRunning

daemon/model/instance.go:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (i *Instance) IsRunning() bool {
48 info, err := utils.DockerClient.ContainerInspect(context.Background(), fmt.Sprintf(
49 "%s_%s", i.Type, i.InstanceID,
50 ), client.ContainerInspectOptions{})
51 if err != nil {
52 return false
53 }
54 return info.Container.State.Running
55}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected