Class: LaunchDarkly::Impl::Migrations::MigrationConfig Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Migrations::MigrationConfig
- Defined in:
- lib/ldclient-rb/impl/migrations/migrator.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A migration config stores references to callable methods which execute customer defined read or write operations on old or new origins of information. For read operations, an optional comparison function also be defined.
Instance Attribute Summary collapse
-
#comparison ⇒ #call?
readonly
private
Optional callable which receives two objects of any kind and returns a boolean representing equality.
-
#new ⇒ #call
readonly
private
Callable which receives a nullable payload parameter and returns an Result.
-
#old ⇒ #call
readonly
private
Callable which receives a nullable payload parameter and returns an Result.
Instance Method Summary collapse
-
#initialize(old, new, comparison) ⇒ MigrationConfig
constructor
private
A new instance of MigrationConfig.
Constructor Details
#initialize(old, new, comparison) ⇒ MigrationConfig
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MigrationConfig.
19 20 21 22 23 |
# File 'lib/ldclient-rb/impl/migrations/migrator.rb', line 19 def initialize(old, new, comparison) @old = old @new = new @comparison = comparison end |
Instance Attribute Details
#comparison ⇒ #call? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Optional callable which receives two objects of any kind and returns a boolean representing equality.
The result of this comparison can be sent upstream to LaunchDarkly to enhance migration observability.
50 51 52 |
# File 'lib/ldclient-rb/impl/migrations/migrator.rb', line 50 def comparison @comparison end |
#new ⇒ #call (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Callable which receives a nullable payload parameter and returns an Result.
This function call should affect the new migration origin when called.
41 42 43 |
# File 'lib/ldclient-rb/impl/migrations/migrator.rb', line 41 def new @new end |
#old ⇒ #call (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Callable which receives a nullable payload parameter and returns an Result.
This function call should affect the old migration origin when called.
32 33 34 |
# File 'lib/ldclient-rb/impl/migrations/migrator.rb', line 32 def old @old end |