Class: Couchbase::Options::WaitUntilReady

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/options.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/lib/couchbase/options.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(desired_state: :online, service_types: nil) {|self| ... } ⇒ WaitUntilReady

Creates an instance of options for Cluster#wait_until_ready and Bucket#wait_until_ready

Parameters:

  • desired_state (Symbol) (defaults to: :online) —

    the state to wait for :online:: every endpoint the ping reports for each requested service responds :degraded:: at least one endpoint the ping reports for each requested service responds

  • service_types (Array<Symbol>, nil) (defaults to: nil) —

    the service types to wait for (same names as Ping#service_types). When nil or empty, every service in the ping report is considered. A requested service that no node runs is never ready, so the wait times out.

Yield Parameters:



2032
2033
2034
2035
2036
2037
2038
# File 'lib/couchbase/options.rb', line 2032

def initialize(desired_state: :online,
               service_types: nil)
  @desired_state = desired_state
  @service_types = service_types

  yield self if block_given?
end

Instance Attribute Details

#desired_state ⇒ Symbol

Returns:

  • (Symbol)


2019
2020
2021
# File 'lib/couchbase/options.rb', line 2019

def desired_state
  @desired_state
end

#service_types ⇒ Array<Symbol>?

Returns:

  • (Array<Symbol>, nil)


2020
2021
2022
# File 'lib/couchbase/options.rb', line 2020

def service_types
  @service_types
end