Sha256: f2ed97a0af6d17c4b821d28e70419535383d8b737251b378a7052b946dcf1946

Contents?: true

Size: 1.17 KB

Versions: 55

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

module Seahorse
  module Client
    class AsyncBase < Seahorse::Client::Base

      # default H2 plugins
      @plugins = PluginList.new([
        Plugins::Endpoint,
        Plugins::H2,
        Plugins::ResponseTarget
      ])

      def initialize(plugins, options)
        super
        @connection = H2::Connection.new(options)
        @options = options
      end

      # @return [H2::Connection]
      attr_reader :connection

      # @return [Array<Symbol>] Returns a list of valid async request
      #   operation names.
      def operation_names
        self.class.api.async_operation_names
      end

      # Closes the underlying HTTP2 Connection for the client
      # @return [Symbol] Returns the status of the connection (:closed)
      def close_connection
        @connection.close!
      end

      # Creates a new HTTP2 Connection for the client
      # @return [Seahorse::Client::H2::Connection]
      def new_connection
        if @connection.closed?
          @connection = H2::Connection.new(@options)
        else
          @connection
        end
      end

      def connection_errors
        @connection.errors
      end

    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
aws-sdk-core-3.192.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.192.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.6 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.5 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.4 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.3 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.2 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.191.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.190.3 lib/seahorse/client/async_base.rb
aws-sdk-core-3.190.2 lib/seahorse/client/async_base.rb
aws-sdk-core-3.190.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.190.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.189.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.188.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.187.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.187.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.186.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.185.2 lib/seahorse/client/async_base.rb
aws-sdk-core-3.185.1 lib/seahorse/client/async_base.rb