Class: DockerEngineRuby::Resources::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/docker_engine_ruby/resources/exec.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Exec

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Exec.

Parameters:



75
76
77
# File 'lib/docker_engine_ruby/resources/exec.rb', line 75

def initialize(client:)
  @client = client
end

Instance Method Details

#inspect_(id, request_options: {}) ⇒ DockerEngineRuby::Models::ExecInspectResponse

Inspect an exec instance

Parameters:

Returns:

See Also:



16
17
18
19
20
21
22
23
# File 'lib/docker_engine_ruby/resources/exec.rb', line 16

def inspect_(id, params = {})
  @client.request(
    method: :get,
    path: ["exec/%1$s/json", id],
    model: DockerEngineRuby::Models::ExecInspectResponse,
    options: params[:request_options]
  )
end

#resize(id, h:, w:, request_options: {}) ⇒ nil

Resize an exec instance

Parameters:

Returns:

  • (nil)

See Also:



37
38
39
40
41
42
43
44
45
46
# File 'lib/docker_engine_ruby/resources/exec.rb', line 37

def resize(id, params)
  parsed, options = DockerEngineRuby::ExecResizeParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["exec/%1$s/resize", id],
    query: parsed,
    model: NilClass,
    options: options
  )
end

#start(id, console_size: nil, detach: nil, tty: nil, request_options: {}) ⇒ nil

Start an exec instance

Parameters:

Returns:

  • (nil)

See Also:



61
62
63
64
65
66
67
68
69
70
# File 'lib/docker_engine_ruby/resources/exec.rb', line 61

def start(id, params = {})
  parsed, options = DockerEngineRuby::ExecStartParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["exec/%1$s/start", id],
    body: parsed,
    model: NilClass,
    options: options
  )
end