Class: RailsWebhookOutbox::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_webhook_outbox/configuration.rb

Constant Summary collapse

SIGNING_ALGORITHMS =
%i[sha256 sha384 sha512].freeze
RETRY_BACKOFF_STRATEGIES =
%i[exponential linear].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rails_webhook_outbox/configuration.rb', line 10

def initialize
  @events = []
  @signing_algorithm = :sha256
  @signing_header = "X-Webhook-Signature"
  @max_retries = 8
  @retry_backoff = :exponential
  @request_timeout = 5
  @delivery_job_queue = :webhooks
  @max_payload_size = 65_536
  @test_mode = false
end

Instance Attribute Details

#delivery_job_queueObject

Returns the value of attribute delivery_job_queue.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def delivery_job_queue
  @delivery_job_queue
end

#eventsObject

Returns the value of attribute events.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def events
  @events
end

#max_payload_sizeObject

Returns the value of attribute max_payload_size.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def max_payload_size
  @max_payload_size
end

#max_retriesObject

Returns the value of attribute max_retries.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def max_retries
  @max_retries
end

#request_timeoutObject

Returns the value of attribute request_timeout.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def request_timeout
  @request_timeout
end

#retry_backoffObject

Returns the value of attribute retry_backoff.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def retry_backoff
  @retry_backoff
end

#signing_algorithmObject

Returns the value of attribute signing_algorithm.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def signing_algorithm
  @signing_algorithm
end

#signing_headerObject

Returns the value of attribute signing_header.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def signing_header
  @signing_header
end

#test_modeObject

Returns the value of attribute test_mode.



6
7
8
# File 'lib/rails_webhook_outbox/configuration.rb', line 6

def test_mode
  @test_mode
end