-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: new documentation website using docusaurus (#99)
* docs: new documentation website * docs: add quick links * chore: add missing yarn.lock * chore: apply codacy rules to readme files * chore: exclude website from codacy
- Loading branch information
Gui ⚡️ Guilherme Ferreira
authored
Feb 6, 2023
1 parent
985fcc5
commit d6fe944
Showing
26 changed files
with
29,979 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
exclude_paths: | ||
- "website/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: website/yarn.lock | ||
|
||
|
||
- name: Install dependencies | ||
working-directory: ./website | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build website | ||
working-directory: ./website | ||
run: yarn build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./website/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Test deployment | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test-deploy: | ||
name: Test deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: website/yarn.lock | ||
|
||
- name: Install dependencies | ||
working-directory: ./website | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Test build website | ||
working-directory: ./website | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
## Installation | ||
|
||
$ yarn | ||
|
||
## Local Development | ||
|
||
$ yarn start | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
## Build | ||
|
||
$ yarn build | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
## Deployment | ||
|
||
Using SSH: | ||
|
||
$ USE_SSH=true yarn deploy | ||
|
||
Not using SSH: | ||
|
||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Getting Started", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
|
||
# Installation | ||
|
||
KafkaFlow Retry Extensions is a set of NuGet packages that can extend [KafkaFlow](https://github.com/Farfetch/kafkaflow). | ||
|
||
|
||
## Prerequisites | ||
|
||
- One of the following .NET versions | ||
- .NET Core 2.1 or above. | ||
- .NET Framework 4.6.1 or above. | ||
- KafkaFlow NuGet package installed. | ||
|
||
|
||
## Installing | ||
|
||
On an application with KafkaFlow configured, install KafkaFlow Retry Extensions using NuGet package management. | ||
|
||
Required Package: | ||
|
||
* [KafkaFlow.Retry](https://www.nuget.org/packages/KafkaFlow.Retry/) | ||
|
||
|
||
You can quickly install it using .NET CLI 👇 | ||
```shell | ||
dotnet add package KafkaFlow.Retry | ||
``` | ||
|
||
You can find a complete list of the available packages [here](packages). | ||
|
||
## Setup | ||
|
||
Types are in the `KafkaFlow.Retry` namespace. | ||
|
||
```csharp | ||
using KafkaFlow; | ||
using KafkaFlow.Retry; | ||
``` | ||
|
||
The Retry Extensions library exposes a middleware. To use them, edit your KafkaFlow configuration add register a new middleware, as you can see below. | ||
|
||
```csharp | ||
|
||
.AddMiddlewares( | ||
middlewares => middlewares // KafkaFlow middlewares | ||
.RetrySimple( | ||
(config) => config | ||
.Handle<ExternalGatewayException>() // Exception to be handled | ||
.TryTimes(3) | ||
.WithTimeBetweenTriesPlan((retryCount) => | ||
TimeSpan.FromMilliseconds(Math.Pow(2, retryCount)*1000) // exponential backoff | ||
) | ||
) | ||
``` | ||
|
||
You can use other types of retry policies such as [Forever](../guides/forever-retries) or [Durable](../guides/durable-retries). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Packages | ||
|
||
|Name |nuget.org| | ||
|---------------------------------|----| | ||
|KafkaFlow.Retry|[![Nuget Package](https://img.shields.io/nuget/v/KafkaFlow.Retry.svg?logo=nuget)](https://www.nuget.org/packages/KafkaFlow.Retry/) ![Nuget downloads](https://img.shields.io/nuget/dt/KafkaFlow.Retry.svg) | ||
|KafkaFlow.Retry.API|[![Nuget Package](https://img.shields.io/nuget/v/KafkaFlow.Retry.API.svg?logo=nuget)](https://www.nuget.org/packages/KafkaFlow.Retry.API/) ![Nuget downloads](https://img.shields.io/nuget/dt/KafkaFlow.Retry.API.svg) | ||
|KafkaFlow.Retry.MongoDb|[![Nuget Package](https://img.shields.io/nuget/v/KafkaFlow.Retry.MongoDb.svg?logo=nuget)](https://www.nuget.org/packages/KafkaFlow.Retry.MongoDb/) ![Nuget downloads](https://img.shields.io/nuget/dt/KafkaFlow.Retry.MongoDb.svg) | ||
|KafkaFlow.Retry.SqlServer|[![Nuget Package](https://img.shields.io/nuget/v/KafkaFlow.Retry.SqlServer.svg?logo=nuget)](https://www.nuget.org/packages/KafkaFlow.Retry.SqlServer/) ![Nuget downloads](https://img.shields.io/nuget/dt/KafkaFlow.Retry.SqlServer.svg) |
Oops, something went wrong.