-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(diagrams): Add architecture diagram (#59)
- Loading branch information
1 parent
ae06ad9
commit 7b9097d
Showing
7 changed files
with
392 additions
and
6 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
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
Binary file not shown.
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,73 @@ | ||
direction: right | ||
|
||
vars: { | ||
icons: { | ||
gopher: https://www.svgrepo.com/show/373635/go-gopher.svg | ||
temporal: ./docs/diagrams/temporal.svg | ||
} | ||
} | ||
|
||
client: Client | ||
|
||
cloud: Cloud { | ||
starter: Starter { | ||
shape: image | ||
icon: ${icons.gopher} | ||
} | ||
|
||
worker: Temporal Worker { | ||
shape: image | ||
icon: ${icons.gopher} | ||
} | ||
|
||
svc-license: License µService { | ||
shape: image | ||
icon: ${icons.gopher} | ||
} | ||
|
||
svc-profile: Profile µService { | ||
shape: image | ||
icon: ${icons.gopher} | ||
} | ||
|
||
svc-org: Org µService { | ||
shape: image | ||
icon: ${icons.gopher} | ||
} | ||
|
||
worker -> svc-license: Create License { | ||
style: { | ||
stroke: "#ada9a8" | ||
stroke-dash: 3 | ||
} | ||
} | ||
worker -> svc-org: Create Org { | ||
style: { | ||
stroke: "#ada9a8" | ||
stroke-dash: 3 | ||
} | ||
} | ||
worker -> svc-profile: Create Profile { | ||
style: { | ||
stroke: "#ada9a8" | ||
stroke-dash: 3 | ||
} | ||
} | ||
} | ||
|
||
temporal: Temporal Cloud { | ||
cluster: Temporal Cluster { | ||
shape: image | ||
icon: ${icons.temporal} | ||
} | ||
} | ||
|
||
client -> cloud.starter: Connect/gRPC { | ||
style.animated: true | ||
} | ||
cloud.starter -> temporal.cluster: Start Temporal Workflow { | ||
style.animated: true | ||
} | ||
temporal.cluster -> cloud.worker: Pick up job { | ||
style.animated: true | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,44 @@ | ||
version: "3" | ||
|
||
vars: | ||
# https://d2lang.com/tour/themes/ | ||
THEME: 105 | ||
DARK_THEME: 105 | ||
|
||
tasks: | ||
compile: | ||
desc: "Compiles D2 diagrams" | ||
vars: | ||
DIAGRAMS: | ||
sh: find . -type f -name "*.d2" | ||
cmds: | ||
- for: { var: DIAGRAMS } | ||
task: compile-one | ||
vars: { ITEM: "{{ .ITEM }}" } | ||
|
||
compile-one: | ||
internal: true | ||
label: compile-one-{{.ITEM}} | ||
vars: | ||
DIRNAME: | ||
sh: dirname {{.ITEM}} | ||
BASENAME: | ||
sh: basename {{.ITEM}} | ||
FILENAME: | ||
sh: | | ||
echo {{.BASENAME}} | rev | cut -d. -f2- | rev | ||
cmds: | ||
- pkgx d2 fmt {{.ITEM}} | ||
- | | ||
pkgx d2 \ | ||
--sketch \ | ||
--theme={{.THEME}} \ | ||
--dark-theme={{.DARK_THEME}} \ | ||
-l elk \ | ||
--pad 25 \ | ||
{{.ITEM}} | ||
- echo ITEM={{.ITEM}}, DIRNAME={{.DIRNAME}}, BASENAME={{.BASENAME}}, FILENAME={{.FILENAME}} | ||
sources: | ||
- "{{.ITEM}}" | ||
generates: | ||
- "{{.DIRNAME}}/{{.FILENAME}}.svg" |