| Class | MCollective::Client |
| In: |
lib/mcollective/client.rb
|
| Parent: | Object |
Helpers for writing clients that can talk to agents, do discovery and so forth
| connection_timeout | [RW] | |
| discoverer | [RW] | |
| options | [RW] | |
| stats | [RW] |
Returns the configured main collective if no specific collective is specified as options
Performs a discovery of nodes matching the filter passed returns an array of nodes
An integer limit can be supplied this will have the effect of the discovery being cancelled soon as it reached the requested limit of hosts
Prints out the stats returns from req and discovered_req in a nice way
Blocking call that waits for ever for a message to arrive.
If you give it a requestid this means you‘ve previously send a request with that ID and now you just want replies that matches that id, in that case the current connection will just ignore all messages not directed at it and keep waiting for more till it finds a matching message.
Send a request, performs the passed block for each response
times = req("status", "mcollectived", options, client) {|resp|
pp resp
}
It returns a hash of times and timeouts for discovery and total run is taken from the options hash which in turn is generally built using MCollective::Optionparser
Sends a request and returns the generated request id, doesn‘t wait for responses and doesn‘t execute any passed in code blocks for responses
Starts the client receiver and publisher in threads. This is activated when the ‘threader_client’ configuration option is set.