From d64f3c4d1434894285c43a78b4afb9cfc9cdb464 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 4 May 2023 13:12:48 -0400 Subject: [PATCH] fixup: add status mermaid and table Signed-off-by: Todd Baert --- specification/sections/02-providers.md | 16 ++++++++++++++++ specification/types.md | 10 ++++++++++ 2 files changed, 26 insertions(+) diff --git a/specification/sections/02-providers.md b/specification/sections/02-providers.md index c71d832a..98e7f70d 100644 --- a/specification/sections/02-providers.md +++ b/specification/sections/02-providers.md @@ -194,6 +194,22 @@ class MyProvider implements Provider { Providers without this field can be assumed to be ready immediately. +The diagram below illustrates the possible states and transitions of the `status` fields. + +```mermaid +--- +title: Provider State +--- +stateDiagram-v2 + direction LR + [*] --> NOT_READY + NOT_READY --> READY + READY --> ERROR + ERROR --> READY +``` + +see [provider status](../types.md#provider-status) + #### Requirement 2.4.3 > The provider **MUST** set its `status` field/accessor to `READY` if its `initialize` function terminates normally. diff --git a/specification/types.md b/specification/types.md index 4adc5637..a3c756c3 100644 --- a/specification/types.md +++ b/specification/types.md @@ -93,3 +93,13 @@ A structure containing the following fields: A structure which supports definition of arbitrary properties, with keys of type `string`, and values of type `boolean`, `string`, or `number`. This structure is populated by a provider for use by an [Application Author](./glossary.md#application-author) (via the [Evaluation API](./glossary.md#evaluation-api)) or an [Application Integrator](./glossary.md#application-integrator) (via [hooks](./sections/04-hooks.md)). + +### Provider Status + +An enumeration of possible provider states. + +| Status | Explanation | +| --------- | ------------------------------------------------------------------------------- | +| NOT_READY | The provider has not been initialized. | +| READY | The provider has been initialized, and is able to reliably resolve flag values. | +| ERROR | The provider is initialed but is not able to reliably resolve flag values. | \ No newline at end of file