Class: SharedBroker::KeyProvider::Static
- Inherits:
-
Object
- Object
- SharedBroker::KeyProvider::Static
- Defined in:
- lib/shared_broker/key_provider.rb
Overview
Static key provider for backward compatibility
Instance Method Summary collapse
- #active_key_id_for(_topic) ⇒ Object
-
#initialize(key) ⇒ Static
constructor
A new instance of Static.
- #key_for(_topic) ⇒ Object
- #key_for_id(_key_id) ⇒ Object
Constructor Details
#initialize(key) ⇒ Static
Returns a new instance of Static.
9 10 11 12 |
# File 'lib/shared_broker/key_provider.rb', line 9 def initialize(key) raise ArgumentError, "Expected key to be a 32-byte String, got #{key.inspect}" unless key.is_a?(String) @key = key end |
Instance Method Details
#active_key_id_for(_topic) ⇒ Object
22 23 24 |
# File 'lib/shared_broker/key_provider.rb', line 22 def active_key_id_for(_topic) nil end |
#key_for(_topic) ⇒ Object
14 15 16 |
# File 'lib/shared_broker/key_provider.rb', line 14 def key_for(_topic) @key end |
#key_for_id(_key_id) ⇒ Object
18 19 20 |
# File 'lib/shared_broker/key_provider.rb', line 18 def key_for_id(_key_id) @key end |