Skip to content

Commit af71d0b

Browse files
committed
feat: add new Terrastruct application configuration and images
- Add a flowchart image to the README - Remove an old image from the repository - Add a new configuration file for a Terrastruct application, including a queue and workers Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
1 parent 414c6c2 commit af71d0b

File tree

4 files changed

+235
-1
lines changed

4 files changed

+235
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Queue is a Golang library for spawning and managing a Goroutine pool, allowing y
1919

2020
In Single Container or VM
2121

22-
![queue01](./images/queue-01.png)
22+
![queue01](./images/flow.svg)
2323

2424
Multile Container with Queue service like NSQ, NATs or Redis
2525

images/flow.d2

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
direction: right
2+
3+
user01: User01 {
4+
shape: person
5+
style.multiple: true
6+
}
7+
8+
user02: User02 {
9+
shape: person
10+
style.multiple: true
11+
}
12+
13+
user03: User03 {
14+
shape: person
15+
style.multiple: true
16+
}
17+
18+
user01 -> container.task01: Create Task {
19+
style:{
20+
animated: true
21+
bold: true
22+
font-size: 28
23+
}
24+
}
25+
user02 -> container.task02: Create Task{
26+
style:{
27+
animated: true
28+
bold: true
29+
font-size: 28
30+
}
31+
}
32+
user03 -> container.task03: Create Task{
33+
style:{
34+
animated: true
35+
bold: true
36+
font-size: 28
37+
}
38+
}
39+
40+
container: Application {
41+
direction: right
42+
icon: https://icons.terrastruct.com/dev%2Fgo.svg
43+
44+
task01: {
45+
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
46+
style.multiple: true
47+
}
48+
49+
task02: {
50+
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
51+
style.multiple: true
52+
}
53+
54+
task03: {
55+
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
56+
style.multiple: true
57+
}
58+
59+
queue: Queue Library {
60+
icon: https://icons.terrastruct.com/dev%2Fgo.svg
61+
producer: Producer {
62+
63+
}
64+
65+
consumer: Consumer {
66+
67+
}
68+
69+
channel: Ring Buffer {
70+
shape: cylinder
71+
}
72+
73+
producer -> channel
74+
channel -> consumer
75+
}
76+
77+
78+
79+
worker01: {
80+
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
81+
}
82+
83+
worker02: {
84+
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
85+
}
86+
87+
worker03: {
88+
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
89+
}
90+
91+
worker04: {
92+
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
93+
}
94+
95+
task01 -> queue.producer: Enqueue Task
96+
task02 -> queue.producer: Enqueue Task
97+
task03 -> queue.producer: Enqueue Task
98+
queue.consumer -> worker01: dispatch task
99+
queue.consumer -> worker02: dispatch task
100+
queue.consumer -> worker03: dispatch task
101+
queue.consumer -> worker04: dispatch task
102+
}

0 commit comments

Comments
 (0)