Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 38 for SafeClose (0.11 sec)

  1. cmd/sftp-server-driver.go

    			return clnt.RemoveBucket(cctx, bucket)
    		}
    
    		objectsCh := make(chan minio.ObjectInfo)
    
    		// Send object names that are needed to be removed to objectsCh
    		go func() {
    			defer xioutil.SafeClose(objectsCh)
    			opts := minio.ListObjectsOptions{
    				Prefix:    prefix,
    				Recursive: true,
    			}
    			for object := range clnt.ListObjects(cctx, bucket, opts) {
    				if object.Err != nil {
    					return
    				}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. cmd/bucket-replication.go

    		go p.AddLargeWorker(input, &p.activeLrgWorkers)
    	}
    	for len(p.lrgworkers) > n {
    		worker := p.lrgworkers[len(p.lrgworkers)-1]
    		p.lrgworkers = p.lrgworkers[:len(p.lrgworkers)-1]
    		xioutil.SafeClose(worker)
    	}
    }
    
    // ActiveWorkers returns the number of active workers handling replication traffic.
    func (p *ReplicationPool) ActiveWorkers() int {
    	return int(atomic.LoadInt32(&p.activeWorkers))
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 06:49:55 UTC 2024
    - 116.1K bytes
    - Viewed (0)
  3. cmd/metacache-walk.go

    	w := newMetacacheWriter(wr, 16<<10)
    	w.reuseBlocks = true // We are not sharing results, so reuse buffers.
    	defer w.Close()
    	out, err := w.stream()
    	if err != nil {
    		return err
    	}
    	defer xioutil.SafeClose(out)
    	var objsReturned int
    
    	objReturned := func(metadata []byte) {
    		if opts.Limit <= 0 {
    			return
    		}
    		if m, _, _ := isIndexedMetaV2(metadata); m != nil && !m.AllHidden(true) {
    			objsReturned++
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  4. cmd/notification.go

    						return
    					}
    				case <-ctx.Done():
    					return
    				}
    			}
    		}(ctx, peerChannels[index], &wg)
    	}
    	go func(wg *sync.WaitGroup, ch chan MetricV2) {
    		wg.Wait()
    		xioutil.SafeClose(ch)
    	}(&wg, ch)
    	return ch
    }
    
    // GetBucketMetrics - gets the cluster level bucket metrics from all nodes excluding self.
    func (sys *NotificationSys) GetBucketMetrics(ctx context.Context) <-chan MetricV2 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 46.2K bytes
    - Viewed (0)
  5. cmd/metacache-stream.go

    // The context allows the operation to be canceled.
    func (r *metacacheReader) readAll(ctx context.Context, dst chan<- metaCacheEntry) error {
    	r.checkInit()
    	if r.err != nil {
    		return r.err
    	}
    	defer xioutil.SafeClose(dst)
    	if r.current.name != "" {
    		select {
    		case <-ctx.Done():
    			r.err = ctx.Err()
    			return ctx.Err()
    		case dst <- r.current:
    		}
    		r.current.name = ""
    		r.current.metadata = nil
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 04 12:04:40 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  6. internal/logger/target/http/http.go

    	h.wg.Wait()
    
    	// Set logch to nil and close it.
    	// This will block all Send operations,
    	// and finish the existing ones.
    	// All future ones will be discarded.
    	h.logChMu.Lock()
    	xioutil.SafeClose(h.logCh)
    	h.logCh = nil
    	h.logChMu.Unlock()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 11 22:20:42 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  7. cmd/iam-object-store.go

    func listIAMConfigItems(ctx context.Context, objAPI ObjectLayer, pathPrefix string) <-chan itemOrErr[string] {
    	ch := make(chan itemOrErr[string])
    
    	go func() {
    		defer xioutil.SafeClose(ch)
    
    		// Allocate new results channel to receive ObjectInfo.
    		objInfoCh := make(chan itemOrErr[ObjectInfo])
    
    		if err := objAPI.Walk(ctx, minioMetaBucket, pathPrefix, objInfoCh, WalkOptions{}); err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  8. cmd/metacache-entries.go

    // otherwise the function will return nil.
    func mergeEntryChannels(ctx context.Context, in []chan metaCacheEntry, out chan<- metaCacheEntry, readQuorum int) error {
    	defer xioutil.SafeClose(out)
    	top := make([]*metaCacheEntry, len(in))
    	nDone := 0
    	ctxDone := ctx.Done()
    
    	// Use simpler forwarder.
    	if len(in) == 1 {
    		for {
    			select {
    			case <-ctxDone:
    				return ctx.Err()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  9. cmd/admin-heal-ops.go

    // has to wait until a safe point is reached, such as between scanning
    // two objects.
    func (h *healSequence) traverseAndHeal(objAPI ObjectLayer) {
    	h.traverseAndHealDoneCh <- h.healItems(objAPI)
    	xioutil.SafeClose(h.traverseAndHealDoneCh)
    }
    
    // healMinioSysMeta - heals all files under a given meta prefix, returns a function
    // which in-turn heals the respective meta directory path and any files in int.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  10. cmd/admin-handlers.go

    		for _, drive := range drives {
    			drive.Endpoint = anonAddr(drive.Endpoint)
    			anonDrives = append(anonDrives, drive)
    		}
    		return anonDrives
    	}
    
    	go func() {
    		defer xioutil.SafeClose(healthInfoCh)
    
    		partialWrite(healthInfo) // Write first message with only version and deployment id populated
    		getAndWritePlatformInfo()
    		getAndWriteCPUs()
    		getAndWritePartitions()
    		getAndWriteNetInfo()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
Back to top