Class: SecureNative::Config::ConfigurationBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/securenative/config/configuration_builder.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, api_url: 'https://api.securenative.com/collector/api/v1', interval: 1000, max_events: 1000, timeout: 1500, auto_send: true, disable: false, log_level: 'FATAL', fail_over_strategy: SecureNative::FailOverStrategy::FAIL_OPEN, proxy_headers: nil) ⇒ ConfigurationBuilder

Returns a new instance of ConfigurationBuilder.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/securenative/config/configuration_builder.rb', line 9

def initialize(api_key: nil, api_url: 'https://api.securenative.com/collector/api/v1', interval: 1000,
               max_events: 1000, timeout: 1500, auto_send: true, disable: false, log_level: 'FATAL',
               fail_over_strategy: SecureNative::FailOverStrategy::FAIL_OPEN, proxy_headers: nil)
  @api_key = api_key
  @api_url = api_url
  @interval = interval
  @max_events = max_events
  @timeout = timeout
  @auto_send = auto_send
  @disable = disable
  @log_level = log_level
  @fail_over_strategy = fail_over_strategy
  @proxy_headers = proxy_headers
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def api_key
  @api_key
end

#api_urlObject

Returns the value of attribute api_url.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def api_url
  @api_url
end

#auto_sendObject

Returns the value of attribute auto_send.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def auto_send
  @auto_send
end

#disableObject

Returns the value of attribute disable.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def disable
  @disable
end

#fail_over_strategyObject

Returns the value of attribute fail_over_strategy.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def fail_over_strategy
  @fail_over_strategy
end

#intervalObject

Returns the value of attribute interval.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def interval
  @interval
end

#log_levelObject

Returns the value of attribute log_level.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def log_level
  @log_level
end

#max_eventsObject

Returns the value of attribute max_events.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def max_events
  @max_events
end

#proxy_headersObject

Returns the value of attribute proxy_headers.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def proxy_headers
  @proxy_headers
end

#timeoutObject

Returns the value of attribute timeout.



6
7
8
# File 'lib/securenative/config/configuration_builder.rb', line 6

def timeout
  @timeout
end

Class Method Details

.default_securenative_optionsObject



24
25
26
# File 'lib/securenative/config/configuration_builder.rb', line 24

def self.default_securenative_options
  Options.new
end