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

Interface Subscription

14-adv-subscription/main.go:21–24  ·  view source on GitHub ↗

A Subscription delivers Items over a channel. Close cancels the subscription, closes the Updates channel, and returns the last fetch error, if any.

Source from the content-addressed store, hash-verified

19// subscription, closes the Updates channel, and returns the last fetch error,
20// if any.
21type Subscription interface {
22 Updates() <-chan Item
23 Close() error
24}
25
26// Subscribe returns a new Subscription that uses fetcher to fetch Items.
27func Subscribe(fetcher Fetcher) Subscription {

Callers 9

NaiveMergeFunction · 0.65
MergeFunction · 0.65
loopMethod · 0.65
mainFunction · 0.65
mainFunction · 0.65
CloseMethod · 0.65
MergeFunction · 0.65
loopMethod · 0.65
mainFunction · 0.65

Implementers 4

sub14-adv-subscription/main.go
naiveMerge14-adv-subscription/main.go
merge14-adv-subscription/main.go
deduper14-adv-subscription/main.go

Calls

no outgoing calls

Tested by

no test coverage detected