MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / fakeHubClientFactory

Function fakeHubClientFactory

internal/serverapi/fakehub_test.go:34–38  ·  view source on GitHub ↗

fakeHubClientFactory 返回一个 clientFactory,所有节点共用同一个 fakeHub。

(hub *fakeHub)

Source from the content-addressed store, hash-verified

32
33// fakeHubClientFactory 返回一个 clientFactory,所有节点共用同一个 fakeHub。
34func fakeHubClientFactory(hub *fakeHub) func(node nodes.Node) *nodes.Client {
35 return func(node nodes.Node) *nodes.Client {
36 return nodes.NewClientWithHub(node.ID, hub)
37 }
38}

Calls 1

NewClientWithHubFunction · 0.92

Tested by

no test coverage detected