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.

policy-docs.

Loading the system map.

notes-api.

Loading the system map.

Loading the worked examples and practice.