Skip to content

Commit

Permalink
chore(docs): add note about initializing the OpenFgaClient only once (
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris authored Feb 21, 2024
2 parents 5e344f1 + 787e296 commit f63f2de
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/clients/dotnet/template/README_initializing.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The documentation below refers to the `{{packageName}}Client`, to read the documentation for `{{packageName}}Api`, check out the [`v0.2.1` documentation](https://github.com/{{gitUserId}}/{{gitRepoId}}/tree/v0.2.1#readme).
We strongly recommend you initialize the `{{appShortName}}Client` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.

> The {{packageName}}Client will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.
> The `{{packageName}}Client` will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.

#### No Credentials

Expand Down
4 changes: 2 additions & 2 deletions config/clients/go/template/README_initializing.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The documentation below refers to the `{{packageName}}Client`, to read the documentation for `{{packageName}}Api`, check out the [`v0.2.1` documentation](https://github.com/{{gitUserId}}/{{gitRepoId}}/tree/v0.2.1#readme).
We strongly recommend you initialize the `{{appShortName}}Client` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.

> The {{packageName}}Client will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.
> The `{{packageName}}Client` will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.

#### No Credentials

Expand Down
4 changes: 4 additions & 0 deletions config/clients/java/template/README_initializing.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
We strongly recommend you initialize the `{{appShortName}}Client` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.

> The `{{packageName}}Client` will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.

#### No Credentials

```java
Expand Down
4 changes: 2 additions & 2 deletions config/clients/js/template/README_initializing.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The documentation below refers to the `{{appShortName}}Client`, to read the documentation for `{{appShortName}}Api`, check out the [`v0.2.2` documentation](https://github.com/{{gitUserId}}/{{gitRepoId}}/tree/v0.2.2#readme).
We strongly recommend you initialize the `{{appShortName}}Client` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.

> The {{appShortName}}Client will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.
> The `{{appShortName}}Client` will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.

#### No Credentials

Expand Down
4 changes: 2 additions & 2 deletions config/clients/python/template/README_initializing.mustache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The documentation below refers to the `{{appShortName}}Client`, to read the documentation for `{{appShortName}}Api`, check out the [`v0.1.1` documentation](https://github.com/{{gitUserId}}/{{gitRepoId}}/tree/v0.1.1#readme).
We strongly recommend you initialize the `{{appShortName}}Client` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be preformed on every request.

> The {{appShortName}}Client will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.
> The `{{appShortName}}Client` will by default retry API requests up to {{defaultMaxRetry}} times on 429 and 5xx errors.

#### No Credentials

Expand Down

0 comments on commit f63f2de

Please sign in to comment.