Module: LaunchDarkly::Interfaces::Overrides::OverrideSink
- Defined in:
- lib/ldclient-rb/interfaces/overrides.rb
Overview
Receives the contents of the SDK's override store. The SDK implements it and passes it
to an OverrideSource's start method. Override sources call it. They do not implement it.
Flag overrides are currently experimental and subject to change.
Instance Method Summary collapse
-
#set_overrides(flags, segments) ⇒ void
Replaces the entire override store with the given flag and segment definitions.
Instance Method Details
#set_overrides(flags, segments) ⇒ void
This method returns an undefined value.
Replaces the entire override store with the given flag and segment definitions. Each call is a full snapshot. Entries absent from the call are removed. Empty collections clear the store.
Each definition is either a data model object, as produced by
LaunchDarkly::Impl::Model.deserialize, or a hash in the flag or segment data model.
The SDK itself marks the entries as overrides. A snapshot that contains a flag or segment
marked as deleted is rejected with ArgumentError, and the store keeps its contents.
This method is safe to call from any thread. Calls are serialized by the SDK, and the new contents are visible to evaluations when the call returns.
38 39 40 |
# File 'lib/ldclient-rb/interfaces/overrides.rb', line 38 def set_overrides(flags, segments) raise NotImplementedError, "#{self.class} must implement #set_overrides" end |