Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for WaitForConnect (0.2 sec)

  1. internal/grid/connection_test.go

    	errFatal(local.RegisterSingleHandler(handlerTest, h1))
    	errFatal(local.RegisterStreamingHandler(handlerTest2, h2))
    
    	// local to remote
    	remoteConn := local.Connection(remoteHost)
    	errFatal(remoteConn.WaitForConnect(context.Background()))
    	const testPayload = "Hello Grid World!"
    
    	gotResp := make(chan struct{})
    	go func() {
    		start := time.Now()
    		t.Log("Roundtrip: sending request")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 6K bytes
    - Viewed (0)
  2. internal/grid/debug.go

    		res.Mux = append(res.Mux, m)
    	}
    	xioutil.SafeClose(ready)
    	for _, m := range res.Managers {
    		for _, remote := range m.Targets() {
    			if err := m.Connection(remote).WaitForConnect(ctx); err != nil {
    				return nil, err
    			}
    		}
    	}
    	return &res, nil
    }
    
    // Cleanup will clean up the test grid.
    func (t *TestGrid) Cleanup() {
    	t.cancel()
    	t.cleanupOnce.Do(func() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. internal/grid/connection.go

    }
    
    // WaitForConnect will block until a connection has been established or
    // the context is canceled, in which case the context error is returned.
    func (c *Connection) WaitForConnect(ctx context.Context) error {
    	if debugPrint {
    		fmt.Println(c.Local, "->", c.Remote, "WaitForConnect")
    		defer fmt.Println(c.Local, "->", c.Remote, "WaitForConnect done")
    	}
    	c.connChange.L.Lock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  4. internal/grid/grid_test.go

    		t.Log("2: server payload: ", len(payload), "bytes.")
    		err := RemoteErr(payload)
    		return nil, &err
    	}))
    
    	// local to remote
    	remoteConn := local.Connection(remoteHost)
    	remoteConn.WaitForConnect(context.Background())
    	defer testlogger.T.SetErrorTB(t)()
    
    	t.Run("localToRemote", func(t *testing.T) {
    		const testPayload = "Hello Grid World!"
    
    		start := time.Now()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 30.1K bytes
    - Viewed (0)
Back to top