Class: DockerEngineRuby::Resources::Exec
- Inherits:
-
Object
- Object
- DockerEngineRuby::Resources::Exec
- Defined in:
- lib/docker_engine_ruby/resources/exec.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Exec
constructor
private
A new instance of Exec.
-
#inspect_(id, request_options: {}) ⇒ DockerEngineRuby::Models::ExecInspectResponse
Inspect an exec instance.
-
#resize(id, h:, w:, request_options: {}) ⇒ nil
Resize an exec instance.
-
#start(id, console_size: nil, detach: nil, tty: nil, request_options: {}) ⇒ nil
Start an exec instance.
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.
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
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
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, = DockerEngineRuby::ExecResizeParams.dump_request(params) @client.request( method: :post, path: ["exec/%1$s/resize", id], query: parsed, model: NilClass, options: ) end |
#start(id, console_size: nil, detach: nil, tty: nil, request_options: {}) ⇒ nil
Start an exec instance
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, = DockerEngineRuby::ExecStartParams.dump_request(params) @client.request( method: :post, path: ["exec/%1$s/start", id], body: parsed, model: NilClass, options: ) end |