MCPcopy
hub / github.com/determined-ai/determined / ContainerRuntime

Interface ContainerRuntime

agent/internal/container/container_runtime.go:17–46  ·  view source on GitHub ↗

ContainerRuntime is our interface for interacting with runtimes like Docker.

Source from the content-addressed store, hash-verified

15
16// ContainerRuntime is our interface for interacting with runtimes like Docker.
17type ContainerRuntime interface {
18 ReattachContainer(
19 ctx context.Context,
20 id cproto.ID,
21 ) (*docker.Container, *aproto.ExitCode, error)
22
23 PullImage(ctx context.Context, req docker.PullImage, p events.Publisher[docker.Event]) error
24
25 // TODO(DET-9075): Refactor Create and Run to not be separate calls.
26 CreateContainer(
27 ctx context.Context,
28 id cproto.ID,
29 req cproto.RunSpec,
30 p events.Publisher[docker.Event],
31 ) (string, error)
32
33 // TODO(DET-9075): Make a custom return type rather than just reusing the Docker type.
34 RunContainer(
35 ctx context.Context,
36 waitCtx context.Context,
37 id string,
38 p events.Publisher[docker.Event],
39 ) (*docker.Container, error)
40
41 SignalContainer(ctx context.Context, id string, sig syscall.Signal) error
42
43 RemoveContainer(ctx context.Context, id string, force bool) error
44
45 ListRunningContainers(ctx context.Context, fs filters.Args) (map[cproto.ID]types.Container, error)
46}

Callers 10

reattachMethod · 0.65
runMethod · 0.65
runMethod · 0.65
runMethod · 0.65
runMethod · 0.65
waitMethod · 0.65
TestManagerFunction · 0.65
ReattachContainersMethod · 0.65
runMethod · 0.65
ReattachContainersMethod · 0.65

Implementers 1

Clientagent/pkg/docker/docker.go

Calls

no outgoing calls

Tested by

no test coverage detected