Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for newLB (0.14 sec)

  1. pkg/test/loadbalancersim/lb_test.go

    		},
    	}
    
    	algorithmCases := []struct {
    		name  string
    		newLB func(conns []*loadbalancer.WeightedConnection) network.Connection
    	}{
    		{
    			name:  "round robin",
    			newLB: loadbalancer.NewRoundRobin,
    		},
    		{
    			name: "least request",
    			newLB: func(conns []*loadbalancer.WeightedConnection) network.Connection {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 19 23:29:30 UTC 2022
    - 11K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/net/util_test.go

    	conn, err := lb.ln.Accept()
    	if err != nil {
    		lb.t.Fatalf("failed to accept: %v", err)
    	}
    	atomic.AddInt32(&lb.dials, 1)
    	go lb.handleConnection(conn, stopCh)
    }
    
    func newLB(t *testing.T, serverURL string) *tcpLB {
    	ln, err := net.Listen("tcp", "127.0.0.1:0")
    	if err != nil {
    		t.Fatalf("failed to bind: %v", err)
    	}
    	lb := tcpLB{
    		serverURL: serverURL,
    		ln:        ln,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 20 19:02:55 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top