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, #initialize, method_missing, respond_to?, respond_to_missing?, #use_named_parameter

Constructor Details

This class inherits a constructor from Diplomat::RestClient

Instance Method Details

#getOpenStruct

Get all members

Returns:

  • (OpenStruct)

    all data associated with the service



8
9
10
11
# File 'lib/diplomat/members.rb', line 8

def get
  ret = @conn.get '/v1/agent/members'
  JSON.parse(ret.body)
end