Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for Connection (3.12 sec)

  1. internal/grid/connection.go

    }
    
    // String returns a string representation of the connection.
    func (c *Connection) String() string {
    	return fmt.Sprintf("%s->%s", c.Local, c.Remote)
    }
    
    // StringReverse returns a string representation of the reverse connection.
    func (c *Connection) StringReverse() string {
    	return fmt.Sprintf("%s->%s", c.Remote, c.Local)
    }
    
    // State is a connection state.
    type State uint32
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  2. internal/grid/connection_test.go

    	// Killing should cancel the context on the request.
    	<-gotCall
    }
    
    func dummyRequestValidate(r *http.Request) error {
    	return nil
    }
    
    func TestShouldConnect(t *testing.T) {
    	var c Connection
    	var cReverse Connection
    	hosts := []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
    	for x := range hosts {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. tests/connection_test.go

    func TestWithSingleConnection(t *testing.T) {
    	expectedName := "test"
    	var actualName string
    
    	setSQL, getSQL := getSetSQL(DB.Dialector.Name())
    	if len(setSQL) == 0 || len(getSQL) == 0 {
    		return
    	}
    
    	err := DB.Connection(func(tx *gorm.DB) error {
    		if err := tx.Exec(setSQL, expectedName).Error; err != nil {
    			return err
    		}
    
    		if err := tx.Raw(getSQL).Scan(&actualName).Error; err != nil {
    			return err
    		}
    		return nil
    	})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 28 14:16:42 GMT 2022
    - 963 bytes
    - Viewed (0)
  4. internal/grid/manager.go

    	}
    }
    
    // AuthFn should provide an authentication string for the given aud.
    type AuthFn func(aud string) string
    
    // Connection will return the connection for the specified host.
    // If the host does not exist nil will be returned.
    func (m *Manager) Connection(host string) *Connection {
    	return m.targets[host]
    }
    
    // RegisterSingleHandler will register a stateless handler that serves
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. internal/event/target/postgresql.go

    		if f != event.NamespaceFormat && f != event.AccessFormat {
    			return fmt.Errorf("unrecognized format value")
    		}
    	}
    
    	if p.ConnectionString != "" {
    		// No pq API doesn't help to validate connection string
    		// prior connection, so no validation for now.
    	} else {
    		// Some fields need to be specified when ConnectionString is unspecified
    		if p.Port == "" {
    			return fmt.Errorf("unspecified port")
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  6. internal/http/transports.go

    	// 		// frame will be carried out if no frame is received on the
    	// 		// connection. 5 minutes is sufficient time for any idle connection.
    	// 		trhttp2.ReadIdleTimeout = 5 * time.Minute
    	// 		// PingTimeout is the timeout after which the connection will be closed
    	// 		// if a response to Ping is not received.
    	// 		trhttp2.PingTimeout = dialTimeout
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/ztunnelserver.go

    			}
    
    		case <-time.After(ztunnelKeepAliveCheckInterval):
    			// do a short read, just to see if the connection to ztunnel is
    			// still alive. As ztunnel shouldn't send anything unless we send
    			// something first, we expect to get an os.ErrDeadlineExceeded error
    			// here if the connection is still alive.
    			// note that unlike tcp connections, reading is a good enough test here.
    			_, err := conn.readMessage(time.Second / 100)
    			switch {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  8. internal/grid/grid_test.go

    	}
    	errFatal(h1.Register(local, handler1))
    	errFatal(h2.Register(local, handler2))
    
    	errFatal(h1.Register(remote, handler1))
    	errFatal(h2.Register(remote, handler2))
    
    	// local to remote connection
    	remoteConn := local.Connection(remoteHost)
    	const testPayload = "Hello Grid World!"
    
    	start := time.Now()
    	req := testRequest{Num: 1, String: testPayload}
    	resp, err := h1.Call(context.Background(), remoteConn, &req)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  9. cmd/peer-s3-client.go

    }
    
    // Returns a peer S3 client.
    func newPeerS3Client(node Node) peerS3Client {
    	var gridConn atomic.Pointer[grid.Connection]
    
    	return &remotePeerS3Client{
    		node: node,
    		gridConn: func() *grid.Connection {
    			// Lazy initialization of grid connection.
    			// When we create this peer client, the grid connection is likely not yet initialized.
    			if node.GridHost == "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  10. internal/grid/benchmark_test.go

    						if src == dst {
    							dst = (dst + 1) % len(managers)
    						}
    						local := managers[src]
    						conn := local.Connection(hosts[dst])
    						if conn == nil {
    							b.Fatal("No connection")
    						}
    						// Send the payload.
    						t := time.Now()
    						resp, err := conn.Request(ctx, handlerTest, payload)
    						latency += time.Since(t).Nanoseconds()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
Back to top