struct CrystaLXD::Container::Exec
- CrystaLXD::Container::Exec
- Struct
- Value
- Object
Overview
Exec options (https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10containersnameexec).
Included Modules
- JSON::Serializable
Defined in:
client/container.crConstructors
- .new(pull : JSON::PullParser)
- .new(command : Array(String), environment : Hash(String, String) | Nil = nil, record_output : Bool = false, width : Int32 | Nil = nil, height : Int32 | Nil = nil, user : Int32 | Nil = nil, group : Int32 | Nil = nil, cwd : String | Nil = nil)
Instance Method Summary
-
#command : Array(String)
Command and arguments.
-
#command=(command : Array(String))
Command and arguments.
-
#cwd : String | Nil
Current working directory (optional).
-
#cwd=(cwd : String | Nil)
Current working directory (optional).
-
#environment : Hash(String, String) | Nil
Optional extra environment variables to set.
-
#environment=(environment : Hash(String, String) | Nil)
Optional extra environment variables to set.
-
#group : Int32 | Nil
Group to run the command as (optional).
-
#group=(group : Int32 | Nil)
Group to run the command as (optional).
-
#height : Int32 | Nil
Initial height of the terminal (optional).
-
#height=(height : Int32 | Nil)
Initial height of the terminal (optional).
-
#on_stderr(&on_stderr : Bytes -> )
Registers a proc operation to execute on stderr outputs.
-
#on_stdout(&on_stdout : Bytes -> )
Registers a proc operation to execute on stdout outputs.
-
#user : Int32 | Nil
User to run the command as (optional).
-
#user=(user : Int32 | Nil)
User to run the command as (optional).
-
#width : Int32 | Nil
Initial width of the terminal (optional).
-
#width=(width : Int32 | Nil)
Initial width of the terminal (optional).
Constructor Detail
Instance Method Detail
Optional extra environment variables to set.
Registers a proc operation to execute on stderr outputs.
exec = CrystaLXD::Container::Exec.new
exec.on_stderr do |bytes|
STDERR.write bytes
end
Registers a proc operation to execute on stdout outputs.
exec = CrystaLXD::Container::Exec.new
exec.on_stdout do |bytes|
STDOUT.write bytes
end