-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathflow-01.d2
131 lines (112 loc) · 2.31 KB
/
flow-01.d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
direction: right
...@_base
user01: {
label: User01
class: [base; person; multiple]
}
user02: {
label: User02
class: [base; person; multiple]
}
user03: {
label: User03
class: [base; person; multiple]
}
user01 -> container.task01: {
label: Create Task
class: [base; animated]
}
user02 -> container.task02: {
label: Create Task
class: [base; animated]
}
user03 -> container.task03: {
label: Create Task
class: [base; animated]
}
container: Application {
direction: right
style: {
bold: true
font-size: 28
}
icon: https://icons.terrastruct.com/dev%2Fgo.svg
task01: {
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
class: [task; multiple]
}
task02: {
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
class: [task; multiple]
}
task03: {
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
class: [task; multiple]
}
queue: {
label: Queue Library
icon: https://icons.terrastruct.com/dev%2Fgo.svg
style: {
bold: true
font-size: 32
fill: honeydew
}
producer: {
label: Producer
class: library
}
consumer: {
label: Consumer
class: library
}
database: {
label: Ring\nBuffer
shape: cylinder
style: {
bold: true
font-size: 32
fill-pattern: lines
font: mono
}
}
producer -> database
database -> consumer
}
worker01: {
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
class: [task]
}
worker02: {
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
class: [task]
}
worker03: {
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
class: [task]
}
worker04: {
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
class: [task]
}
task01 -> queue.producer: {
class: [base; enqueue]
}
task02 -> queue.producer: {
class: [base; enqueue]
}
task03 -> queue.producer: {
class: [base; enqueue]
}
queue.consumer -> worker01: {
class: [base; dispatch]
}
queue.consumer -> worker02: {
class: [base; dispatch]
}
queue.consumer -> worker03: {
class: [base; dispatch]
}
queue.consumer -> worker04: {
class: [base; dispatch]
}
}