Sha256: e11a9f78bb1f94916c9afef4acdc52f3c978b9e05cc93d134a698f07e8fc446f

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

module OpenStax::Aws
  class MskCluster

    attr_reader :client, :cluster_arn

    delegate_missing_to :@client

    def initialize(cluster_arn:, region:)
      @cluster_arn = cluster_arn
      @client = ::Aws::Kafka::Client.new(region: region)
    end

    def bootstrap_broker_string
      client.get_bootstrap_brokers(cluster_arn: cluster_arn).bootstrap_broker_string
    end

    def sorted_bootstrap_broker_string
      bootstrap_broker_string.split(',').sort.join(',')
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openstax_aws-1.4.0 lib/openstax/aws/msk_cluster.rb
openstax_aws-1.3.0 lib/openstax/aws/msk_cluster.rb
openstax_aws-1.2.0 lib/openstax/aws/msk_cluster.rb