Last active
September 7, 2018 03:41
-
-
Save dulao5/7ad8e4bbb6ab3c664b0ad7fc6be34f47 to your computer and use it in GitHub Desktop.
golang-sharemem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph g { | |
node [ | |
fontsize = "16" | |
shape = "ellipse" | |
]; | |
edge []; | |
subgraph cluster_main { | |
style=filled; | |
color=lightgrey; | |
node [style=filled,color=white]; | |
make_chan -> go_StateMonitor -> go_Poller -> go_init_Resource -> for_range_complete -> go_sleep ; | |
label = "main goroutine"; | |
} | |
subgraph cluster_Poller1 { | |
node [style=filled]; | |
for_range_pending -> Poll -> send_to_status | |
Poll -> send_to_complete | |
label = "Poller1..2 goroutine"; | |
color=blue | |
} | |
go_Poller -> for_range_pending | |
{ rank=same; go_Poller for_range_pending } | |
subgraph cluster_StateMonitor { | |
node [style=filled]; | |
for_loop -> select -> case_ticker -> logState | |
select -> case_status -> update_urlStatus; | |
label = "StateMonitor goroutine"; | |
color=blue | |
urlStatus [ | |
label = "<f0> urlStatus map | url : status" | |
shape = "record" | |
] | |
} | |
go_StateMonitor -> for_loop | |
{ rank=same; go_StateMonitor for_loop } | |
pending [ | |
label = "<f0> pending chan * Resource | url string | errCount int" | |
shape = "record" | |
] | |
complete [ | |
label = "<f0>complete chan * Resource | url string | errCount int" | |
shape = "record" | |
] | |
status [ | |
label = "<f0> status chan * State | url string | status string" | |
shape = "record" | |
] | |
go_init_Resource -> pending [label = "init", color=gold, style=dashed] | |
complete -> for_range_complete [label = "receive ", color=forestgreen, style=dashed] | |
go_sleep -> pending [label = "sleep and push", color=forestgreen, style=dashed] | |
status -> case_status [ label = "receive status", color=forestgreen, style=dashed] | |
update_urlStatus -> urlStatus [ label = "update", color=forestgreen, style=dashed] | |
logState -> urlStatus [ label = "for range", color=forestgreen, style=dashed] | |
pending -> for_range_pending [label = "in queue", color=forestgreen, style=dashed] | |
send_to_complete -> complete [label = "out queue", color=forestgreen, style=dashed] | |
send_to_status -> status [label = "out queue", color=forestgreen, style=dashed] | |
} |
Author
dulao5
commented
Sep 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment