Class: LaunchDarkly::Migrations::WriteResult

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

Overview

A write result contains the operation results against both the authoritative and non-authoritative origins.

Authoritative writes are always executed first. In the event of a failure, the non-authoritative write will not be executed, resulting in a nil value in the final WriteResult.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authoritative, nonauthoritative = nil) ⇒ WriteResult

Returns a new instance of WriteResult.

Parameters:



77
78
79
80
# File 'lib/ldclient-rb/migrations.rb', line 77

def initialize(authoritative, nonauthoritative = nil)
  @authoritative = authoritative
  @nonauthoritative = nonauthoritative
end

Instance Attribute Details

#authoritativeOperationResult (readonly)

Returns the operation result for the authoritative origin.

Returns:



87
88
89
# File 'lib/ldclient-rb/migrations.rb', line 87

def authoritative
  @authoritative
end

#nonauthoritativeOperationResult? (readonly)

Returns the operation result for the non-authoritative origin.

This result might be nil as the non-authoritative write does not execute in every stage, and will not execute if the authoritative write failed.

Returns:



97
98
99
# File 'lib/ldclient-rb/migrations.rb', line 97

def nonauthoritative
  @nonauthoritative
end