Sha256: 632c9531a0c9fcbc1c2d61584134b3d64a099cfa371dda50f1bf033a3bf47af3

Contents?: true

Size: 1.14 KB

Versions: 79

Compression:

Stored size: 1.14 KB

Contents

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

79 entries across 79 versions & 1 rubygems

Version Path
aws-sdk-core-3.100.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.99.2 lib/seahorse/client/async_base.rb
aws-sdk-core-3.99.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.99.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.98.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.97.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.97.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.96.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.96.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.95.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.94.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.94.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.93.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.92.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.91.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.91.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.90.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.90.0 lib/seahorse/client/async_base.rb
aws-sdk-core-3.89.1 lib/seahorse/client/async_base.rb
aws-sdk-core-3.89.0 lib/seahorse/client/async_base.rb