Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for mock (0.21 sec)

  1. cni/pkg/nodeagent/fakes_test.go

    }
    
    func (f *fakeZtunnel) PodAdded(ctx context.Context, pod *corev1.Pod, netns Netns) error {
    	f.addedPods.Add(1)
    	return f.addError
    }
    
    func (f *fakeZtunnel) Close() error {
    	return nil
    }
    
    // fakeNs is a mock struct for testing
    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. cmd/sts-handlers_test.go

    	}
    
    	// Generate web identity STS token by interacting with OpenID IDP.
    	token, err := MockOpenIDTestUserInteraction(ctx, testAppParams, "******@****.***", "dillon")
    	if err != nil {
    		c.Fatalf("mock user err: %v", err)
    	}
    	// fmt.Printf("TOKEN: %s\n", token)
    
    	webID := cr.STSWebIdentity{
    		Client:      s.TestSuiteCommon.client,
    		STSEndpoint: s.endPoint,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 19:09:19 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  3. cmd/bucket-object-lock.go

    					return ObjectLocked{}
    				}
    
    				if !ret.RetainUntilDate.Before(t) {
    					return ObjectLocked{}
    				}
    				return nil
    			}
    			// https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes
    			// If you try to delete objects protected by governance mode and have s3:BypassGovernanceRetention, the operation will succeed.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  4. internal/event/targetlist.go

    func (list *TargetList) incCurrentSendCalls(id TargetID) {
    	list.statLock.Lock()
    	defer list.statLock.Unlock()
    
    	stats, ok := list.targetStats[id]
    	if !ok {
    		stats = targetStat{}
    	}
    
    	stats.currentSendCalls++
    	list.targetStats[id] = stats
    	return
    }
    
    func (list *TargetList) decCurrentSendCalls(id TargetID) {
    	list.statLock.Lock()
    	defer list.statLock.Unlock()
    
    	stats, ok := list.targetStats[id]
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. cmd/iam-store.go

    type IAMStorageAPI interface {
    	// The role of the read-write lock is to prevent go routines from
    	// concurrently reading and writing the IAM storage. The (r)lock()
    	// functions return the iamCache. The cache can be safely written to
    	// only when returned by `lock()`.
    	lock() *iamCache
    	unlock()
    	rlock() *iamCache
    	runlock()
    	getUsersSysType() UsersSysType
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 74.4K bytes
    - Viewed (2)
  6. internal/grid/muxclient.go

    		if m.cancelFn != nil {
    			m.cancelFn(context.Canceled)
    		}
    		// Wait for senders to release.
    		m.respMu.Lock()
    	}
    
    	defer m.respMu.Unlock()
    	m.closeLocked()
    }
    
    func (m *muxClient) closeLocked() {
    	if m.closed {
    		return
    	}
    	// We hold the lock, so nobody can modify m.respWait while we're closing.
    	if m.respWait != nil {
    		xioutil.SafeClose(m.respWait)
    		m.respWait = nil
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  7. cmd/tier.go

    }
    
    func (t *tierMetrics) logSuccess(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.success++
    	t.requestsCount[tier] = stat
    }
    
    func (t *tierMetrics) logFailure(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.failure++
    	t.requestsCount[tier] = stat
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool-decom.go

    		return err
    	}
    
    	// if no update is needed return right away.
    	if !update {
    		z.poolMetaMutex.Lock()
    		z.poolMeta = meta
    		z.poolMetaMutex.Unlock()
    	} else {
    		newMeta := newPoolMeta(z, meta)
    		if err = newMeta.save(ctx, z.serverPools); err != nil {
    			return err
    		}
    		z.poolMetaMutex.Lock()
    		z.poolMeta = newMeta
    		z.poolMetaMutex.Unlock()
    	}
    
    	pools := meta.returnResumablePools()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 40.4K bytes
    - Viewed (1)
  9. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    func (c *connMgr) addConn(conn *ZtunnelConnection) {
    	log.Debug("ztunnel connected")
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	c.connectionSet[conn] = struct{}{}
    	c.latestConn = conn
    	ztunnelConnected.RecordInt(int64(len(c.connectionSet)))
    }
    
    func (c *connMgr) LatestConn() *ZtunnelConnection {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.latestConn
    }
    
    func (c *connMgr) deleteConn(conn *ZtunnelConnection) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  10. cmd/metacache-server-pool.go

    	var funcReturned bool
    	var funcReturnedMu sync.Mutex
    	defer func() {
    		funcReturnedMu.Lock()
    		funcReturned = true
    		funcReturnedMu.Unlock()
    	}()
    	// Write listing to results and saver.
    	go func() {
    		var returned bool
    		for entry := range inCh {
    			if !returned {
    				funcReturnedMu.Lock()
    				returned = funcReturned
    				funcReturnedMu.Unlock()
    				outCh <- entry
    				if returned {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.8K bytes
    - Viewed (0)
Back to top