Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 159 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 85.7K bytes
    - Viewed (0)
  2. cmd/lock-rest-server-common.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"errors"
    )
    
    var (
    	errLockConflict       = errors.New("lock conflict")
    	errLockNotInitialized = errors.New("lock not initialized")
    	errLockNotFound       = errors.New("lock not found")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 973 bytes
    - Viewed (0)
  3. cmd/data-scanner_test.go

    		ilm       lifecycle.Lifecycle
    		retention lock.Retention
    		obj       ObjectInfo
    		want      lifecycle.Action
    	}{
    		{
    			// with object locking
    			ilm:       *deleteAllLc,
    			retention: lock.Retention{LockEnabled: true},
    			obj:       obj,
    			want:      lifecycle.NoneAction,
    		},
    		{
    			// without object locking
    			ilm:       *deleteAllLc,
    			retention: lock.Retention{},
    			obj:       obj,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 11:18:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  4. cmd/erasure-server-pool-rebalance.go

    			ok = true
    		}
    	}
    	if ok {
    		lock := z.serverPools[0].NewNSLock(minioMetaBucket, rebalMetaName)
    		lkCtx, err := lock.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			rebalanceLogIf(ctx, fmt.Errorf("failed to acquire write lock on %s/%s: %w", minioMetaBucket, rebalMetaName, err))
    			return err
    		}
    		defer lock.Unlock(lkCtx)
    
    		ctx = lkCtx.Context()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  5. cmd/bucket-targets.go

    func (sys *BucketTargetSys) markOffline(ep *url.URL) {
    	sys.hMutex.Lock()
    	defer sys.hMutex.Unlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		h.Online = false
    		sys.hc[ep.Host] = h
    	}
    }
    
    func (sys *BucketTargetSys) initHC(ep *url.URL) {
    	sys.hMutex.Lock()
    	sys.hc[ep.Host] = epHealth{
    		Endpoint: ep.Host,
    		Scheme:   ep.Scheme,
    		Online:   true,
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  6. cmd/untar.go

    	r  io.Reader
    	mu sync.Mutex
    }
    
    func (d *disconnectReader) Read(p []byte) (n int, err error) {
    	d.mu.Lock()
    	defer d.mu.Unlock()
    	if d.r != nil {
    		return d.r.Read(p)
    	}
    	return 0, errors.New("reader closed")
    }
    
    func (d *disconnectReader) Close() error {
    	d.mu.Lock()
    	d.r = nil
    	d.mu.Unlock()
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. internal/once/init.go

    // if it is not successful yet.
    func (l *Init) Do(f func() error) error {
    	if atomic.LoadUint32(&l.done) == 0 {
    		return l.do(f)
    	}
    	return nil
    }
    
    func (l *Init) do(f func() error) error {
    	l.m.Lock()
    	defer l.m.Unlock()
    	if atomic.LoadUint32(&l.done) == 0 {
    		if err := f(); err != nil {
    			return err
    		}
    		// Mark as done only when f() is successful
    		atomic.StoreUint32(&l.done, 1)
    	}
    	return nil
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 09 04:20:31 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  8. internal/logger/targets.go

    // AddSystemTarget adds a new logger target to the
    // list of enabled loggers
    func AddSystemTarget(ctx context.Context, t Target) error {
    	if err := t.Init(ctx); err != nil {
    		return err
    	}
    
    	swapSystemMuRW.Lock()
    	defer swapSystemMuRW.Unlock()
    
    	if consoleTgt == nil {
    		if t.Type() == types.TargetConsole {
    			consoleTgt = t
    		}
    	}
    	updated := append(make([]Target, 0, len(systemTargets)+1), systemTargets...)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 02 22:56:14 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. cmd/globals.go

    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthNPlugin
    }
    
    func newGlobalAuthZPluginFn() *polplugin.AuthZPlugin {
    	globalAuthPluginMutex.Lock()
    	defer globalAuthPluginMutex.Unlock()
    	return globalAuthZPlugin
    }
    
    func setGlobalAuthNPlugin(authn *idplugin.AuthNPlugin) {
    	globalAuthPluginMutex.Lock()
    	globalAuthNPlugin = authn
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. cmd/license-update.go

    	go func() {
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		// Leader node (that successfully acquires the lock inside licenceUpdaterLoop)
    		// will keep performing the license update. If the leader goes down for some
    		// reason, the lock will be released and another node will acquire it and
    		// take over because of this loop.
    		for {
    			licenceUpdaterLoop(ctx, objAPI)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.3K bytes
    - Viewed (0)
Back to top