Class: LaunchDarkly::Impl::Migrations::MigrationConfig Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • old (#call)

    Refer to #old

  • new (#call)

    Refer to #new

  • comparison (#call, nil)

    Refer to #comparison

Since:

  • 5.5.0



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.

Returns:

  • (#call, nil)

Since:

  • 5.5.0



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.

Returns:

  • (#call)

Since:

  • 5.5.0



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.

Returns:

  • (#call)

Since:

  • 5.5.0



32
33
34
# File 'lib/ldclient-rb/impl/migrations/migrator.rb', line 32

def old
  @old
end