MCPcopy
hub / github.com/livekit/livekit / NewTestServer

Function NewTestServer

pkg/agent/testutils/server.go:41–54  ·  view source on GitHub ↗
(bus psrpc.MessageBus)

Source from the content-addressed store, hash-verified

39}
40
41func NewTestServer(bus psrpc.MessageBus) *TestServer {
42 localNode, _ := routing.NewLocalNode(nil)
43 return NewTestServerWithService(must.Get(service.NewAgentService(
44 &config.Config{
45 Region: "test",
46 Agents: agent.Config{
47 TargetLoad: agent.DefaultTargetLoad,
48 },
49 },
50 localNode,
51 bus,
52 auth.NewSimpleKeyProvider("test", "verysecretsecret"),
53 )))
54}
55
56func NewTestServerWithService(s AgentService) *TestServer {
57 return &TestServer{s, "test", "verysecretsecret"}

Callers 3

TestAgentFunction · 0.92
TestAgentLoadBalancingFunction · 0.92

Calls 4

NewLocalNodeFunction · 0.92
NewAgentServiceFunction · 0.92
NewTestServerWithServiceFunction · 0.85
GetMethod · 0.45

Tested by 3

TestAgentFunction · 0.74
TestAgentLoadBalancingFunction · 0.74