MCPcopy
hub / github.com/pocketbase/pocketbase / HasSubscription

Method HasSubscription

tools/subscriptions/client.go:218–225  ·  view source on GitHub ↗

HasSubscription implements the [Client.HasSubscription] interface method.

(sub string)

Source from the content-addressed store, hash-verified

216
217// HasSubscription implements the [Client.HasSubscription] interface method.
218func (c *DefaultClient) HasSubscription(sub string) bool {
219 c.mu.RLock()
220 defer c.mu.RUnlock()
221
222 _, ok := c.subscriptions[sub]
223
224 return ok
225}
226
227// Get implements the [Client.Get] interface method.
228func (c *DefaultClient) Get(key string) any {

Callers 4

TestSubscribeFunction · 0.95
TestUnsubscribeFunction · 0.95
TestHasSubscriptionFunction · 0.95
TestRealtimeSubscribeFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestSubscribeFunction · 0.76
TestUnsubscribeFunction · 0.76
TestHasSubscriptionFunction · 0.76
TestRealtimeSubscribeFunction · 0.76