Sha256: 8cabb68376ee53560516e551d9d1b19ae8a8420852570e35a229bc0007ef78ba

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/components/base'

module Contrast
  module Components
    module Polling
      # A wrapper build around the agent.polling config
      class Interface
        include Contrast::Components::ComponentBase

        # @return [Integer, nil]
        attr_reader :server_settings_ms
        # @return [String]
        attr_reader :canon_name
        # @return [Array]
        attr_reader :config_values
        # @return [Integer, nil]
        attr_reader :batch_reporting_interval_ms

        CANON_NAME = 'agent.polling'
        CONFIG_VALUES = %w[server_settings_ms batch_reporting_interval_ms].cs__freeze

        def initialize hsh = {}
          @config_values = CONFIG_VALUES
          @canon_name = CANON_NAME
          return unless hsh

          @server_settings_ms = hsh[:server_settings_ms]
          @batch_reporting_interval_ms = hsh[:batch_reporting_interval_ms]
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
contrast-agent-6.9.0 lib/contrast/components/polling.rb