Class: Stoplight::Infrastructure::Redis::DataStore::RecoveryLockToken
- Inherits:
-
Object
- Object
- Stoplight::Infrastructure::Redis::DataStore::RecoveryLockToken
- Defined in:
- lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb
Instance Attribute Summary collapse
-
#light_name ⇒ Object
readonly
Returns the value of attribute light_name.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(light_name:) ⇒ RecoveryLockToken
constructor
A new instance of RecoveryLockToken.
- #lock_key ⇒ Object
Constructor Details
#initialize(light_name:) ⇒ RecoveryLockToken
14 15 16 17 |
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 14 def initialize(light_name:) @light_name = light_name @token = SecureRandom.uuid end |
Instance Attribute Details
#light_name ⇒ Object (readonly)
Returns the value of attribute light_name.
10 11 12 |
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 10 def light_name @light_name end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
11 12 13 |
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 11 def token @token end |
Instance Method Details
#lock_key ⇒ Object
19 |
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 19 def lock_key = key(:locks, :recovery, light_name) |