MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / NewDefaultClient

Function NewDefaultClient

tools/subscriptions/client.go:92–99  ·  view source on GitHub ↗

NewDefaultClient creates and returns a new DefaultClient instance.

()

Source from the content-addressed store, hash-verified

90
91// NewDefaultClient creates and returns a new DefaultClient instance.
92func NewDefaultClient() *DefaultClient {
93 return &DefaultClient{
94 id: security.RandomString(40),
95 store: map[string]any{},
96 channel: make(chan Message),
97 subscriptions: map[string]SubscriptionOptions{},
98 }
99}
100
101// Id implements the [Client.Id] interface method.
102func (c *DefaultClient) Id() string {

Callers 15

TestClientsFunction · 0.92
TestChunkedClientsFunction · 0.92
TestTotalClientsFunction · 0.92
TestClientByIdFunction · 0.92
TestRegisterFunction · 0.92
TestUnregisterFunction · 0.92
TestNewDefaultClientFunction · 0.92
TestIdFunction · 0.92
TestChannelFunction · 0.92
TestSubscriptionsFunction · 0.92
TestSubscribeFunction · 0.92
TestSubscribeOptionsFunction · 0.92

Calls 1

RandomStringFunction · 0.92

Tested by 15

TestClientsFunction · 0.74
TestChunkedClientsFunction · 0.74
TestTotalClientsFunction · 0.74
TestClientByIdFunction · 0.74
TestRegisterFunction · 0.74
TestUnregisterFunction · 0.74
TestNewDefaultClientFunction · 0.74
TestIdFunction · 0.74
TestChannelFunction · 0.74
TestSubscriptionsFunction · 0.74
TestSubscribeFunction · 0.74
TestSubscribeOptionsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…