Class: VertxConsul::ConsulClient
- Inherits:
-
Object
- Object
- VertxConsul::ConsulClient
- Defined in:
- /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb
Overview
A Vert.x service used to interact with Consul.
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_session { ... }
Initialize a new session.
-
- (self) create_session_with_options(options = nil) { ... }
Initialize a new session.
-
- (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) 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_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(checkStatus = nil) { ... }
Returns the checks in the specified status.
-
- (self) health_state_with_options(checkStatus = 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) 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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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
368 369 370 371 372 373 374 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 368 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
495 496 497 498 499 500 501 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 495 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
508 509 510 511 512 513 514 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 508 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
378 379 380 381 382 383 384 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 378 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
389 390 391 392 393 394 395 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 389 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
346 347 348 349 350 351 352 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 346 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
358 359 360 361 362 363 364 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 358 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
472 473 474 475 476 477 478 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 472 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
484 485 486 487 488 489 490 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 484 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
218 219 220 221 222 223 224 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 218 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
789 790 791 792 793 794 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 789 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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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-stack/stack-docs/target/rb/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
196 197 198 199 200 201 202 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 196 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_session { ... }
Initialize a new session
677 678 679 680 681 682 683 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 677 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
688 689 690 691 692 693 694 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 688 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_value(key = nil) { ... }
Remove the key/value pair that corresponding to the specified key
115 116 117 118 119 120 121 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 115 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
150 151 152 153 154 155 156 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 150 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.
551 552 553 554 555 556 557 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 551 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.
335 336 337 338 339 340 341 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 335 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
250 251 252 253 254 255 256 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 250 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
780 781 782 783 784 785 786 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 780 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) 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.
608 609 610 611 612 613 614 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 608 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.
620 621 622 623 624 625 626 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 620 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
261 262 263 264 265 266 267 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 261 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
273 274 275 276 277 278 279 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 273 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_value(key = nil) { ... }
Returns key/value pair that corresponding to the specified key
91 92 93 94 95 96 97 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 91 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.
This is blocking query unlike #get_value
104 105 106 107 108 109 110 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 104 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.
126 127 128 129 130 131 132 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 126 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.
This is blocking query unlike #get_values
139 140 141 142 143 144 145 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 139 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
400 401 402 403 404 405 406 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 400 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
412 413 414 415 416 417 418 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 412 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.
448 449 450 451 452 453 454 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 448 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.
462 463 464 465 466 467 468 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 462 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(checkStatus = nil) { ... }
Returns the checks in the specified status
423 424 425 426 427 428 429 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 423 def health_state(checkStatus=nil) if checkStatus.class == Symbol && block_given? @j_del.java_method(:healthState, [Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::CheckStatus.valueOf(checkStatus.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(#{checkStatus})" end |
- (self) health_state_with_options(checkStatus = nil, options = nil) { ... }
Returns the checks in the specified status
435 436 437 438 439 440 441 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 435 def (checkStatus=nil,=nil) if checkStatus.class == Symbol && .class == Hash && block_given? @j_del.java_method(:healthStateWithOptions, [Java::IoVertxExtConsul::CheckStatus.java_class,Java::IoVertxExtConsul::CheckQueryOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtConsul::CheckStatus.valueOf(checkStatus.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(#{checkStatus},#{})" end |
- (self) info_acl_token(id = nil) { ... }
Get info of Acl token
239 240 241 242 243 244 245 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 239 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
699 700 701 702 703 704 705 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 699 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
712 713 714 715 716 717 718 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 712 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
"
656 657 658 659 660 661 662 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 656 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
228 229 230 231 232 233 234 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 228 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
283 284 285 286 287 288 289 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 283 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.
301 302 303 304 305 306 307 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 301 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
756 757 758 759 760 761 762 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 756 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
769 770 771 772 773 774 775 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 769 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
733 734 735 736 737 738 739 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 733 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
745 746 747 748 749 750 751 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 745 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.
528 529 530 531 532 533 534 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 528 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.
518 519 520 521 522 523 524 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 518 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"
323 324 325 326 327 328 329 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 323 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.
562 563 564 565 566 567 568 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 562 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.
574 575 576 577 578 579 580 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 574 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
"
667 668 669 670 671 672 673 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 667 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
162 163 164 165 166 167 168 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 162 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) { ... }
174 175 176 177 178 179 180 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 174 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.
540 541 542 543 544 545 546 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 540 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.
312 313 314 315 316 317 318 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 312 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
723 724 725 726 727 728 729 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 723 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.
185 186 187 188 189 190 191 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 185 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
207 208 209 210 211 212 213 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 207 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.
632 633 634 635 636 637 638 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 632 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.
645 646 647 648 649 650 651 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 645 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) 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.
585 586 587 588 589 590 591 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 585 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.
597 598 599 600 601 602 603 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/consul_client.rb', line 597 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 |