Class: Rubineti::Client
- Inherits:
-
Object
- Object
- Rubineti::Client
- Defined in:
- lib/rubineti/client.rb
Instance Method Summary collapse
- #cluster ⇒ Object
-
#initialize(options) ⇒ Client
constructor
Required:
user
: A String containing the username for use in HTTP Basic auth. - #instance ⇒ Object
- #job ⇒ Object
- #node ⇒ Object
Constructor Details
#initialize(options) ⇒ Client
Required: user
: A String containing the username for use in HTTP Basic auth. password
: A String containing the password for use in HTTP Basic auth. host
: A String with the host to connect.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rubineti/client.rb', line 16 def initialize @connection = Hugs::Client.new( :user => [:user], :password => [:password], :host => [:host], :port => [:port] || 5080, :scheme => "https" ) @connection.raise_4xx = true @connection.raise_5xx = true end |
Instance Method Details
#cluster ⇒ Object
28 29 30 |
# File 'lib/rubineti/client.rb', line 28 def cluster @cluster ||= Rubineti::Cluster.new @connection end |
#instance ⇒ Object
32 33 34 |
# File 'lib/rubineti/client.rb', line 32 def instance @instance ||= Rubineti::Instance.new @connection end |