Class: Docker::Swarm::Connection
- Inherits:
-
Connection
- Object
- Connection
- Docker::Swarm::Connection
- Defined in:
- lib/docker/swarm/connection.rb
Overview
This class represents a Connection to a Docker server. The Connection is immutable in that once the url and options is set they cannot be changed.
Instance Method Summary collapse
-
#initialize(url, opts = {}) ⇒ Connection
constructor
A new instance of Connection.
-
#request(*args, &block) ⇒ Object
Send a request to the server with the ‘.
Constructor Details
#initialize(url, opts = {}) ⇒ Connection
Returns a new instance of Connection.
5 6 7 |
# File 'lib/docker/swarm/connection.rb', line 5 def initialize(url, opts = {}) super(url, opts) end |
Instance Method Details
#request(*args, &block) ⇒ Object
Send a request to the server with the ‘
11 12 13 14 15 16 17 18 19 |
# File 'lib/docker/swarm/connection.rb', line 11 def request(*args, &block) request = compile_request_params(*args, &block) log_request(request) if (args.last[:full_response] == true) resource.request(request) else resource.request(request).body end end |