Reading diagrams / Topic 22 of 42
Wrappers: paths that merge
The rule
Some code wraps an entry's own work: a wrapper that the request passes through, such as a policy check. Several entries can share one. Wrappers sit in the middle band of the wall, drawn as purple hulls. The paths of the entries that use one merge as they enter, share one thick stretch, and split again, each back to the line it came in on.
The stretch inside the hull carries the wrapper's own rings and diamonds. Where the paths split, near the right edge of the hull and still inside it, each entry has a dashed hollow ring, a socket: the place where the function that entry hands to the wrapper runs. A small grey word under an entry's path is a value that entry fixes for the wrapper, such as its policy. Each path leaves the hull through a short dark tick on its right edge, the exit: there the wrapper returns. Every hull draws an exit on each of its paths, even a hull with one path.
If the middle band is empty, no entry goes through a wrapper. Entries can still call the same functions; a wrapper is code that runs the entry's own work inside its own.
- Two paths in one hull confirm they share that wrapper; paths in different hulls do not share a wrapper; a path that crosses the band outside every hull has none.
- A socket on an entry's branch: that entry hands its own function to the wrapper.
policy-docs.
Loading the system map.
notes-api.
Loading the system map.
How to read this: what each mark in these pictures means
Loading the worked examples and practice.