Skip to content

Commit

Permalink
add circuit architecture diagram, also add a circuit breaker diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
cadgerfeast committed Jan 15, 2021
1 parent a3f8199 commit 4c6a34f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/content/api/circuit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ title: Mollitia - API - Circuit

The `Circuit` is the container of your **Resilience** logic.

<p class="flex-center-row" align="center"><img src="/img/circuit-architecture.png" alt="Circuit - Architecture"/></p>

## Usage

``` typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/content/api/module/breaker/sliding/count.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ When the circuit is closed, a sliding window is used to store the outcome of cal
The count-based sliding window calculates the outcome of the last N calls, and decides if the circuit should be opened (if the failure or slow call rate thresholds are exceeded)
For example, if the count window size is 10, the circular array has always 10 measurements.

<p class="flex-center-row" align="center"><img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"/></p>

## Options

| Name | Description | Default |
Expand Down
2 changes: 1 addition & 1 deletion docs/content/api/module/breaker/sliding/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When the circuit is closed, a sliding window is used to store the outcome of cal
The time-based sliding window calculates the outcome of the last calls receiving during the last N milliseconds, and decides if the circuit should be opened (if the failure or slow call rate thresholds are exceeded)
For example, if the count window size is 10000, the circular array stores the requests that occurred during the last 10s (with a maximum of 1000 elements in the array)

## Options
<p class="flex-center-row" align="center"><img src="/img/circuit-breaker-diagram.png" alt="Circuit Breaker - Diagram"/></p>

## Options

Expand Down
Binary file added docs/static/img/circuit-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/img/circuit-breaker-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/style/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,9 @@ table {
}
}
}
// Flex Row Image
p.flex-center-row {
> img {
max-width: 100%;
}
}

0 comments on commit 4c6a34f

Please sign in to comment.