Method: Rbeapi::Client.connect

Defined in:
lib/rbeapi/client.rb

.connect(opts = {}) ⇒ Rbeapi::Connection

Builds a connection object to a remote node using the specified options and return an instance of Rbeapi::Connection. All configuration options can be passed via the :opts param or can be overridden using environment variables. Environment variables are specified by prepending EAPI to the option name. For instance to override the host param use EAPI_HOST.

Parameters:

  • :opts (Hash)

    the options to create a message with

Returns:

  • (Rbeapi::Connection)

    Returns an instance of Rbeapi::Connection using the specified configuration options



136
137
138
139
# File 'lib/rbeapi/client.rb', line 136

def connect(opts = {})
  transport = opts.fetch(:transport, DEFAULT_TRANSPORT)
  make_connection(transport, opts)
end