Class: LaunchDarkly::Impl::DataSystem::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/impl/data_system.rb

Overview

Update represents the results of a synchronizer’s ongoing sync method.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state:, change_set: nil, error: nil, revert_to_fdv1: false, environment_id: nil) ⇒ Update

Returns a new instance of Update.

Parameters:

  • state (Symbol)

    The state of the data source

  • change_set (ChangeSet, nil) (defaults to: nil)

    The change set if available

  • error (LaunchDarkly::Interfaces::DataSource::ErrorInfo, nil) (defaults to: nil)

    Error information if applicable

  • revert_to_fdv1 (Boolean) (defaults to: false)

    Whether to revert to FDv1

  • environment_id (String, nil) (defaults to: nil)

    The environment ID if available

Since:

  • 5.5.0



263
264
265
266
267
268
269
# File 'lib/ldclient-rb/impl/data_system.rb', line 263

def initialize(state:, change_set: nil, error: nil, revert_to_fdv1: false, environment_id: nil)
  @state = state
  @change_set = change_set
  @error = error
  @revert_to_fdv1 = revert_to_fdv1
  @environment_id = environment_id
end

Instance Attribute Details

#change_setChangeSet? (readonly)

Returns The change set if available.

Returns:

  • (ChangeSet, nil)

    The change set if available

Since:

  • 5.5.0



245
246
247
# File 'lib/ldclient-rb/impl/data_system.rb', line 245

def change_set
  @change_set
end

#environment_idString? (readonly)

Returns The environment ID if available.

Returns:

  • (String, nil)

    The environment ID if available

Since:

  • 5.5.0



254
255
256
# File 'lib/ldclient-rb/impl/data_system.rb', line 254

def environment_id
  @environment_id
end

#errorLaunchDarkly::Interfaces::DataSource::ErrorInfo? (readonly)

Returns Error information if applicable.

Returns:

Since:

  • 5.5.0



248
249
250
# File 'lib/ldclient-rb/impl/data_system.rb', line 248

def error
  @error
end

#revert_to_fdv1Boolean (readonly)

Returns Whether to revert to FDv1.

Returns:

  • (Boolean)

    Whether to revert to FDv1

Since:

  • 5.5.0



251
252
253
# File 'lib/ldclient-rb/impl/data_system.rb', line 251

def revert_to_fdv1
  @revert_to_fdv1
end

#stateSymbol (readonly)

Returns The state of the data source.

Returns:

  • (Symbol)

    The state of the data source

Since:

  • 5.5.0



242
243
244
# File 'lib/ldclient-rb/impl/data_system.rb', line 242

def state
  @state
end