ContainerRuntime is our interface for interacting with runtimes like Docker.
| 15 | |
| 16 | // ContainerRuntime is our interface for interacting with runtimes like Docker. |
| 17 | type 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 | } |
no outgoing calls
no test coverage detected