MCPcopy
hub / github.com/lotusirous/go-concurrency-patterns

github.com/lotusirous/go-concurrency-patterns @main sqlite

repository ↗ · DeepWiki ↗
98 symbols 170 edges 20 files 33 documented · 34%
README

Go Concurrency Patterns

This repository collects common concurrency patterns in Golang

Materials

Context:

Name Description Playground
1-boring A hello world to goroutine play
2-chan A hello world to go channel play
3-generator A python-liked generator play
4-fanin Fan in pattern play
5-restore-sequence Restore sequence play
6-select-timeout Add Timeout to a goroutine play
7-quit-signal Quit signal play
8-daisy-chan Daisy chan pattern play
9-google1.0 Build a concurrent google search from the ground-up play
10-google2.0 Build a concurrent google search from the ground-up play
11-google2.1 Build a concurrent google search from the ground-up play
12-google3.0 Build a concurrent google search from the ground-up play
13-adv-pingpong A sample ping-pong table implemented in goroutine play
14-adv-subscription Subscription play
15-bounded-parallelism Bounded parallelism play
16-context How to user context in HTTP client and server play
17-ring-buffer-channel Ring buffer channel play
18-worker-pool worker pool pattern play

Extension points exported contracts — how you extend this code

Subscription (Interface)
A Subscription delivers Items over a channel. Close cancels the subscription, closes the Updates channel, and returns t [4 …
14-adv-subscription/main.go
Search (FuncType)
(no doc)
11-google2.1/main.go
Search (FuncType)
(no doc)
12-google3.0/main.go
Search (FuncType)
(no doc)
9-google1.0/main.go
Search (FuncType)
(no doc)
10-google2.0/main.go
Fetcher (Interface)
A Fetcher fetches Items and returns the time when the next fetch should be attempted. On failure, Fetch returns a non-n [1 …
14-adv-subscription/main.go

Core symbols most depended-on inside this repo

fakeSearch
called by 6
12-google3.0/main.go
Close
called by 6
14-adv-subscription/main.go
Updates
called by 5
14-adv-subscription/main.go
Fetch
called by 4
14-adv-subscription/main.go
fakeSearch
called by 3
11-google2.1/main.go
First
called by 3
12-google3.0/main.go
fakeSearch
called by 3
9-google1.0/main.go
Subscribe
called by 3
14-adv-subscription/main.go

Shape

Function 57
Method 20
Struct 11
FuncType 4
TypeAlias 4
Interface 2

Languages

Go100%

Modules by API surface

14-adv-subscription/main.go37 symbols
12-google3.0/main.go6 symbols
9-google1.0/main.go5 symbols
15-bounded-parallelism/main.go5 symbols
11-google2.1/main.go5 symbols
10-google2.0/main.go5 symbols
5-restore-sequence/main.go4 symbols
4-fanin/main.go4 symbols
17-ring-buffer-channel/main.go4 symbols
18-worker-pool/main.go3 symbols
13-adv-pingpong/main.go3 symbols
8-daisy-chan/main.go2 symbols

For agents

$ claude mcp add go-concurrency-patterns \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact