Class: VertxConsul::ConsulClient
- Inherits:
-
Object
- Object
- VertxConsul::ConsulClient
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb
Overview
A Vert.x service used to interact with Consul.
Direct Known Subclasses
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxConsul::ConsulClient) create(vertx = nil, options = nil)
Create a Consul client.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (self) agent_info { ... }
Returns the configuration and member information of the local agent.
-
- (self) catalog_datacenters { ... }
Return all the datacenters that are known by the Consul server.
-
- (self) catalog_node_services(node = nil) { ... }
Returns the node's registered services.
-
- (self) catalog_node_services_with_options(node = nil, options = nil) { ... }
Returns the node's registered services This is blocking query unlike #catalog_node_services.
-
- (self) catalog_nodes { ... }
Returns the nodes registered in a datacenter.
-
- (self) catalog_nodes_with_options(options = nil) { ... }
Returns the nodes registered in a datacenter.
-
- (self) catalog_service_nodes(service = nil) { ... }
Returns the nodes providing a service.
-
- (self) catalog_service_nodes_with_options(service = nil, options = nil) { ... }
Returns the nodes providing a service.
-
- (self) catalog_services { ... }
Returns the services registered in a datacenter.
-
- (self) catalog_services_with_options(options = nil) { ... }
Returns the services registered in a datacenter This is blocking query unlike #catalog_services.
-
- (self) clone_acl_token(id = nil) { ... }
Clone Acl token.
-
- (void) close
Close the client and release its resources.
-
- (self) coordinate_datacenters { ... }
Returns the WAN network coordinates for all Consul servers, organized by DCs.
-
- (self) coordinate_nodes { ... }
Returns the LAN network coordinates for all nodes in a given DC.
-
- (self) coordinate_nodes_with_options(options = nil) { ... }
Returns the LAN network coordinates for all nodes in a given DC This is blocking query unlike #coordinate_nodes.
-
- (self) create_acl_token(token = nil) { ... }
Create new Acl token.
- - (self) create_prepared_query(definition = nil) { ... }
-
- (self) create_session { ... }
Initialize a new session.
-
- (self) create_session_with_options(options = nil) { ... }
Initialize a new session.
-
- (self) delete_prepared_query(id = nil) { ... }
Deletes an existing prepared query.
-
- (self) delete_value(key = nil) { ... }
Remove the key/value pair that corresponding to the specified key.
-
- (self) delete_values(keyPrefix = nil) { ... }
Removes all the key/value pair that corresponding to the specified key prefix.
-
- (self) deregister_check(checkId = nil) { ... }
Remove a check from the local agent.
-
- (self) deregister_service(id = nil) { ... }
Remove a service from the local agent.
-
- (self) destroy_acl_token(id = nil) { ... }
Destroy Acl token.
-
- (self) destroy_session(id = nil) { ... }
Destroys the given session.
-
- (self) execute_prepared_query(query = nil) { ... }
Executes an existing prepared query.
-
- (self) execute_prepared_query_with_options(query = nil, options = nil) { ... }
Executes an existing prepared query.
-
- (self) fail_check(checkId = nil) { ... }
Set status of the check to "critical".
-
- (self) fail_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "critical".
-
- (self) fire_event(name = nil) { ... }
Fires a new user event.
-
- (self) fire_event_with_options(name = nil, options = nil) { ... }
Fires a new user event.
-
- (self) get_all_prepared_queries { ... }
Returns a list of all prepared queries.
-
- (self) get_keys(keyPrefix = nil) { ... }
Returns the list of keys that corresponding to the specified key prefix.
-
- (self) get_keys_with_options(keyPrefix = nil, options = nil) { ... }
Returns the list of keys that corresponding to the specified key prefix.
-
- (self) get_prepared_query(id = nil) { ... }
Returns an existing prepared query.
-
- (self) get_value(key = nil) { ... }
Returns key/value pair that corresponding to the specified key.
-
- (self) get_value_with_options(key = nil, options = nil) { ... }
Returns key/value pair that corresponding to the specified key.
-
- (self) get_values(keyPrefix = nil) { ... }
Returns the list of key/value pairs that corresponding to the specified key prefix.
-
- (self) get_values_with_options(keyPrefix = nil, options = nil) { ... }
Returns the list of key/value pairs that corresponding to the specified key prefix.
-
- (self) health_checks(service = nil) { ... }
Returns the checks associated with the service.
-
- (self) health_checks_with_options(service = nil, options = nil) { ... }
Returns the checks associated with the service.
-
- (self) health_service_nodes(service = nil, passing = nil) { ... }
Returns the nodes providing the service.
-
- (self) health_service_nodes_with_options(service = nil, passing = nil, options = nil) { ... }
Returns the nodes providing the service.
-
- (self) health_state(healthState = nil) { ... }
Returns the checks in the specified status.
-
- (self) health_state_with_options(healthState = nil, options = nil) { ... }
Returns the checks in the specified status.
-
- (self) info_acl_token(id = nil) { ... }
Get info of Acl token.
-
- (self) info_session(id = nil) { ... }
Returns the requested session information.
-
- (self) info_session_with_options(id = nil, options = nil) { ... }
Returns the requested session information This is blocking query unlike #info_session.
-
- (self) leader_status { ... }
Get the Raft leader for the datacenter in which the agent is running.
-
- (self) list_acl_tokens { ... }
Get list of Acl token.
-
- (self) list_events { ... }
Returns the most recent events known by the agent.
-
- (self) list_events_with_options(options = nil) { ... }
Returns the most recent events known by the agent.
-
- (self) list_node_sessions(nodeId = nil) { ... }
Returns the active sessions for a given node.
-
- (self) list_node_sessions_with_options(nodeId = nil, options = nil) { ... }
Returns the active sessions for a given node This is blocking query unlike #list_node_sessions.
-
- (self) list_sessions { ... }
Returns the active sessions.
-
- (self) list_sessions_with_options(options = nil) { ... }
Returns the active sessions This is blocking query unlike #list_sessions.
-
- (self) local_checks { ... }
Return all the checks that are registered with the local agent.
-
- (self) local_services { ... }
Returns list of services registered with the local agent.
-
- (self) maintenance_service(maintenanceOptions = nil) { ... }
Places a given service into "maintenance mode".
-
- (self) pass_check(checkId = nil) { ... }
Set status of the check to "passing".
-
- (self) pass_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "passing".
-
- (self) peers_status { ... }
Retrieves the Raft peers for the datacenter in which the the agent is running.
-
- (self) put_value(key = nil, value = nil) { ... }
Adds specified key/value pair.
- - (self) put_value_with_options(key = nil, value = nil, options = nil) { ... }
-
- (self) register_check(checkOptions = nil) { ... }
Add a new check to the local agent.
-
- (self) register_service(serviceOptions = nil) { ... }
Adds a new service, with an optional health check, to the local agent.
-
- (self) renew_session(id = nil) { ... }
Renews the given session.
-
- (self) transaction(request = nil) { ... }
Manages multiple operations inside a single, atomic transaction.
-
- (self) update_acl_token(token = nil) { ... }
Update Acl token.
-
- (self) update_check(checkId = nil, status = nil) { ... }
Set status of the check to given status.
-
- (self) update_check_with_note(checkId = nil, status = nil, note = nil) { ... }
Set status of the check to given status.
- - (self) update_prepared_query(definition = nil) { ... }
-
- (self) warn_check(checkId = nil) { ... }
Set status of the check to "warning".
-
- (self) warn_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "warning".
Class Method Details
+ (Boolean) accept?(obj)
18 19 20 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 18 def @@j_api_type.accept?(obj) obj.class == ConsulClient end |
+ (::VertxConsul::ConsulClient) create(vertx = nil, options = nil)
Create a Consul client.
37 38 39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 37 def self.create(vertx=nil,=nil) if vertx.class.method_defined?(:j_del) && !block_given? && == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::ConsulClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxConsul::ConsulClient) elsif vertx.class.method_defined?(:j_del) && .class == Hash && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::ConsulClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object())),::VertxConsul::ConsulClient) end raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{})" end |
+ (Object) j_api_type
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 27 def self.j_api_type @@j_api_type end |
+ (Object) j_class
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 30 def self.j_class Java::IoVertxExtConsul::ConsulClient.java_class end |
+ (Object) unwrap(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 24 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
21 22 23 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 21 def @@j_api_type.wrap(obj) ConsulClient.new(obj) end |
Instance Method Details
- (self) agent_info { ... }
Returns the configuration and member information of the local agent
48 49 50 51 52 53 54 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 48 def agent_info if block_given? @j_del.java_method(:agentInfo, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling agent_info()" end |
- (self) catalog_datacenters { ... }
Return all the datacenters that are known by the Consul server
395 396 397 398 399 400 401 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 395 def catalog_datacenters if block_given? @j_del.java_method(:catalogDatacenters, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_datacenters()" end |
- (self) catalog_node_services(node = nil) { ... }
Returns the node's registered services
522 523 524 525 526 527 528 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 522 def catalog_node_services(node=nil) if node.class == String && block_given? @j_del.java_method(:catalogNodeServices, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(node,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_node_services(#{node})" end |
- (self) catalog_node_services_with_options(node = nil, options = nil) { ... }
Returns the node's registered services
This is blocking query unlike #catalog_node_services
535 536 537 538 539 540 541 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 535 def (node=nil,=nil) if node.class == String && .class == Hash && block_given? @j_del.java_method(:catalogNodeServicesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(node,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_node_services_with_options(#{node},#{})" end |
- (self) catalog_nodes { ... }
Returns the nodes registered in a datacenter
405 406 407 408 409 410 411 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 405 def catalog_nodes if block_given? @j_del.java_method(:catalogNodes, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_nodes()" end |
- (self) catalog_nodes_with_options(options = nil) { ... }
Returns the nodes registered in a datacenter
416 417 418 419 420 421 422 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 416 def (=nil) if .class == Hash && block_given? @j_del.java_method(:catalogNodesWithOptions, [Java::IoVertxExtConsul::NodeQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::NodeQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_nodes_with_options(#{})" end |
- (self) catalog_service_nodes(service = nil) { ... }
Returns the nodes providing a service
373 374 375 376 377 378 379 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 373 def catalog_service_nodes(service=nil) if service.class == String && block_given? @j_del.java_method(:catalogServiceNodes, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(service,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_service_nodes(#{service})" end |
- (self) catalog_service_nodes_with_options(service = nil, options = nil) { ... }
Returns the nodes providing a service
385 386 387 388 389 390 391 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 385 def (service=nil,=nil) if service.class == String && .class == Hash && block_given? @j_del.java_method(:catalogServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(service,Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_service_nodes_with_options(#{service},#{})" end |
- (self) catalog_services { ... }
Returns the services registered in a datacenter
499 500 501 502 503 504 505 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 499 def catalog_services if block_given? @j_del.java_method(:catalogServices, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_services()" end |
- (self) catalog_services_with_options(options = nil) { ... }
Returns the services registered in a datacenter
This is blocking query unlike #catalog_services
511 512 513 514 515 516 517 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 511 def (=nil) if .class == Hash && block_given? @j_del.java_method(:catalogServicesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling catalog_services_with_options(#{})" end |
- (self) clone_acl_token(id = nil) { ... }
Clone Acl token
245 246 247 248 249 250 251 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 245 def clone_acl_token(id=nil) if id.class == String && block_given? @j_del.java_method(:cloneAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling clone_acl_token(#{id})" end |
- (void) close
This method returns an undefined value.
Close the client and release its resources
891 892 893 894 895 896 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 891 def close if !block_given? return @j_del.java_method(:close, []).call() end raise ArgumentError, "Invalid arguments when calling close()" end |
- (self) coordinate_datacenters { ... }
Returns the WAN network coordinates for all Consul servers, organized by DCs
80 81 82 83 84 85 86 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 80 def coordinate_datacenters if block_given? @j_del.java_method(:coordinateDatacenters, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling coordinate_datacenters()" end |
- (self) coordinate_nodes { ... }
Returns the LAN network coordinates for all nodes in a given DC
58 59 60 61 62 63 64 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 58 def coordinate_nodes if block_given? @j_del.java_method(:coordinateNodes, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling coordinate_nodes()" end |
- (self) coordinate_nodes_with_options(options = nil) { ... }
Returns the LAN network coordinates for all nodes in a given DC
This is blocking query unlike #coordinate_nodes
70 71 72 73 74 75 76 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 70 def (=nil) if .class == Hash && block_given? @j_del.java_method(:coordinateNodesWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling coordinate_nodes_with_options(#{})" end |
- (self) create_acl_token(token = nil) { ... }
Create new Acl token
223 224 225 226 227 228 229 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 223 def create_acl_token(token=nil) if token.class == Hash && block_given? @j_del.java_method(:createAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(token)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_acl_token(#{token})" end |
- (self) create_prepared_query(definition = nil) { ... }
817 818 819 820 821 822 823 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 817 def create_prepared_query(definition=nil) if definition.class == Hash && block_given? @j_del.java_method(:createPreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(definition)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_prepared_query(#{definition})" end |
- (self) create_session { ... }
Initialize a new session
704 705 706 707 708 709 710 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 704 def create_session if block_given? @j_del.java_method(:createSession, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_session()" end |
- (self) create_session_with_options(options = nil) { ... }
Initialize a new session
715 716 717 718 719 720 721 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 715 def (=nil) if .class == Hash && block_given? @j_del.java_method(:createSessionWithOptions, [Java::IoVertxExtConsul::SessionOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::SessionOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling create_session_with_options(#{})" end |
- (self) delete_prepared_query(id = nil) { ... }
Deletes an existing prepared query
859 860 861 862 863 864 865 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 859 def delete_prepared_query(id=nil) if id.class == String && block_given? @j_del.java_method(:deletePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling delete_prepared_query(#{id})" end |
- (self) delete_value(key = nil) { ... }
Remove the key/value pair that corresponding to the specified key
140 141 142 143 144 145 146 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 140 def delete_value(key=nil) if key.class == String && block_given? @j_del.java_method(:deleteValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(key,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling delete_value(#{key})" end |
- (self) delete_values(keyPrefix = nil) { ... }
Removes all the key/value pair that corresponding to the specified key prefix
177 178 179 180 181 182 183 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 177 def delete_values(keyPrefix=nil) if keyPrefix.class == String && block_given? @j_del.java_method(:deleteValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling delete_values(#{keyPrefix})" end |
- (self) deregister_check(checkId = nil) { ... }
Remove a check from the local agent. The agent will take care of deregistering the check from the Catalog.
578 579 580 581 582 583 584 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 578 def deregister_check(checkId=nil) if checkId.class == String && block_given? @j_del.java_method(:deregisterCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling deregister_check(#{checkId})" end |
- (self) deregister_service(id = nil) { ... }
Remove a service from the local agent. The agent will take care of deregistering the service with the Catalog.
If there is an associated check, that is also deregistered.
362 363 364 365 366 367 368 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 362 def deregister_service(id=nil) if id.class == String && block_given? @j_del.java_method(:deregisterService, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling deregister_service(#{id})" end |
- (self) destroy_acl_token(id = nil) { ... }
Destroy Acl token
277 278 279 280 281 282 283 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 277 def destroy_acl_token(id=nil) if id.class == String && block_given? @j_del.java_method(:destroyAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling destroy_acl_token(#{id})" end |
- (self) destroy_session(id = nil) { ... }
Destroys the given session
807 808 809 810 811 812 813 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 807 def destroy_session(id=nil) if id.class == String && block_given? @j_del.java_method(:destroySession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling destroy_session(#{id})" end |
- (self) execute_prepared_query(query = nil) { ... }
Executes an existing prepared query.
870 871 872 873 874 875 876 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 870 def execute_prepared_query(query=nil) if query.class == String && block_given? @j_del.java_method(:executePreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(query,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling execute_prepared_query(#{query})" end |
- (self) execute_prepared_query_with_options(query = nil, options = nil) { ... }
Executes an existing prepared query.
882 883 884 885 886 887 888 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 882 def (query=nil,=nil) if query.class == String && .class == Hash && block_given? @j_del.java_method(:executePreparedQueryWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::PreparedQueryExecuteOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(query,Java::IoVertxExtConsul::PreparedQueryExecuteOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling execute_prepared_query_with_options(#{query},#{})" end |
- (self) fail_check(checkId = nil) { ... }
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.
635 636 637 638 639 640 641 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 635 def fail_check(checkId=nil) if checkId.class == String && block_given? @j_del.java_method(:failCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling fail_check(#{checkId})" end |
- (self) fail_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "critical". Used with a check that is of the TTL type. The TTL clock will be reset.
647 648 649 650 651 652 653 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 647 def fail_check_with_note(checkId=nil,note=nil) if checkId.class == String && note.class == String && block_given? @j_del.java_method(:failCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling fail_check_with_note(#{checkId},#{note})" end |
- (self) fire_event(name = nil) { ... }
Fires a new user event
288 289 290 291 292 293 294 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 288 def fire_event(name=nil) if name.class == String && block_given? @j_del.java_method(:fireEvent, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling fire_event(#{name})" end |
- (self) fire_event_with_options(name = nil, options = nil) { ... }
Fires a new user event
300 301 302 303 304 305 306 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 300 def (name=nil,=nil) if name.class == String && .class == Hash && block_given? @j_del.java_method(:fireEventWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::EventOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(name,Java::IoVertxExtConsul::EventOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling fire_event_with_options(#{name},#{})" end |
- (self) get_all_prepared_queries { ... }
Returns a list of all prepared queries.
838 839 840 841 842 843 844 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 838 def get_all_prepared_queries if block_given? @j_del.java_method(:getAllPreparedQueries, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_all_prepared_queries()" end |
- (self) get_keys(keyPrefix = nil) { ... }
Returns the list of keys that corresponding to the specified key prefix.
91 92 93 94 95 96 97 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 91 def get_keys(keyPrefix=nil) if keyPrefix.class == String && block_given? @j_del.java_method(:getKeys, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_keys(#{keyPrefix})" end |
- (self) get_keys_with_options(keyPrefix = nil, options = nil) { ... }
Returns the list of keys that corresponding to the specified key prefix.
103 104 105 106 107 108 109 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 103 def (keyPrefix=nil,=nil) if keyPrefix.class == String && .class == Hash && block_given? @j_del.java_method(:getKeysWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_keys_with_options(#{keyPrefix},#{})" end |
- (self) get_prepared_query(id = nil) { ... }
Returns an existing prepared query
828 829 830 831 832 833 834 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 828 def get_prepared_query(id=nil) if id.class == String && block_given? @j_del.java_method(:getPreparedQuery, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_prepared_query(#{id})" end |
- (self) get_value(key = nil) { ... }
Returns key/value pair that corresponding to the specified key.
An empty Hash object will be returned if no such key is found.
115 116 117 118 119 120 121 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 115 def get_value(key=nil) if key.class == String && block_given? @j_del.java_method(:getValue, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(key,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_value(#{key})" end |
- (self) get_value_with_options(key = nil, options = nil) { ... }
Returns key/value pair that corresponding to the specified key.
An empty Hash object will be returned if no such key is found.
This is blocking query unlike #get_value
129 130 131 132 133 134 135 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 129 def (key=nil,=nil) if key.class == String && .class == Hash && block_given? @j_del.java_method(:getValueWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(key,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_value_with_options(#{key},#{})" end |
- (self) get_values(keyPrefix = nil) { ... }
Returns the list of key/value pairs that corresponding to the specified key prefix.
An empty Hash object will be returned if no such key prefix is found.
152 153 154 155 156 157 158 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 152 def get_values(keyPrefix=nil) if keyPrefix.class == String && block_given? @j_del.java_method(:getValues, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_values(#{keyPrefix})" end |
- (self) get_values_with_options(keyPrefix = nil, options = nil) { ... }
Returns the list of key/value pairs that corresponding to the specified key prefix.
An empty Hash object will be returned if no such key prefix is found.
This is blocking query unlike #get_values
166 167 168 169 170 171 172 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 166 def (keyPrefix=nil,=nil) if keyPrefix.class == String && .class == Hash && block_given? @j_del.java_method(:getValuesWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(keyPrefix,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling get_values_with_options(#{keyPrefix},#{})" end |
- (self) health_checks(service = nil) { ... }
Returns the checks associated with the service
427 428 429 430 431 432 433 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 427 def health_checks(service=nil) if service.class == String && block_given? @j_del.java_method(:healthChecks, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(service,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_checks(#{service})" end |
- (self) health_checks_with_options(service = nil, options = nil) { ... }
Returns the checks associated with the service
439 440 441 442 443 444 445 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 439 def (service=nil,=nil) if service.class == String && .class == Hash && block_given? @j_del.java_method(:healthChecksWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(service,Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_checks_with_options(#{service},#{})" end |
- (self) health_service_nodes(service = nil, passing = nil) { ... }
Returns the nodes providing the service. This endpoint is very similar to the #catalog_service_nodes endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.
475 476 477 478 479 480 481 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 475 def health_service_nodes(service=nil,passing=nil) if service.class == String && (passing.class == TrueClass || passing.class == FalseClass) && block_given? @j_del.java_method(:healthServiceNodes, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(service,passing,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_service_nodes(#{service},#{passing})" end |
- (self) health_service_nodes_with_options(service = nil, passing = nil, options = nil) { ... }
Returns the nodes providing the service. This endpoint is very similar to the #catalog_service_nodes_with_options endpoint;
however, this endpoint automatically returns the status of the associated health check as well as any system level health checks.
489 490 491 492 493 494 495 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 489 def (service=nil,passing=nil,=nil) if service.class == String && (passing.class == TrueClass || passing.class == FalseClass) && .class == Hash && block_given? @j_del.java_method(:healthServiceNodesWithOptions, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxExtConsul::ServiceQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(service,passing,Java::IoVertxExtConsul::ServiceQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_service_nodes_with_options(#{service},#{passing},#{})" end |
- (self) health_state(healthState = nil) { ... }
Returns the checks in the specified status
450 451 452 453 454 455 456 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 450 def health_state(healthState=nil) if healthState.class == Symbol && block_given? @j_del.java_method(:healthState, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(healthState.to_s),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_state(#{healthState})" end |
- (self) health_state_with_options(healthState = nil, options = nil) { ... }
Returns the checks in the specified status
462 463 464 465 466 467 468 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 462 def (healthState=nil,=nil) if healthState.class == Symbol && .class == Hash && block_given? @j_del.java_method(:healthStateWithOptions, [Java::IoVertxExtConsul::HealthState.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::HealthState.valueOf(healthState.to_s),Java::IoVertxExtConsul::CheckQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling health_state_with_options(#{healthState},#{})" end |
- (self) info_acl_token(id = nil) { ... }
Get info of Acl token
266 267 268 269 270 271 272 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 266 def info_acl_token(id=nil) if id.class == String && block_given? @j_del.java_method(:infoAclToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling info_acl_token(#{id})" end |
- (self) info_session(id = nil) { ... }
Returns the requested session information
726 727 728 729 730 731 732 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 726 def info_session(id=nil) if id.class == String && block_given? @j_del.java_method(:infoSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling info_session(#{id})" end |
- (self) info_session_with_options(id = nil, options = nil) { ... }
Returns the requested session information
This is blocking query unlike #info_session
739 740 741 742 743 744 745 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 739 def (id=nil,=nil) if id.class == String && .class == Hash && block_given? @j_del.java_method(:infoSessionWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(id,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling info_session_with_options(#{id},#{})" end |
- (self) leader_status { ... }
Get the Raft leader for the datacenter in which the agent is running.
It returns an address in format "
10.1.10.12:8300
"
683 684 685 686 687 688 689 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 683 def leader_status if block_given? @j_del.java_method(:leaderStatus, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling leader_status()" end |
- (self) list_acl_tokens { ... }
Get list of Acl token
255 256 257 258 259 260 261 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 255 def list_acl_tokens if block_given? @j_del.java_method(:listAclTokens, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_acl_tokens()" end |
- (self) list_events { ... }
Returns the most recent events known by the agent
310 311 312 313 314 315 316 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 310 def list_events if block_given? @j_del.java_method(:listEvents, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_events()" end |
- (self) list_events_with_options(options = nil) { ... }
Returns the most recent events known by the agent.
This is blocking query unlike #list_events. However, the semantics of this endpoint
are slightly different. Most blocking queries provide a monotonic index and block until a newer index is available.
This can be supported as a consequence of the total ordering of the consensus protocol. With gossip,
there is no ordering, and instead
X-Consul-Index
maps to the newest event that matches the query.
In practice, this means the index is only useful when used against a single agent and has no meaning globally. Because Consul defines the index as being opaque, clients should not be expecting a natural ordering either.
328 329 330 331 332 333 334 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 328 def (=nil) if .class == Hash && block_given? @j_del.java_method(:listEventsWithOptions, [Java::IoVertxExtConsul::EventListOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::EventListOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_events_with_options(#{})" end |
- (self) list_node_sessions(nodeId = nil) { ... }
Returns the active sessions for a given node
783 784 785 786 787 788 789 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 783 def list_node_sessions(nodeId=nil) if nodeId.class == String && block_given? @j_del.java_method(:listNodeSessions, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(nodeId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_node_sessions(#{nodeId})" end |
- (self) list_node_sessions_with_options(nodeId = nil, options = nil) { ... }
Returns the active sessions for a given node
This is blocking query unlike #list_node_sessions
796 797 798 799 800 801 802 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 796 def (nodeId=nil,=nil) if nodeId.class == String && .class == Hash && block_given? @j_del.java_method(:listNodeSessionsWithOptions, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(nodeId,Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_node_sessions_with_options(#{nodeId},#{})" end |
- (self) list_sessions { ... }
Returns the active sessions
760 761 762 763 764 765 766 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 760 def list_sessions if block_given? @j_del.java_method(:listSessions, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_sessions()" end |
- (self) list_sessions_with_options(options = nil) { ... }
Returns the active sessions
This is blocking query unlike #list_sessions
772 773 774 775 776 777 778 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 772 def (=nil) if .class == Hash && block_given? @j_del.java_method(:listSessionsWithOptions, [Java::IoVertxExtConsul::BlockingQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::BlockingQueryOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling list_sessions_with_options(#{})" end |
- (self) local_checks { ... }
Return all the checks that are registered with the local agent.
555 556 557 558 559 560 561 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 555 def local_checks if block_given? @j_del.java_method(:localChecks, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling local_checks()" end |
- (self) local_services { ... }
Returns list of services registered with the local agent.
545 546 547 548 549 550 551 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 545 def local_services if block_given? @j_del.java_method(:localServices, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling local_services()" end |
- (self) maintenance_service(maintenanceOptions = nil) { ... }
Places a given service into "maintenance mode"
350 351 352 353 354 355 356 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 350 def maintenance_service(maintenanceOptions=nil) if maintenanceOptions.class == Hash && block_given? @j_del.java_method(:maintenanceService, [Java::IoVertxExtConsul::MaintenanceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::MaintenanceOptions.new(::Vertx::Util::Utils.to_json_object(maintenanceOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling maintenance_service(#{maintenanceOptions})" end |
- (self) pass_check(checkId = nil) { ... }
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.
589 590 591 592 593 594 595 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 589 def pass_check(checkId=nil) if checkId.class == String && block_given? @j_del.java_method(:passCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling pass_check(#{checkId})" end |
- (self) pass_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "passing". Used with a check that is of the TTL type. The TTL clock will be reset.
601 602 603 604 605 606 607 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 601 def pass_check_with_note(checkId=nil,note=nil) if checkId.class == String && note.class == String && block_given? @j_del.java_method(:passCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling pass_check_with_note(#{checkId},#{note})" end |
- (self) peers_status { ... }
Retrieves the Raft peers for the datacenter in which the the agent is running.
It returns a list of addresses "
10.1.10.12:8300
", "10.1.10.13:8300
"
694 695 696 697 698 699 700 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 694 def peers_status if block_given? @j_del.java_method(:peersStatus, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling peers_status()" end |
- (self) put_value(key = nil, value = nil) { ... }
Adds specified key/value pair
189 190 191 192 193 194 195 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 189 def put_value(key=nil,value=nil) if key.class == String && value.class == String && block_given? @j_del.java_method(:putValue, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(key,value,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling put_value(#{key},#{value})" end |
- (self) put_value_with_options(key = nil, value = nil, options = nil) { ... }
201 202 203 204 205 206 207 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 201 def (key=nil,value=nil,=nil) if key.class == String && value.class == String && .class == Hash && block_given? @j_del.java_method(:putValueWithOptions, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxExtConsul::KeyValueOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(key,value,Java::IoVertxExtConsul::KeyValueOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling put_value_with_options(#{key},#{value},#{})" end |
- (self) register_check(checkOptions = nil) { ... }
Add a new check to the local agent. The agent is responsible for managing the status of the check
and keeping the Catalog in sync.
567 568 569 570 571 572 573 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 567 def register_check(checkOptions=nil) if checkOptions.class == Hash && block_given? @j_del.java_method(:registerCheck, [Java::IoVertxExtConsul::CheckOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::CheckOptions.new(::Vertx::Util::Utils.to_json_object(checkOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling register_check(#{checkOptions})" end |
- (self) register_service(serviceOptions = nil) { ... }
Adds a new service, with an optional health check, to the local agent.
339 340 341 342 343 344 345 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 339 def register_service(serviceOptions=nil) if serviceOptions.class == Hash && block_given? @j_del.java_method(:registerService, [Java::IoVertxExtConsul::ServiceOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::ServiceOptions.new(::Vertx::Util::Utils.to_json_object(serviceOptions)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling register_service(#{serviceOptions})" end |
- (self) renew_session(id = nil) { ... }
Renews the given session. This is used with sessions that have a TTL, and it extends the expiration by the TTL
750 751 752 753 754 755 756 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 750 def renew_session(id=nil) if id.class == String && block_given? @j_del.java_method(:renewSession, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling renew_session(#{id})" end |
- (self) transaction(request = nil) { ... }
Manages multiple operations inside a single, atomic transaction.
212 213 214 215 216 217 218 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 212 def transaction(request=nil) if request.class == Hash && block_given? @j_del.java_method(:transaction, [Java::IoVertxExtConsul::TxnRequest.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::TxnRequest.new(::Vertx::Util::Utils.to_json_object(request)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.toJson.encode) : nil : nil) })) return self end raise ArgumentError, "Invalid arguments when calling transaction(#{request})" end |
- (self) update_acl_token(token = nil) { ... }
Update Acl token
234 235 236 237 238 239 240 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 234 def update_acl_token(token=nil) if token.class == Hash && block_given? @j_del.java_method(:updateAclToken, [Java::IoVertxExtConsul::AclToken.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::AclToken.new(::Vertx::Util::Utils.to_json_object(token)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_acl_token(#{token})" end |
- (self) update_check(checkId = nil, status = nil) { ... }
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.
659 660 661 662 663 664 665 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 659 def update_check(checkId=nil,status=nil) if checkId.class == String && status.class == Symbol && block_given? @j_del.java_method(:updateCheck, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,Java::IoVertxExtConsul::CheckStatus.valueOf(status.to_s),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_check(#{checkId},#{status})" end |
- (self) update_check_with_note(checkId = nil, status = nil, note = nil) { ... }
Set status of the check to given status. Used with a check that is of the TTL type. The TTL clock will be reset.
672 673 674 675 676 677 678 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 672 def update_check_with_note(checkId=nil,status=nil,note=nil) if checkId.class == String && status.class == Symbol && note.class == String && block_given? @j_del.java_method(:updateCheckWithNote, [Java::java.lang.String.java_class,Java::IoVertxExtConsul::CheckStatus.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,Java::IoVertxExtConsul::CheckStatus.valueOf(status.to_s),note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_check_with_note(#{checkId},#{status},#{note})" end |
- (self) update_prepared_query(definition = nil) { ... }
848 849 850 851 852 853 854 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 848 def update_prepared_query(definition=nil) if definition.class == Hash && block_given? @j_del.java_method(:updatePreparedQuery, [Java::IoVertxExtConsul::PreparedQueryDefinition.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::PreparedQueryDefinition.new(::Vertx::Util::Utils.to_json_object(definition)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling update_prepared_query(#{definition})" end |
- (self) warn_check(checkId = nil) { ... }
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.
612 613 614 615 616 617 618 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 612 def warn_check(checkId=nil) if checkId.class == String && block_given? @j_del.java_method(:warnCheck, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling warn_check(#{checkId})" end |
- (self) warn_check_with_note(checkId = nil, note = nil) { ... }
Set status of the check to "warning". Used with a check that is of the TTL type. The TTL clock will be reset.
624 625 626 627 628 629 630 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-consul/consul_client.rb', line 624 def warn_check_with_note(checkId=nil,note=nil) if checkId.class == String && note.class == String && block_given? @j_del.java_method(:warnCheckWithNote, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(checkId,note,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) return self end raise ArgumentError, "Invalid arguments when calling warn_check_with_note(#{checkId},#{note})" end |