(jwtToken string)
| 395 | } |
| 396 | |
| 397 | func serverRunNormal(jwtToken string) error { |
| 398 | sockName, err := wshutil.ExtractUnverifiedSocketName(jwtToken) |
| 399 | if err != nil { |
| 400 | return fmt.Errorf("error extracting socket name from JWT: %v", err) |
| 401 | } |
| 402 | err = setupRpcClient(wshremote.MakeRemoteRpcServerImpl(os.Stdout, nil, nil, false, connServerInitialEnv, sockName), jwtToken) |
| 403 | if err != nil { |
| 404 | return err |
| 405 | } |
| 406 | wshfs.RpcClient = RpcClient |
| 407 | wshfs.RpcClientRouteId = RpcClientRouteId |
| 408 | WriteStdout("running wsh connserver (%s)\n", RpcContext.Conn) |
| 409 | go func() { |
| 410 | defer func() { |
| 411 | panichandler.PanicHandler("serverRunNormal:RunSysInfoLoop", recover()) |
| 412 | }() |
| 413 | wshremote.RunSysInfoLoop(RpcClient, RpcContext.Conn) |
| 414 | }() |
| 415 | startJobLogCleanup() |
| 416 | select {} // run forever |
| 417 | } |
| 418 | |
| 419 | func askForJwtToken() (string, error) { |
| 420 | // if it already exists in the environment, great, use it |
no test coverage detected