33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
|
#import "/src/lib.typ" as chronos
|
||
|
|
||
|
|
||
|
#chronos.diagram({
|
||
|
import "/src/diagram.typ": *
|
||
|
_seq("User", "A", comment: "DoWork", enable-dst: true)
|
||
|
_seq("A", "B", comment: [#sym.quote.angle.l createRequest #sym.quote.angle.r], enable-dst: true)
|
||
|
_seq("B", "C", comment: "DoWork", enable-dst: true)
|
||
|
_seq("C", "B", comment: "WorkDone", destroy-src: true, dashed: true)
|
||
|
_seq("B", "A", comment: "RequestCreated", disable-src: true, dashed: true)
|
||
|
_seq("A", "User", comment: "Done", disable-src: true)
|
||
|
})
|
||
|
|
||
|
#chronos.diagram({
|
||
|
import "/src/diagram.typ": *
|
||
|
_seq("User", "A", comment: "DoWork", enable-dst: true)
|
||
|
_seq("A", "A", comment: "Internal call", enable-dst: true)
|
||
|
_seq("A", "B", comment: [#sym.quote.angle.l createRequest #sym.quote.angle.r], enable-dst: true)
|
||
|
_seq("B", "A", comment: "RequestCreated", disable-src: true, disable-dst: true, dashed: true)
|
||
|
_seq("A", "User", comment: "Done", disable-src: true)
|
||
|
})
|
||
|
|
||
|
#chronos.diagram({
|
||
|
import "/src/diagram.typ": *
|
||
|
_seq("alice", "bob", comment: "hello", enable-dst: true)
|
||
|
_seq("bob", "bob", comment: "self call", enable-dst: true)
|
||
|
_seq("bill", "bob", comment: "hello from thread 2", enable-dst: true)
|
||
|
_seq("bob", "george", comment: "create", enable-dst: true)
|
||
|
_seq("bob", "bill", comment: "done in thread 2", disable-src: true, dashed: true)
|
||
|
_seq("bob", "bob", comment: "rc", disable-src: true, dashed: true)
|
||
|
_seq("bob", "george", comment: "delete", destroy-dst: true)
|
||
|
_seq("bob", "alice", comment: "success", disable-src: true, dashed: true)
|
||
|
})
|