Class: LaunchDarkly::Interfaces::DataSource::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/interfaces/data_source.rb

Overview

Information about the data source’s status and about the last status change.

Constant Summary collapse

INITIALIZING =

The initial state of the data source when the SDK is being initialized.

If it encounters an error that requires it to retry initialization, the state will remain at INITIALIZING until it either succeeds and becomes VALID, or permanently fails and becomes OFF.

:initializing
VALID =

Indicates that the data source is currently operational and has not had any problems since the last time it received data.

In streaming mode, this means that there is currently an open stream connection and that at least one initial message has been received on the stream. In polling mode, it means that the last poll request succeeded.

:valid
INTERRUPTED =

Indicates that the data source encountered an error that it will attempt to recover from.

In streaming mode, this means that the stream connection failed, or had to be dropped due to some other error, and will be retried after a backoff delay. In polling mode, it means that the last poll request failed, and a new poll request will be made after the configured polling interval.

:interrupted
OFF =

Indicates that the data source has been permanently shut down.

This could be because it encountered an unrecoverable error (for instance, the LaunchDarkly service rejected the SDK key; an invalid SDK key will never become valid), or because the SDK client was explicitly shut down.

:off

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state, state_since, last_error) ⇒ Status



206
207
208
209
210
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 206

def initialize(state, state_since, last_error)
  @state = state
  @state_since = state_since
  @last_error = last_error
end

Instance Attribute Details

#last_errorErrorInfo? (readonly)



204
205
206
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 204

def last_error
  @last_error
end

#stateSymbol (readonly)



200
201
202
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 200

def state
  @state
end

#state_sinceTime (readonly)



202
203
204
# File 'lib/ldclient-rb/interfaces/data_source.rb', line 202

def state_since
  @state_since
end