Sha256: 8286ce93e561dbce5e2c49370c761926c3cc7146a590e269db3e631a8eb8ea6d

Contents?: true

Size: 1.19 KB

Versions: 31

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

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

      # default H2 plugins
      # @api private
      @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

31 entries across 31 versions & 1 rubygems

Version Path
aws-sdk-core-3.214.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.213.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.212.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.211.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.210.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.209.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.209.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.208.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.207.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.206.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.205.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.204.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.203.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.202.2 lib/seahorse/client/async_base.rb
aws-sdk-core-3.202.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.202.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.201.5 lib/seahorse/client/async_base.rb
aws-sdk-core-3.201.4 lib/seahorse/client/async_base.rb
aws-sdk-core-3.201.3 lib/seahorse/client/async_base.rb
aws-sdk-core-3.201.2 lib/seahorse/client/async_base.rb