()
| 383 | } |
| 384 | |
| 385 | func 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 | |
| 399 | func grabAndRemoveEnvVars() error { |
| 400 | err := authkey.SetAuthKeyFromEnv() |
no test coverage detected