struct CrystaLXD::Container::Exec

Overview

Exec options (https://github.com/lxc/lxd/blob/master/doc/rest-api.md#10containersnameexec).

Included Modules

Defined in:

client/container.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]

Instance Method Detail

def command : Array(String) #

Command and arguments.


[View source]
def command=(command : Array(String)) #

Command and arguments.


[View source]
def cwd : String | Nil #

Current working directory (optional).


[View source]
def cwd=(cwd : String | Nil) #

Current working directory (optional).


[View source]
def environment : Hash(String, String) | Nil #

Optional extra environment variables to set.


[View source]
def environment=(environment : Hash(String, String) | Nil) #

Optional extra environment variables to set.


[View source]
def group : Int32 | Nil #

Group to run the command as (optional).


[View source]
def group=(group : Int32 | Nil) #

Group to run the command as (optional).


[View source]
def height : Int32 | Nil #

Initial height of the terminal (optional).


[View source]
def height=(height : Int32 | Nil) #

Initial height of the terminal (optional).


[View source]
def on_stderr(&on_stderr : Bytes -> ) #

Registers a proc operation to execute on stderr outputs.

exec = CrystaLXD::Container::Exec.new
exec.on_stderr do |bytes|
  STDERR.write bytes
end

[View source]
def on_stdout(&on_stdout : Bytes -> ) #

Registers a proc operation to execute on stdout outputs.

exec = CrystaLXD::Container::Exec.new
exec.on_stdout do |bytes|
  STDOUT.write bytes
end

[View source]
def user : Int32 | Nil #

User to run the command as (optional).


[View source]
def user=(user : Int32 | Nil) #

User to run the command as (optional).


[View source]
def width : Int32 | Nil #

Initial width of the terminal (optional).


[View source]
def width=(width : Int32 | Nil) #

Initial width of the terminal (optional).


[View source]