github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/docs/diagrams/realtime-model.gv (about) 1 digraph realtime { 2 graph [splines=true]; 3 node [shape="box", fontname="lato", fontsize=11, margin=0.12, color="#297EF2", fontcolor="#32363F"]; 4 edge [color="#32363F"]; 5 ranksep=0.45; nodesep=0.6; 6 7 redisHub [label="{<0>redisHub|<1>cli (redis client)|<2>mem (*memHub)|<3>firehose (*topic)}", shape="record"]; 8 memHub [label="{<0>memHub|<1>mutex (RWMutex)|<2>topics (map[string]*topic)|<3>bySubscribers (map[*Subscriber][]string)}", shape="record"] 9 topic [label="{<0>topic|<1>broadcast (chan)|<2>subs (map[*Subscriber]filter)|<3>subscribe (chan *toWatch)|<4>unsubscribe (chan *toWatch)|<5>running (chan bool)}", shape="record"]; 10 sub [label="{<0>Subscriber|<1>prefixer (prefixer.Prefixer)|<2>Channel (EventsChan)|<3>hub (Hub)|<4>running (chan)}", shape="record"] 11 memSub [label="{<0>EventsChan (chan)}", shape="record"] 12 filter [label="{<0>filter|<1>whole (bool)|<2>ids ([]string)}", shape="record"] 13 toWatch [label="{<0>toWatch|<1>sub (*Subscriber)|<2>id (string)}", shape="record"] 14 15 sub:2 -> memSub; 16 sub:3 -> redisHub; 17 redisHub:2 -> memHub; 18 redisHub:3 -> topic; 19 memHub:2 -> topic; 20 memHub:3 -> sub; 21 topic:2 -> sub; 22 topic:2 -> filter; 23 topic:3 -> toWatch; 24 topic:4 -> toWatch; 25 toWatch:1 -> sub; 26 }