Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for mock (0.17 sec)

  1. 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)
  2. 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)
  3. cmd/xl-storage.go

    		s.RUnlock()
    		return diskID, nil
    	}
    	s.RUnlock()
    
    	fi, err := s.checkFormatJSON()
    	if err != nil {
    		return "", err
    	}
    
    	if xioutil.SameFile(fi, fileInfo) && diskID != "" {
    		s.Lock()
    		// If the file has not changed, just return the cached diskID information.
    		s.formatLastCheck = time.Now()
    		s.Unlock()
    		return diskID, nil
    	}
    
    	b, err := os.ReadFile(s.formatFile)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 82.4K bytes
    - Viewed (0)
  4. cmd/object-api-multipart_test.go

    	}
    
    	z := obj.(*erasureServerPools)
    	er := z.serverPools[0].sets[0]
    
    	erasureDisks := er.getDisks()
    	ridx := rand.Intn(len(erasureDisks))
    
    	z.serverPools[0].erasureDisksMu.Lock()
    	er.getDisks = func() []StorageAPI {
    		erasureDisks[ridx] = newNaughtyDisk(erasureDisks[ridx], nil, errFaultyDisk)
    		return erasureDisks
    	}
    	z.serverPools[0].erasureDisksMu.Unlock()
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  5. cmd/batch-handlers.go

    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	ri.Object = info.Name
    	ri.countItem(info.Size, info.DeleteMarker, success)
    }
    
    func (ri *batchJobInfo) trackCurrentBucketBatch(bucket string, batch []ObjectInfo) {
    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	for i := range batch {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 14:11:38 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  6. cmd/admin-handlers.go

    	thisAddr, err := xnet.ParseHost(globalLocalNodeName)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	globalProfilerMu.Lock()
    	defer globalProfilerMu.Unlock()
    
    	if globalProfiler == nil {
    		globalProfiler = make(map[string]minioProfiler, 10)
    	}
    
    	// Stop profiler of all types if already running
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
  7. cmd/bucket-handlers.go

    		UserAgent:    r.UserAgent(),
    		Host:         handlers.GetSourceIP(r),
    	})
    }
    
    // PutBucketObjectLockConfigHandler - PUT Bucket object lock configuration.
    // ----------
    // Places an Object Lock configuration on the specified bucket. The rule
    // specified in the Object Lock configuration will be applied by default
    // to every new object placed in the specified bucket.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 61.6K bytes
    - Viewed (0)
  8. cmd/erasure-server-pool.go

    	defer func() {
    		if unlockOnDefer {
    			nsUnlocker()
    		}
    	}()
    
    	// Acquire lock
    	if !opts.NoLock {
    		lock := z.NewNSLock(bucket, object)
    		lkctx, err := lock.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		ctx = lkctx.Context()
    		nsUnlocker = func() { lock.RUnlock(lkctx) }
    		unlockOnDefer = true
    	}
    
    	checkPrecondFn := opts.CheckPrecondFn
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 77.8K bytes
    - Viewed (0)
  9. cmd/erasure-object.go

    			nsUnlocker()
    		}
    	}()
    
    	// Acquire lock
    	if !opts.NoLock {
    		lock := er.NewNSLock(bucket, object)
    		lkctx, err := lock.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		ctx = lkctx.Context()
    
    		// Release lock when the metadata is verified, and reader
    		// is ready to be read.
    		//
    		// This is possible to be lock free because
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 76.3K bytes
    - Viewed (2)
  10. cmd/api-errors.go

    	ErrObjectLockConfigurationNotFound: {
    		Code:           "ObjectLockConfigurationNotFoundError",
    		Description:    "Object Lock configuration does not exist for this bucket",
    		HTTPStatusCode: http.StatusNotFound,
    	},
    	ErrObjectLockConfigurationNotAllowed: {
    		Code:           "InvalidBucketState",
    		Description:    "Object Lock configuration cannot be enabled on existing buckets",
    		HTTPStatusCode: http.StatusConflict,
    	},
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 06 05:26:02 GMT 2024
    - 90.2K bytes
    - Viewed (6)
Back to top