mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Add test cases simulating build or run commands that take very long * Pass a context around to relevant functions and methods This will allow to handle cancellations and timeouts and deadlines as needed * Pass the context to Podman exec command too * fixup! Add test cases simulating build or run commands that take very long
18 lines
905 B
Go
18 lines
905 B
Go
package remotecmd
|
|
|
|
import "context"
|
|
|
|
// RemoteProcessHandler is an interface for managing processes that are intended to be executed remotely,
|
|
// independently of container orchestrator
|
|
type RemoteProcessHandler interface {
|
|
|
|
// GetProcessInfoForCommand returns information about the process representing the given command.
|
|
GetProcessInfoForCommand(ctx context.Context, def CommandDefinition, podName string, containerName string) (RemoteProcessInfo, error)
|
|
|
|
// StartProcessForCommand starts a process with the provided Devfile command to execute remotely.
|
|
StartProcessForCommand(ctx context.Context, def CommandDefinition, podName string, containerName string, outputHandler CommandOutputHandler) error
|
|
|
|
// StopProcessForCommand stops the process representing the given Devfile command.
|
|
StopProcessForCommand(ctx context.Context, def CommandDefinition, podName string, containerName string) error
|
|
}
|