Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 146 for do (0.33 sec)

  1. internal/dsync/locker.go

    import "context"
    
    // NetLocker is dsync compatible locker interface.
    type NetLocker interface {
    	// Do read lock for given LockArgs.  It should return
    	// * a boolean to indicate success/failure of the operation
    	// * an error on failure of lock request operation.
    	RLock(ctx context.Context, args LockArgs) (bool, error)
    
    	// Do write lock for given LockArgs. It should return
    	// * a boolean to indicate success/failure of the operation
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  2. cmd/metacache-manager.go

    func (m *metacacheManager) deleteBucketCache(bucket string) {
    	m.init.Do(m.initManager)
    	m.mu.Lock()
    	b, ok := m.buckets[bucket]
    	if !ok {
    		m.mu.Unlock()
    		return
    	}
    	delete(m.buckets, bucket)
    	m.mu.Unlock()
    
    	// Since deletes may take some time we try to do it without
    	// holding lock to m all the time.
    	b.mu.Lock()
    	defer b.mu.Unlock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Oct 25 00:44:15 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  3. cni/pkg/repair/netns.go

    }
    
    func runInHost[T any](f func() (T, error)) (T, error) {
    	var res T
    	ns, err := netns.GetNS(getPidNamespace(1))
    	if err != nil {
    		return res, fmt.Errorf("failed to get host network: %v", err)
    	}
    	err = ns.Do(func(ns netns.NetNS) error {
    		var err error
    		res, err = f()
    		return err
    	})
    	if err != nil {
    		return res, fmt.Errorf("in host network: %v", err)
    	}
    	return res, nil
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Dec 20 22:14:13 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  4. internal/config/cache/cache.go

    	}
    
    	if c.Endpoint == "" {
    		// Endpoint not set, make this a no-op
    		return nil, nil
    	}
    
    	buf, err := r.MarshalMsg(nil)
    	if err != nil {
    		return nil, err
    	}
    
    	// We do not want Gets to take so much time, anything
    	// beyond 250ms we should cut it, remote cache is too
    	// busy already.
    	ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond)
    	defer cancel()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. cmd/erasure-utils.go

    	// Offset and out size cannot be negative.
    	if offset < 0 || length < 0 {
    		return 0, errUnexpected
    	}
    
    	// Do we have enough blocks?
    	if len(enBlocks) < dataBlocks {
    		return 0, reedsolomon.ErrTooFewShards
    	}
    
    	// Do we have enough data?
    	if int64(getDataBlockLen(enBlocks, dataBlocks)) < length {
    		return 0, reedsolomon.ErrShortData
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  6. internal/config/identity/openid/providercfg.go

    	if p.RolePolicy == "" {
    		return ""
    	}
    	return p.roleArn.String()
    }
    
    // UserInfo returns claims for authenticated user from userInfo endpoint.
    //
    // Some OIDC implementations such as GitLab do not support
    // claims as part of the normal oauth2 flow, instead rely
    // on service providers making calls to IDP to fetch additional
    // claims available from the UserInfo endpoint
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. cmd/consolelogger.go

    	// are set.
    	var lastN []log.Info
    	if last > defaultLogBufferCount || last <= 0 {
    		last = defaultLogBufferCount
    	}
    
    	lastN = make([]log.Info, last)
    	sys.RLock()
    	sys.logBuf.Do(func(p interface{}) {
    		if p != nil {
    			lg, ok := p.(log.Info)
    			if ok && lg.SendLog(node, logKind) {
    				lastN[cnt%last] = lg
    				cnt++
    			}
    		}
    	})
    	sys.RUnlock()
    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)
  8. internal/grid/debugmsg_string.go

    // Code generated by "stringer -type=debugMsg debug.go"; DO NOT EDIT.
    
    package grid
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[debugShutdown-0]
    	_ = x[debugKillInbound-1]
    	_ = x[debugKillOutbound-2]
    	_ = x[debugWaitForExit-3]
    	_ = x[debugSetConnPingDuration-4]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 16:43:38 GMT 2024
    - 993 bytes
    - Viewed (0)
  9. internal/bucket/lifecycle/action_string.go

    // Code generated by "stringer -type Action lifecycle.go"; DO NOT EDIT.
    
    package lifecycle
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[NoneAction-0]
    	_ = x[DeleteAction-1]
    	_ = x[DeleteVersionAction-2]
    	_ = x[TransitionAction-3]
    	_ = x[TransitionVersionAction-4]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  10. src/cmd/cgo/godefs.go

    	"strings"
    )
    
    // godefs returns the output for -godefs mode.
    func (p *Package) godefs(f *File, args []string) string {
    	var buf strings.Builder
    
    	fmt.Fprintf(&buf, "// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n")
    	fmt.Fprintf(&buf, "// %s %s\n", filepath.Base(args[0]), strings.Join(args[1:], " "))
    	fmt.Fprintf(&buf, "\n")
    
    	override := make(map[string]string)
    
    	// Allow source file to specify override mappings.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Sep 08 14:33:35 GMT 2022
    - 4.5K bytes
    - Viewed (0)
Back to top