Skip to content

Commit

Permalink
Merge branch 'main' into status-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbaert authored Feb 9, 2024
2 parents a048511 + 2c36abd commit b81fb15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
{
"id": "Requirement 2.4.1",
"machine_id": "requirement_2_4_1",
"content": "The `provider` MAY define an `initialize` function which accepts the global `evaluation context` as an argument and performs initialization logic relevant to the provider.",
"content": "The `provider` MAY define an initialization function which accepts the global `evaluation context` as an argument and performs initialization logic relevant to the provider.",
"RFC 2119 keyword": "MAY",
"children": []
},
Expand Down
10 changes: 5 additions & 5 deletions specification/sections/02-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ ResolutionDetails<MyStruct> resolveStructureValue(string flagKey, MyStruct defau
```
##### Requirement 2.2.9

> The `provider` **SHOULD** populate the `resolution details` structure's `flag metadata` field.
> The `provider` **SHOULD** populate the `resolution details` structure's `flag metadata` field.
##### Requirement 2.2.10

Expand Down Expand Up @@ -164,11 +164,11 @@ class MyProvider implements Provider {

#### Requirement 2.4.1

> The `provider` **MAY** define an `initialize` function which accepts the global `evaluation context` as an argument and performs initialization logic relevant to the provider.
> The `provider` **MAY** define an initialization function which accepts the global `evaluation context` as an argument and performs initialization logic relevant to the provider.
Many feature flag frameworks or SDKs require some initialization before they can be used.
They might require the completion of an HTTP request, establishing persistent connections, or starting timers or worker threads.
The `initialization` function is an ideal place for such logic.
The initialization function is an ideal place for such logic.

```java
// MyProvider implementation of the initialize function defined in Provider
Expand Down Expand Up @@ -246,7 +246,7 @@ class MyProvider implements Provider {
//...
onContextChanged(EvaluationContext oldContext, EvaluationContext newContext): void {
// update context-sensitive cached flags, or otherwise react to the change in the global context
// update context-sensitive cached flags, or otherwise react to the change in the global context
}
//...
Expand All @@ -255,4 +255,4 @@ class MyProvider implements Provider {
Providers may maintain remote connections, timers, threads or other constructs that need to be appropriately disposed of.
Provider authors may implement a `shutdown` function to perform relevant clean-up actions.
Alternatively, implementations might leverage language idioms such as auto-disposable interfaces or some means of cancellation signal propagation to allow for graceful shutdown.
Alternatively, implementations might leverage language idioms such as auto-disposable interfaces or some means of cancellation signal propagation to allow for graceful shutdown.

0 comments on commit b81fb15

Please sign in to comment.