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

Inherits:
Object
  • Object
show all
Includes:
Domain::_RecoveryLockToken
Defined in:
lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb,
sig/_private/stoplight/infrastructure/redis/data_store/recovery_lock_token.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(light_name:) ⇒ RecoveryLockToken

Returns a new instance of RecoveryLockToken.

Parameters:

  • light_name (String)
  • light_name: (String)


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_nameString (readonly)

Returns the value of attribute light_name.

Returns:

  • (String)


10
11
12
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 10

def light_name
  @light_name
end

#tokenString (readonly)

Returns the value of attribute token.

Returns:

  • (String)


11
12
13
# File 'lib/stoplight/infrastructure/redis/data_store/recovery_lock_token.rb', line 11

def token
  @token
end

Instance Method Details

#lock_keyString

Returns:

  • (String)


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

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