Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for makeConn (0.09 sec)

  1. pilot/pkg/autoregistration/controller_test.go

    }
    
    var _ connection = &fakeConn{}
    
    type fakeConn struct {
    	sync.RWMutex
    	proxy    *model.Proxy
    	connTime time.Time
    	stopped  bool
    }
    
    func makeConn(proxy *model.Proxy, connTime time.Time) *fakeConn {
    	return &fakeConn{proxy: proxy, connTime: connTime}
    }
    
    func (f *fakeConn) ID() string {
    	return fmt.Sprintf("%s-%v", f.proxy.IPAddresses[0], f.connTime)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 00:00:36 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  2. src/database/sql/fakedb_test.go

    }
    
    func (c *fakeConn) touchMem() {
    	c.line++
    }
    
    func (c *fakeConn) incrStat(v *int) {
    	c.mu.Lock()
    	*v++
    	c.mu.Unlock()
    }
    
    type fakeTx struct {
    	c *fakeConn
    }
    
    type boundCol struct {
    	Column      string
    	Placeholder string
    	Ordinal     int
    }
    
    type fakeStmt struct {
    	memToucher
    	c *fakeConn
    	q string // just for debugging
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 01 12:38:07 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  3. src/database/sql/sql_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(db.freeConn) != 1 {
    		t.Fatalf("expected 1 free conn")
    	}
    	fakeConn := db.freeConn[0].ci.(*fakeConn)
    	if made, closed := fakeConn.stmtsMade, fakeConn.stmtsClosed; made != closed {
    		t.Errorf("statement close mismatch: made %d, closed %d", made, closed)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
Back to top