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, record_output : Bool = false, width : Int32? = nil, height : Int32? = nil, user : Int32? = nil, group : Int32? = nil, cwd : String? = nil)
Instance Method Summary
-
#command : Array(String)
Command and arguments.
-
#command=(command : Array(String))
Command and arguments.
-
#cwd : String?
Current working directory (optional).
-
#cwd=(cwd : String?)
Current working directory (optional).
-
#environment : Hash(String, String)?
Optional extra environment variables to set.
-
#environment=(environment : Hash(String, String)?)
Optional extra environment variables to set.
-
#group : Int32?
Group to run the command as (optional).
-
#group=(group : Int32?)
Group to run the command as (optional).
-
#height : Int32?
Initial height of the terminal (optional).
-
#height=(height : Int32?)
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?
User to run the command as (optional).
-
#user=(user : Int32?)
User to run the command as (optional).
-
#width : Int32?
Initial width of the terminal (optional).
-
#width=(width : Int32?)
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