Skip to content

Commit

Permalink
fixup: add status mermaid and table
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
  • Loading branch information
toddbaert committed May 4, 2023
1 parent 8ac0746 commit d64f3c4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions specification/sections/02-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions specification/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

0 comments on commit d64f3c4

Please sign in to comment.