MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / Subscribe

Method Subscribe

rpc/client/interface.go:126–126  ·  view source on GitHub ↗

Subscribe subscribes given subscriber to query. Returns a channel with cap=1 onto which events are published. An error is returned if it fails to subscribe. outCapacity can be used optionally to set capacity for the channel. Channel is never closed to prevent accidental reads. ctx cannot be used to

(ctx context.Context, subscriber, query string, outCapacity ...int)

Source from the content-addressed store, hash-verified

124 // ctx cannot be used to unsubscribe. To unsubscribe, use either Unsubscribe
125 // or UnsubscribeAll.
126 Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
127 // Unsubscribe unsubscribes given subscriber from query.
128 Unsubscribe(ctx context.Context, subscriber, query string) error
129 // UnsubscribeAll unsubscribes given subscriber from all the queries.

Callers 15

SubscribeMethod · 0.65
SubscribeWSMethod · 0.65
WaitForOneEventFunction · 0.65
TestBlockEventsFunction · 0.65
SubscribeMethod · 0.65
SubscribeMethod · 0.65
resubscribeMethod · 0.65
BroadcastTxCommitFunction · 0.65
SubscribeFunction · 0.65

Implementers 8

EventBustypes/event_bus.go
NopEventBustypes/event_bus.go
Clientlight/rpc/client.go
Serverlibs/pubsub/pubsub.go
WSEventsrpc/client/http/http.go
Clientrpc/client/mocks/client.go
Localrpc/client/local/local.go
WSClientrpc/jsonrpc/client/ws_client.go

Calls

no outgoing calls

Tested by 8

TestBlockEventsFunction · 0.52
startConsensusNetFunction · 0.52
subscribeFunction · 0.52
TestNodeStartStopFunction · 0.52