mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
feat: "exec" command to start processes inside remote containers (#139)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package api
|
||||
|
||||
import "io"
|
||||
|
||||
// ExecOptions contains configuration for executing a command in a container.
|
||||
type ExecOptions struct {
|
||||
// Command is the command to run in the container.
|
||||
Command []string
|
||||
// AttachStdin attaches the stdin stream to the exec session.
|
||||
AttachStdin bool
|
||||
// AttachStdout attaches the stdout stream to the exec session.
|
||||
AttachStdout bool
|
||||
// AttachStderr attaches the stderr stream to the exec session.
|
||||
AttachStderr bool
|
||||
// Tty allocates a pseudo-TTY for the exec session.
|
||||
Tty bool
|
||||
// Detach runs the command in the background without attaching to streams.
|
||||
Detach bool
|
||||
|
||||
//// Not yet implemented fields
|
||||
// User specifies the user to run the command as.
|
||||
User string
|
||||
// Privileged runs the command in privileged mode.
|
||||
Privileged bool
|
||||
// WorkingDir sets the working directory for the command.
|
||||
WorkingDir string
|
||||
// Env sets environment variables for the command.
|
||||
Env []string
|
||||
|
||||
// Client-side only fields (not serialized, not sent to server)
|
||||
// Stdin is the input stream. Defaults to os.Stdin if nil.
|
||||
Stdin io.Reader `json:"-"`
|
||||
// Stdout is the output stream. Defaults to os.Stdout if nil.
|
||||
Stdout io.Writer `json:"-"`
|
||||
// Stderr is the error stream. Defaults to os.Stderr if nil.
|
||||
Stderr io.Writer `json:"-"`
|
||||
}
|
||||
Reference in New Issue
Block a user