Class: Stoplight::Infrastructure::Redis::DataStore::RecoveryLockToken

Inherits:
Object
  • Object
show all
Defined in:
lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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

#tokenObject (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_keyObject



19
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 19

def lock_key = key(:locks, :recovery, light_name)