Skip to content

Commit 2c36abd

Browse files
docs: add language-specific initialize naming (#244)
Signed-off-by: Max VelDink <[email protected]> Co-authored-by: Todd Baert <[email protected]>
1 parent b58c3b4 commit 2c36abd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: specification.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@
404404
{
405405
"id": "Requirement 2.4.1",
406406
"machine_id": "requirement_2_4_1",
407-
"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.",
407+
"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.",
408408
"RFC 2119 keyword": "MAY",
409409
"children": []
410410
},

Diff for: specification/sections/02-providers.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ResolutionDetails<MyStruct> resolveStructureValue(string flagKey, MyStruct defau
121121
```
122122
##### Requirement 2.2.9
123123

124-
> The `provider` **SHOULD** populate the `resolution details` structure's `flag metadata` field.
124+
> The `provider` **SHOULD** populate the `resolution details` structure's `flag metadata` field.
125125
126126
##### Requirement 2.2.10
127127

@@ -164,11 +164,11 @@ class MyProvider implements Provider {
164164

165165
#### Requirement 2.4.1
166166

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

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

0 commit comments

Comments
 (0)