You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/sections/01-flag-evaluation.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ See [event handlers and initialization](./05-events.md#event-handlers-and-initia
48
48
49
49
#### Requirement 1.1.2.3
50
50
51
-
> The `provider mutator` function **MUST** invoke the `shutdown` function on the previously registered provider once it's no longer being used to resolve flag values.
51
+
> The `provider mutator` function **MUST** invoke the `shutdown` function on the previously registered provider once it's no longer being used to resolve flag values.
52
52
53
53
When a provider is no longer in use, it should be disposed of using its `shutdown` mechanism.
54
54
Provider instances which are bound to multiple `domains` won't be shut down until the last binding is removed.
@@ -227,7 +227,6 @@ number myNumber = client.getNumberValue('number-flag', 75);
> The implementation language differentiates between floating-point numbers and integers.
@@ -409,7 +408,7 @@ It's recommended that application-authors call this function on application shut
409
408
410
409
The global API object defines a `shutdown` function, which will call the respective `shutdown` function on all providers.
411
410
Alternatively, implementations might leverage language idioms such as auto-disposable interfaces or some means of cancellation signal propagation to allow for graceful shutdown.
412
-
This shutdown function unconditionally calls the shutdown function on all registered providers, regardless of their state.
411
+
This shutdown function unconditionally calls the shutdown function on all registered providers, regardless of their state.
> `Hook data`**MUST** must be created before the first `stage` invoked in a hook for a specific evaluation and propagated between each `stage` of the hook. The hook data is not shared between different hooks.
117
119
118
120
Example showing data between `before` and `after` stage for two different hooks.
121
+
119
122
```mermaid
120
123
sequenceDiagram
121
124
actor Application
@@ -248,21 +251,70 @@ client.getValue('my-flag', 'defaultValue', new Hook3());
248
251
249
252
> Hooks **MUST** be executed "stack-wise"with respect to flag resolution, prioritizing increasing specificity (API, Client, Invocation, Provider) first, and the order in which they were added second.
250
253
251
-
Before flag resolution (the `before` stage), hooks run in the order `API`->`Client`->`Invocation`->`Provider`, and within those, in the order in which they were added.
254
+
Before flag resolution (the `before` stage), hooks run in the order `API`->`Client`->`Invocation`->`Provider`, and within those, in the order in which they were added.
252
255
After flag evaluation (the `after`, `error`, or `finally` stages), hooks run in the order `Provider`->`Invocation`->`Client`->`API`, and within those, in reverse of the order in which they were added.
253
256
This achieves intuitive "stack-like" or "LIFO" behavior for side effects and transformations.
254
257
255
-
```
256
258
Given hooks A-H, each implementing the both the `before` and `after` stages, added at the following levels and order:
@@ -349,6 +401,7 @@ but different hooks have different hook data instances.
349
401
Access to hook data is restricted to only a single hook instance, and it has no serialization requirements, and as a result does not require any value type restrictions.
> The `provider`**MAY** define a mechanism for signaling the occurrence of one of a set of events, including `PROVIDER_READY`, `PROVIDER_ERROR`, `PROVIDER_CONFIGURATION_CHANGED` and `PROVIDER_STALE`, with a `provider event details` payload.
34
+
> The `provider`**MAY** define a mechanism for signaling the occurrence of one of a set of events, including `PROVIDER_READY`, `PROVIDER_ERROR`, `PROVIDER_CONFIGURATION_CHANGED` and `PROVIDER_STALE`, with a `provider event details` payload.
35
35
36
36
Providers cannot emit `PROVIDER_CONTEXT_CHANGED` or `PROVIDER_RECONCILING` events.
37
37
These are emitted only by the SDK during context reconciliation.
> When a `provider` signals the occurrence of a particular `event`, event handlers on clients which are not associated with that provider **MUST NOT** run.
60
60
61
61
Client event handlers respect the dynamic binding of clients to providers via `domains`.
62
-
Client event handlers do not run when a lifecycle function terminates on an unassociated provider, or an unassociated provider emits an event.
62
+
Client event handlers do not run when a lifecycle function terminates on an unassociated provider, or an unassociated provider emits an event.
63
63
64
64
see [setting a provider](./01-flag-evaluation.md#setting-a-provider), [domain](../glossary.md#domain) for details.
65
65
@@ -152,7 +152,7 @@ See [provider initialization](./02-providers.md#24-initialization) and [setting
152
152
153
153
> If the provider's `initialize` function terminates abnormally, `PROVIDER_ERROR` handlers **MUST** run.
154
154
155
-
A failed initialization could represent an unrecoverable error, such as bad credentials or a missing file.
155
+
A failed initialization could represent an unrecoverable error, such as bad credentials or a missing file.
156
156
If a failed initialization could also represent a transient error.
157
157
A provider which maintains a persistent connection to a remote `flag management system` may attempt to reconnect, and emit `PROVIDER_READY` after a failed initialization.
Copy file name to clipboardExpand all lines: specification/sections/06-tracking.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,4 +104,4 @@ See [provider tracking support](./02-providers.md#27-tracking-support).
104
104
105
105
The `tracking event details` supports the addition of arbitrary fields, including nested objects, similar to the `evaluation context` and object-typed flag values.
106
106
107
-
See [structure](../types.md#structure), [evaluation context](.//03-evaluation-context.md).
107
+
See [structure](../types.md#structure), [evaluation context](.//03-evaluation-context.md).
0 commit comments