Skip to content

Commit 6439007

Browse files
committed
doc(examples): add single-node connection example
Closes #29
1 parent 2687e88 commit 6439007

File tree

98 files changed

+836
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+836
-167
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Publish to Maven Central
3636
run: |
37-
./mvnw -B clean deploy -PsonatypeRelease -DskipTests -pl '!jacoco-coverage-aggregate-report'
37+
./mvnw -B clean deploy -PsonatypeRelease -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
3838
env:
3939
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
4040
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

.github/workflows/snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Publish Snapshot to Maven Central
2929
run: |
30-
./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests -pl '!jacoco-coverage-aggregate-report'
30+
./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests -pl '!jacoco-coverage-aggregate-report,!documentation'
3131
env:
3232
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }}
3333
MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ workbench.xmi
2323
.factorypath
2424
documentation/venv
2525
documentation/site
26+
documentation/target

documentation/README.md

Lines changed: 83 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,99 @@
1-
## Documentation
1+
## Документация
22

3-
### Local Build
3+
### Локальная сборка документации
44

5-
To deploy the site locally on the current branch/tag:
5+
Чтобы собрать документацию локально на текущей ветке/теге:
66

7-
1. ```bash
7+
1. Перейдите на ветку/тег и инициализируйте python-окружение:
8+
9+
```shell
810
git checkout <branch/tag>
9-
```
10-
2. ```bash
1111
cd documentation
12-
```
13-
3. ```bash
1412
python3 -m venv venv
15-
```
16-
4. ```bash
1713
source venv/bin/activate
18-
```
19-
5. ```bash
2014
pip install -r requirements.txt
2115
```
22-
6. ```bash
23-
mkdocs serve
16+
17+
2. Соберите или запустите сайт:
18+
19+
```shell
20+
mkdocs build
21+
```
22+
23+
```shell
24+
mkdocs serve
2425
```
2526

26-
### Schemas
27+
### Интернационализация
28+
29+
На данный момент документация поддерживает два языка:
30+
31+
- Русский 🇷🇺 - по умолчанию
32+
- Английский 🇺🇸
33+
34+
### Правила написания новых страниц и разделов
35+
36+
#### Раздел
37+
38+
`Раздел` - группа страниц, описывающая одну конкретную тему. Раздел может включать подразделы.
39+
Раздел оформаляется в отдельной директории. Каждый раздел обязан иметь страницу с именем `index.md`,
40+
в которой описывается тематика раздела.
41+
42+
`Страница` - страница с произвольным именем и расширением `.md`, написанная на `markdown`.
43+
44+
При добавлении страницы и раздела, добавьте их в секцию `nav` в файле `mkdocs.yml`:
2745

28-
Documentation supports `.drawio` format schemas. Place your schema in the `assets` directory. In the markdown text,
29-
refer to the schema as a regular markdown image. The path to the image must be relative:
46+
Пример раздела:
47+
48+
> ![alt](readme-images/sections.png)
49+
50+
Пример оформленной навигации для этого раздела:
51+
52+
> ![alt](readme-images/navigation.png)
53+
54+
### Схемы
55+
56+
#### Plantuml
57+
58+
Документация поддерживает рендеринг `plantuml-диаграмм`. Для того чтобы добавить схему plantuml в
59+
текст страницы `markdown` используйте блок кода с расширением `puml`:
60+
61+
> \`\`\`puml
62+
>
63+
> @startuml
64+
>
65+
> Alice -> Bob: test
66+
>
67+
> @enduml
68+
>
69+
> \`\`\`
70+
71+
#### Drawio
72+
73+
Документация поддерживает отображение схем, написанных в `drawio` (файлы с расширением `.drawio`).
74+
Необходимо добавить схему в директорию `assets`. В тексте markdown добавьте схему также как
75+
добавляете обыное изображение, используя относительный путь:
3076

3177
```markdown
3278
![](../../../../assets/<some-paths>/schema.drawio)
3379
```
80+
81+
### Code Snippets
82+
83+
Документация поддерживает добавление в текст markdown включение текста из других файлов (snippets).
84+
Для того, чтобы добавить snippet в текст markdown изучите
85+
документацию [расширения](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/).
86+
Путь к файлам, которые будут включены вычисляется относительно директории
87+
`docs/documentation/examples`.
88+
89+
#### Дополнительные возможности
90+
91+
Также поддерживаются следующие дополнения:
92+
93+
- Использование [emoji](https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/) в
94+
тексте страниц.
95+
- [Табы](https://squidfunk.github.io/mkdocs-material/reference/content-tabs/)
96+
- [Сноски](https://squidfunk.github.io/mkdocs-material/reference/footnotes/)
97+
- [Диаграммы mermaid](https://squidfunk.github.io/mkdocs-material/reference/diagrams/)
98+
- [Admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
99+
- [Аннотации](https://squidfunk.github.io/mkdocs-material/reference/annotations/)

documentation/README_EN.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
## Documentation
2+
3+
### Local documentation deploy
4+
5+
To deploy documentation locally on current branch/tag:
6+
7+
1. Checkout branch/tag and initialize python-environment:
8+
9+
```shell
10+
git checkout <branch/tag>
11+
cd documentation
12+
python3 -m venv venv
13+
source venv/bin/activate
14+
pip install -r requirements.txt
15+
```
16+
17+
2. Build or serve site:
18+
19+
```shell
20+
mkdocs build
21+
```
22+
23+
```shell
24+
mkdocs serve
25+
```
26+
27+
### Internationalization
28+
29+
Documentation supports two languages:
30+
31+
- Russian 🇷🇺 - by default
32+
- English 🇺🇸
33+
34+
### New pages writing rules
35+
36+
#### Section
37+
38+
`Section` is group of pages, describing one certain topic. Section can include subsections. Write
39+
section on separate directory. Each section must have page with `index.md` name that describe topic
40+
area.
41+
42+
`Page` is page with any name and `.md` extension.
43+
44+
When a new section and page are being written, they should be added to the `nav` section in the
45+
`mkdocs.yml` file.
46+
47+
Section example:
48+
49+
> ![alt](readme-images/sections.png)
50+
51+
Example of a decorated navigation for this section:
52+
53+
> ![alt](readme-images/navigation.png)
54+
55+
### Схемы
56+
57+
#### Plantuml
58+
59+
The documentation supports the rendering of `plantuml diagrams`. To add the plantuml schema to the
60+
text of the `markdown` page, use a block of code with the `puml` extension.:
61+
62+
> \`\`\`puml
63+
>
64+
> @startuml
65+
>
66+
> Alice -> Bob: test
67+
>
68+
> @enduml
69+
>
70+
> \`\`\`
71+
72+
#### Drawio
73+
74+
The documentation supports the display of diagrams written in `drawio` (files with the `.drawio`
75+
extension). It is necessary to add the schema to the `assets` directory. In the Markdown text, add a
76+
diagram in the same way as you add an image using a relative path:
77+
78+
```markdown
79+
![](../../../../assets/<some-paths>/schema.drawio)
80+
```
81+
82+
### Code Snippets
83+
84+
The documentation supports adding text inclusions from other files (snippets) to the Markdown text.
85+
To add snippet to the Markdown text, read the
86+
extension's [documentation](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/).
87+
The path to the files to be included is calculated relative to the `docs/documentation/examples`
88+
directory.
89+
90+
#### Additional extensions
91+
92+
- Usage of [emoji](https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/) in Markdown
93+
pages
94+
- [Tabs of content](https://squidfunk.github.io/mkdocs-material/reference/content-tabs/)
95+
- [Footnotes](https://squidfunk.github.io/mkdocs-material/reference/footnotes/)
96+
- [Mermaid diagrams](https://squidfunk.github.io/mkdocs-material/reference/diagrams/)
97+
- [Admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
98+
- [Annotations](https://squidfunk.github.io/mkdocs-material/reference/annotations/)

documentation/docs/assets/drawio/client/balancer.drawio renamed to documentation/doc-src/assets/drawio/client/balancer.drawio

File renamed without changes.

documentation/docs/assets/drawio/client/connection-pool.drawio renamed to documentation/doc-src/assets/drawio/client/connection-pool.drawio

File renamed without changes.

documentation/docs/assets/drawio/client/distributing-round-robin.drawio renamed to documentation/doc-src/assets/drawio/client/distributing-round-robin.drawio

File renamed without changes.

documentation/docs/assets/drawio/client/few-connection-box.drawio renamed to documentation/doc-src/assets/drawio/client/few-connection-box.drawio

File renamed without changes.

documentation/docs/assets/drawio/client/heartbeat-1.drawio renamed to documentation/doc-src/assets/drawio/client/heartbeat-1.drawio

File renamed without changes.

0 commit comments

Comments
 (0)