MCPcopy
hub / github.com/wavetermdev/waveterm / serverRunNormal

Function serverRunNormal

cmd/wsh/cmd/wshcmd-connserver.go:397–417  ·  view source on GitHub ↗
(jwtToken string)

Source from the content-addressed store, hash-verified

395}
396
397func 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
419func askForJwtToken() (string, error) {
420 // if it already exists in the environment, great, use it

Callers 1

serverRunFunction · 0.85

Calls 7

MakeRemoteRpcServerImplFunction · 0.92
PanicHandlerFunction · 0.92
RunSysInfoLoopFunction · 0.92
setupRpcClientFunction · 0.85
WriteStdoutFunction · 0.85
startJobLogCleanupFunction · 0.85

Tested by

no test coverage detected