Class: Aws::Waiters::Provider Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-core/waiters/provider.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

NullProvider

Instance Method Summary collapse

Constructor Details

#initialize(definitions) ⇒ Provider

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Provider.



6
7
8
9
10
11
12
13
14
15
# File 'lib/aws-sdk-core/waiters/provider.rb', line 6

def initialize(definitions)
  @waiters = {}
  definitions['waiters'].each do |waiter_name, definition|
    @waiters[Seahorse::Util.underscore(waiter_name).to_sym] = {
      poller: Poller.new(definition),
      max_attempts: definition['maxAttempts'],
      delay: definition['delay'],
    }
  end
end

Instance Method Details

#waiter(waiter_name) ⇒ Waiter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • waiter_name (Symbol)

Returns:

Raises:

  • (ArgumentError)


25
26
27
28
29
30
31
# File 'lib/aws-sdk-core/waiters/provider.rb', line 25

def waiter(waiter_name)
  if @waiters.key?(waiter_name)
    Waiter.new(@waiters[waiter_name])
  else
    raise Errors::NoSuchWaiterError.new(waiter_name, waiter_names)
  end
end

#waiter_namesArray<Symbol>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Array<Symbol>)


18
19
20
# File 'lib/aws-sdk-core/waiters/provider.rb', line 18

def waiter_names
  @waiters.keys
end