Skip to content

Commit 5671865

Browse files
Merge pull request #86 from cgreeno/feat/seq-participant-names
2 parents bfea4e1 + 90c82c0 commit 5671865

18 files changed

Lines changed: 409 additions & 66 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ Note that with `--coords` enabled, the grid-coords shown show the starting locat
597597
- [x] Solid and dotted arrows, with or without an arrowhead (`->>`, `-->>`, `->`, `-->`)
598598
- [x] Cross (`-x`, `--x`), async point (`-)`, `--)`) and bidirectional (`<<->>`, `<<-->>`) arrows
599599
- [x] Central connections (`A ()->>() B`) on any arrow type
600+
- [x] Participant names with spaces, dashes and equals (`cron job->>customer-notifier`)
600601
- [x] Self-messages (`A->>A: think`)
601602
- [x] Participant declarations (`participant Alice`)
602603
- [x] Participant aliases (`participant A as Alice`)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sequenceDiagram
2+
alt cache hit
3+
cron job->>data svc: read
4+
else fall back -> origin: yes
5+
cron job->>data svc: fetch
6+
end
7+
---
8+
+----------+ +----------+
9+
| cron job | | data svc |
10+
+-----+----+ +-----+----+
11+
+-[alt cache hit]------------+
12+
| | | |
13+
| | read | |
14+
| +--------------->| |
15+
+.[fall back -> origin: yes].+
16+
| | | |
17+
| | fetch | |
18+
| +--------------->| |
19+
| | | |
20+
+----------------------------+
21+
| |
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sequenceDiagram
2+
participant cron job
3+
participant data svc
4+
cron job->>data svc: sync
5+
Note over cron job,data svc: nightly -> at 02:00
6+
Note right of data svc: ack
7+
---
8+
+----------+ +----------+
9+
| cron job | | data svc |
10+
+-----+----+ +-----+----+
11+
| |
12+
| sync |
13+
+--------------->|
14+
| |
15+
+---------------------+
16+
| nightly -> at 02:00 |
17+
+---------------------+
18+
| |
19+
| | +-----+
20+
| | | ack |
21+
| | +-----+
22+
| |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sequenceDiagram
2+
participant cron job as Cron
3+
participant data=svc as DS
4+
cron job->>data=svc: sync
5+
data=svc--)cron job: ok
6+
---
7+
+------+ +----+
8+
| Cron | | DS |
9+
+---+--+ +--+-+
10+
| |
11+
| sync |
12+
+---------->|
13+
| |
14+
| ok |
15+
|(..........+
16+
| |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sequenceDiagram
2+
Alice-in-Wonderland->Bob: hi
3+
Bob-->Alice-in-Wonderland: yo
4+
---
5+
+---------------------+ +-----+
6+
| Alice-in-Wonderland | | Bob |
7+
+----------+----------+ +--+--+
8+
| |
9+
| hi |
10+
+-------------------|
11+
| |
12+
| yo |
13+
|...................+
14+
| |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
sequenceDiagram
2+
participant cron job
3+
cron job->>customer-notifier: run
4+
customer-notifier-->>cron job: done
5+
---
6+
+----------+ +-------------------+
7+
| cron job | | customer-notifier |
8+
+-----+----+ +---------+---------+
9+
| |
10+
| run |
11+
+------------------->|
12+
| |
13+
| done |
14+
|<...................+
15+
| |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sequenceDiagram
2+
cron job ()->>() data svc: run
3+
---
4+
┌──────────┐ ┌──────────┐
5+
│ cron job │ │ data svc │
6+
└─────┬────┘ └─────┬────┘
7+
│ │
8+
│ run │
9+
o───────────────►o
10+
│ │
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sequenceDiagram
2+
alt cache hit
3+
cron job->>data svc: read
4+
else fall back -> origin: yes
5+
cron job->>data svc: fetch
6+
end
7+
---
8+
┌──────────┐ ┌──────────┐
9+
│ cron job │ │ data svc │
10+
└─────┬────┘ └─────┬────┘
11+
┌─[alt cache hit]────────────┐
12+
│ │ │ │
13+
│ │ read │ │
14+
│ ├───────────────►│ │
15+
├┈[fall back -> origin: yes]┈┤
16+
│ │ │ │
17+
│ │ fetch │ │
18+
│ ├───────────────►│ │
19+
│ │ │ │
20+
└────────────────────────────┘
21+
│ │
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sequenceDiagram
2+
participant cron job
3+
participant data svc
4+
cron job->>data svc: sync
5+
Note over cron job,data svc: nightly -> at 02:00
6+
Note right of data svc: ack
7+
---
8+
┌──────────┐ ┌──────────┐
9+
│ cron job │ │ data svc │
10+
└─────┬────┘ └─────┬────┘
11+
│ │
12+
│ sync │
13+
├───────────────►│
14+
│ │
15+
┌─────────────────────┐
16+
│ nightly -> at 02:00 │
17+
└─────────────────────┘
18+
│ │
19+
│ │ ┌─────┐
20+
│ │ │ ack │
21+
│ │ └─────┘
22+
│ │
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sequenceDiagram
2+
participant cron job as Cron
3+
participant data=svc as DS
4+
cron job->>data=svc: sync
5+
data=svc--)cron job: ok
6+
---
7+
┌──────┐ ┌────┐
8+
│ Cron │ │ DS │
9+
└───┬──┘ └──┬─┘
10+
│ │
11+
│ sync │
12+
├──────────►│
13+
│ │
14+
│ ok │
15+
│(┈┈┈┈┈┈┈┈┈┈┤
16+
│ │

0 commit comments

Comments
 (0)