Class: Diplomat::Members

Inherits:
RestClient show all
Defined in:
lib/diplomat/members.rb

Overview

Methods for interacting with the Consul members API endpoint

Instance Method Summary collapse

Methods inherited from RestClient

access_method?, #concat_url, #configuration, #initialize, method_missing, respond_to?, respond_to_missing?, #use_named_parameter

Constructor Details

This class inherits a constructor from Diplomat::RestClient

Instance Method Details

#get(options = {}) ⇒ OpenStruct

Get all members

Parameters:

  • options (Hash) (defaults to: {})

    options parameter hash

Returns:

  • (OpenStruct)

    all data associated with the service



11
12
13
14
# File 'lib/diplomat/members.rb', line 11

def get(options = {})
  ret = send_get_request(@conn, ['/v1/agent/members'], options)
  JSON.parse(ret.body)
end