Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: emit events on context change (client-only) #200

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,27 @@
"content": "Handlers attached after the provider is already in the associated state, MUST run immediately.",
"RFC 2119 keyword": "MUST",
"children": []
},
{
"id": "Requirement 5.3.4",
"machine_id": "requirement_5_3_4",
"content": "When the provider's `on context changed` is called, `PROVIDER_STALE` handlers MUST run.",
"RFC 2119 keyword": "MUST",
"children": []
},
{
"id": "Requirement 5.3.5",
"machine_id": "requirement_5_3_5",
"content": "If the provider's `on context changed` function terminates successfully, `PROVIDER_READY` handlers MUST run.",
"RFC 2119 keyword": "MUST",
"children": []
},
{
"id": "Requirement 5.3.6",
"machine_id": "requirement_5_3_6",
"content": "If the provider's `on context changed` function terminates abnormally, `PROVIDER_ERROR` handlers MUST run.",
"RFC 2119 keyword": "MUST",
"children": []
}
]
}
18 changes: 18 additions & 0 deletions specification/sections/05-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,21 @@ For instance, _application authors_ may attach readiness handlers to be confiden
If such handlers are attached after the provider underlying the client has already been initialized, they should run immediately.

See [provider initialization](./02-providers.md#24-initialization), [setting a provider](./01-flag-evaluation.md#setting-a-provider).

#### Requirement 5.3.4

> When the provider's `on context changed` is called, `PROVIDER_STALE` handlers **MUST** run.
beeme1mr marked this conversation as resolved.
Show resolved Hide resolved

See: [provider events](#51-provider-events), [`provider event types`](../types.md#provider-events)

#### Requirement 5.3.5

> If the provider's `on context changed` function terminates successfully, `PROVIDER_READY` handlers **MUST** run.

See: [provider events](#51-provider-events), [`provider event types`](../types.md#provider-events)

#### Requirement 5.3.6

> If the provider's `on context changed` function terminates abnormally, `PROVIDER_ERROR` handlers **MUST** run.

See: [provider events](#51-provider-events), [`provider event types`](../types.md#provider-events)
Loading