Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 121 for mock (0.16 sec)

  1. internal/config/storageclass/storage-class.go

    			Value:         "",
    			HiddenIfEmpty: true,
    		},
    	}
    )
    
    // StorageClass - holds storage class information
    type StorageClass struct {
    	Parity int
    }
    
    // ConfigLock is a global lock for storage-class config
    var ConfigLock sync.RWMutex
    
    // Config storage class configuration
    type Config struct {
    	Standard    StorageClass `json:"standard"`
    	RRS         StorageClass `json:"rrs"`
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  2. cmd/bucket-versioning-handler.go

    	if rcfg, _ := globalBucketObjectLockSys.Get(bucket); rcfg.LockEnabled && (v.Suspended() || v.PrefixesExcluded()) {
    		writeErrorResponse(ctx, w, APIError{
    			Code:           "InvalidBucketState",
    			Description:    "An Object Lock configuration is present on this bucket, versioning cannot be suspended.",
    			HTTPStatusCode: http.StatusBadRequest,
    		}, r.URL)
    		return
    	}
    	if rc, _ := getReplicationConfig(ctx, bucket); rc != nil && v.Suspended() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 5K bytes
    - Viewed (0)
  3. internal/config/heal/heal.go

    func (opts Config) GetWorkers() int {
    	configMutex.RLock()
    	defer configMutex.RUnlock()
    	return opts.DriveWorkers
    }
    
    // Update updates opts with nopts
    func (opts *Config) Update(nopts Config) {
    	configMutex.Lock()
    	defer configMutex.Unlock()
    
    	opts.Bitrot = nopts.Bitrot
    	opts.IOCount = nopts.IOCount
    	opts.Sleep = nopts.Sleep
    	opts.DriveWorkers = nopts.DriveWorkers
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:10:30 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  4. cmd/consolelogger.go

    		lg = log.Info{Entry: e, NodeName: sys.nodeName}
    	case string:
    		lg = log.Info{ConsoleMsg: e, NodeName: sys.nodeName}
    	}
    	atomic.AddInt64(&sys.totalMessages, 1)
    
    	sys.pubsub.Publish(lg)
    	sys.Lock()
    	// add log to ring buffer
    	sys.logBuf.Value = lg
    	sys.logBuf = sys.logBuf.Next()
    	sys.Unlock()
    	err := sys.console.Send(entry)
    	if err != nil {
    		atomic.AddInt64(&sys.failedMessages, 1)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  5. chainable_api.go

    // advanced techniques like specifying lock strength and optimizer hints. See the
    // [docs] for more depth.
    //
    //	// add a simple limit clause
    //	db.Clauses(clause.Limit{Limit: 1}).Find(&User{})
    //	// tell the optimizer to use the `idx_user_name` index
    //	db.Clauses(hints.UseIndex("idx_user_name")).Find(&User{})
    //	// specify the lock strength to UPDATE
    //	db.Clauses(clause.Locking{Strength: "UPDATE"}).Find(&users)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  6. cmd/site-replication.go

    }
    
    func (c *SiteReplicationSys) loadFromDisk(ctx context.Context, objAPI ObjectLayer) error {
    	buf, err := readConfig(ctx, objAPI, getSRStateFilePath())
    	if err != nil {
    		if errors.Is(err, errConfigNotFound) {
    			c.Lock()
    			defer c.Unlock()
    			c.state = srState{}
    			c.enabled = false
    		}
    		return err
    	}
    
    	// attempt to read just the version key in the state file to ensure we
    	// are reading a compatible version.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  7. operator/cmd/mesh/manifest_shared_test.go

    		}
    	} else if err != nil {
    		return err
    	}
    	obj.SetResourceVersion(check.GetResourceVersion())
    	return clnt.Update(ctx, obj)
    }}
    
    // recreateSimpleTestEnv mocks fake kube api server which relies on a simple object tracker
    func recreateSimpleTestEnv() {
    	log.Infof("Creating simple test environment\n")
    	helmreconciler.TestMode = true
    	s := scheme.Scheme
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Feb 20 22:39:28 GMT 2024
    - 11.7K bytes
    - Viewed (1)
  8. cmd/object-api-utils.go

    // Eliminate non-compressible objects by extensions/content-types.
    func isCompressible(header http.Header, object string) bool {
    	globalCompressConfigMu.Lock()
    	cfg := globalCompressConfig
    	globalCompressConfigMu.Unlock()
    
    	return !excludeForCompression(header, object, cfg)
    }
    
    // Eliminate the non-compressible objects.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  9. cmd/peer-rest-server.go

    	listenRPC     = grid.NewStream[*grid.URLValues, grid.NoPayload, *grid.Bytes](grid.HandlerListen, grid.NewURLValues, nil, grid.NewBytes).WithOutCapacity(100)
    )
    
    // GetLocksHandler - returns list of lock from the server.
    func (s *peerRESTServer) GetLocksHandler(_ *grid.MSS) (*localLockMap, *grid.RemoteErr) {
    	res := globalLockServer.DupLockMap()
    	return &res, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  10. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
Back to top