Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 179 for mock (0.14 sec)

  1. internal/grid/connection.go

    		}
    		cancel(ErrDisconnected)
    		c.connChange.L.Lock()
    		if atomic.CompareAndSwapUint32((*uint32)(&c.state), StateConnected, StateConnectionError) {
    			c.connChange.Broadcast()
    		}
    		c.disconnected()
    		c.connChange.L.Unlock()
    
    		conn.Close()
    		c.handleMsgWg.Done()
    	}()
    
    	c.connMu.Lock()
    	connPingInterval := c.connPingInterval
    	c.connMu.Unlock()
    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/cachevalue/cache.go

    			go func() {
    				defer t.updating.Unlock()
    				t.update()
    			}()
    		}
    		return v.v, v.e
    	}
    
    	// Get lock. Either we get it or we wait for it.
    	t.updating.Lock()
    	if time.Since(time.UnixMilli(t.lastUpdateMs.Load())) < ttl {
    		// There is a new value, release lock and return it.
    		v = t.valErr.Load()
    		t.updating.Unlock()
    		return v.v, v.e
    	}
    	t.update()
    	v = t.valErr.Load()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. internal/logger/reqinfo.go

    	if r == nil {
    		return nil
    	}
    	r.Lock()
    	defer r.Unlock()
    	r.tags = append(r.tags, KeyVal{key, val})
    	return r
    }
    
    // SetTags - sets key/val to ReqInfo.tags
    func (r *ReqInfo) SetTags(key string, val interface{}) *ReqInfo {
    	if r == nil {
    		return nil
    	}
    	r.Lock()
    	defer r.Unlock()
    	// Search of tag key already exists in tags
    	var updated bool
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  4. cmd/bucket-replication.go

    	}
    
    	// Compare only necessary headers
    	compareKeys := []string{
    		"Expires",
    		"Cache-Control",
    		"Content-Language",
    		"Content-Disposition",
    		"X-Amz-Object-Lock-Mode",
    		"X-Amz-Object-Lock-Retain-Until-Date",
    		"X-Amz-Object-Lock-Legal-Hold",
    		"X-Amz-Website-Redirect-Location",
    		"X-Amz-Meta-",
    	}
    
    	// compare metadata on both maps to see if meta is identical
    	compareMeta1 := make(map[string]string)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  5. cmd/metrics-resource.go

    		}
    		sfx += v
    	}
    
    	return string(name) + "_" + sfx
    }
    
    func updateResourceMetrics(subSys MetricSubsystem, name MetricName, val float64, labels map[string]string, isCumulative bool) {
    	resourceMetricsMapMu.Lock()
    	defer resourceMetricsMapMu.Unlock()
    	subsysMetrics, found := resourceMetricsMap[subSys]
    	if !found {
    		subsysMetrics = ResourceMetrics{}
    	}
    
    	key := getResourceKey(name, labels)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  6. cmd/api-router.go

    }
    
    func setHTTPServer(h *xhttp.Server) {
    	globalObjLayerMutex.Lock()
    	globalHTTPServer = h
    	globalObjLayerMutex.Unlock()
    }
    
    func newConsoleServerFn() *consoleapi.Server {
    	globalObjLayerMutex.RLock()
    	defer globalObjLayerMutex.RUnlock()
    	return globalConsoleSrv
    }
    
    func setConsoleSrv(srv *consoleapi.Server) {
    	globalObjLayerMutex.Lock()
    	globalConsoleSrv = srv
    	globalObjLayerMutex.Unlock()
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 04 18:05:56 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  7. cmd/config.go

    	if err != nil {
    		return err
    	}
    
    	bootstrapTraceMsg("lookup the configuration")
    
    	// Override any values from ENVs.
    	lookupConfigs(srvCfg, objAPI)
    
    	// hold the mutex lock before a new config is assigned.
    	globalServerConfigMu.Lock()
    	globalServerConfig = srvCfg
    	globalServerConfigMu.Unlock()
    
    	return nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Aug 23 10:07:06 GMT 2023
    - 6K bytes
    - Viewed (0)
  8. cmd/batch-rotate.go

    	versionSuspended := globalBucketVersioningSys.PrefixSuspended(srcBucket, srcObject)
    
    	lock := api.NewNSLock(r.Bucket, objInfo.Name)
    	lkctx, err := lock.GetLock(ctx, globalOperationTimeout)
    	if err != nil {
    		return err
    	}
    	ctx = lkctx.Context()
    	defer lock.Unlock(lkctx)
    
    	opts := ObjectOptions{
    		VersionID:        objInfo.VersionID,
    		Versioned:        versioned,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  9. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. cmd/test-utils_test.go

    }
    
    // sets globalObjectAPI to `nil`.
    func resetGlobalObjectAPI() {
    	globalObjLayerMutex.Lock()
    	globalObjectAPI = nil
    	globalObjLayerMutex.Unlock()
    }
    
    // reset the value of the Global server config.
    // set it to `nil`.
    func resetGlobalConfig() {
    	// hold the mutex lock before a new config is assigned.
    	globalServerConfigMu.Lock()
    	// Save the loaded config globally.
    	globalServerConfig = nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
Back to top