Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for makeConn (0.15 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. tests/fuzz/autoregistration_controller_fuzzer.go

    	"istio.io/istio/pkg/keepalive"
    )
    
    type fakeConn struct {
    	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)
    }
    
    func (f *fakeConn) Proxy() *model.Proxy {
    	return f.proxy
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Sep 19 20:41:55 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. 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)
  4. src/go/parser/testdata/issue3106.src

    // license that can be found in the LICENSE file.
    
    // Test case for go.dev/issue/3106: Better synchronization of
    // parser after certain syntax errors.
    
    package main
    
    func f() {
    	var m Mutex
    	c := MakeCond(&m)
    	percent := 0
    	const step = 10
    	for i := 0; i < 5; i++ {
    		go func() {
    			for {
    				// Emulates some useful work.
    				time.Sleep(1e8)
    				m.Lock()
    				defer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 829 bytes
    - Viewed (0)
  5. 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)
  6. staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go

    	r.called = true
    	r.err = err
    }
    
    type fakeConn struct {
    	err error // The error to return when io is performed over the connection.
    }
    
    func (f *fakeConn) Read([]byte) (int, error)        { return 0, f.err }
    func (f *fakeConn) Write([]byte) (int, error)       { return 0, f.err }
    func (f *fakeConn) Close() error                    { return nil }
    func (fakeConn) LocalAddr() net.Addr                { return nil }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 39.4K bytes
    - Viewed (0)
Back to top