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

Method IsCreated

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

Source from the content-addressed store, hash-verified

35}
36
37func (i *Instance) IsCreated() bool {
38 _, err := utils.DockerClient.ContainerInspect(context.Background(), fmt.Sprintf(
39 "%s_%s", i.Type, i.InstanceID,
40 ), client.ContainerInspectOptions{})
41 if err != nil {
42 return false
43 }
44 return true
45}
46
47func (i *Instance) IsRunning() bool {
48 info, err := utils.DockerClient.ContainerInspect(context.Background(), fmt.Sprintf(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected