MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / createMainWshClient

Function createMainWshClient

cmd/server/main-server.go:385–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383}
384
385func createMainWshClient() {
386 rpc := wshserver.GetMainRpcClient()
387 wshutil.DefaultRouter.RegisterTrustedLeaf(rpc, wshutil.DefaultRoute)
388 wps.Broker.SetClient(wshutil.DefaultRouter)
389 localInitialEnv := envutil.PruneInitialEnv(envutil.SliceToMap(os.Environ()))
390 sockName := wavebase.GetDomainSocketName()
391 remoteImpl := wshremote.MakeRemoteRpcServerImpl(nil, wshutil.DefaultRouter, wshclient.GetBareRpcClient(), true, localInitialEnv, sockName)
392 localConnWsh := wshutil.MakeWshRpc(wshrpc.RpcContext{Conn: wshrpc.LocalConnName}, remoteImpl, "conn:local")
393 go wshremote.RunSysInfoLoop(localConnWsh, wshrpc.LocalConnName)
394 wshutil.DefaultRouter.RegisterTrustedLeaf(localConnWsh, wshutil.MakeConnectionRouteId(wshrpc.LocalConnName))
395 wshfs.RpcClient = localConnWsh
396 wshfs.RpcClientRouteId = wshutil.MakeConnectionRouteId(wshrpc.LocalConnName)
397}
398
399func grabAndRemoveEnvVars() error {
400 err := authkey.SetAuthKeyFromEnv()

Callers 1

mainFunction · 0.85

Calls 11

GetMainRpcClientFunction · 0.92
PruneInitialEnvFunction · 0.92
SliceToMapFunction · 0.92
GetDomainSocketNameFunction · 0.92
MakeRemoteRpcServerImplFunction · 0.92
GetBareRpcClientFunction · 0.92
MakeWshRpcFunction · 0.92
RunSysInfoLoopFunction · 0.92
MakeConnectionRouteIdFunction · 0.92
RegisterTrustedLeafMethod · 0.80
SetClientMethod · 0.80

Tested by

no test coverage detected