Sha256: edc6bdae6aa9f0a888591431b3d7bc3f8bf3202b23531640e94746a5f6a3e224

Contents?: true

Size: 588 Bytes

Versions: 1

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true

# https://upstash.com/docs/qstash/api/signingKeys/rotate
module Qstash
  module SigningKeys
    class Rotate
      include Qstash::Callable
      attr_reader :headers

      def initialize(headers: {})
        @headers = headers
      end

      def call
        uri = URI(endpoint)
        client = Qstash::HttpClient.new(uri)
        client.post({}, headers)
      end

      private

      def endpoint
        [
          Qstash.config.url.sub(/\/$/, ""),
          Endpoints::ROTATE_SIGNING_KEY_ENDPOINT
        ].join("/")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qstash-rb-0.1.3 lib/qstash/signing_keys/rotate.rb