Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 578 for Chan (0.29 sec)

  1. cmd/erasure.go

    // Updates are sent on a regular basis and the caller *must* consume them.
    func (er erasureObjects) nsScanner(ctx context.Context, buckets []BucketInfo, wantCycle uint32, updates chan<- dataUsageCache, healScanMode madmin.HealScanMode) error {
    	if len(buckets) == 0 {
    		return nil
    	}
    
    	// Collect disks we can use.
    	disks, healing := er.getOnlineDisksWithHealing(false)
    	if len(disks) == 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 10:02:39 GMT 2024
    - 16K bytes
    - Viewed (1)
  2. cmd/perf-tests.go

    	defer n.Unlock()
    	n.RX = 0
    	n.RXSample = 0
    	n.lastToConnect = time.Time{}
    	n.firstToDisconnect = time.Time{}
    }
    
    // Reader to read random data.
    type netperfReader struct {
    	n   uint64
    	eof chan struct{}
    	buf []byte
    }
    
    func (m *netperfReader) Read(b []byte) (int, error) {
    	select {
    	case <-m.eof:
    		return 0, io.EOF
    	default:
    	}
    	n := copy(b, m.buf)
    	atomic.AddUint64(&m.n, uint64(n))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  3. cmd/metrics.go

    	desc *prometheus.Desc
    }
    
    // Describe sends the super-set of all possible descriptors of metrics
    func (c *minioCollector) Describe(ch chan<- *prometheus.Desc) {
    	ch <- c.desc
    }
    
    // Collect is called by the Prometheus registry when collecting metrics.
    func (c *minioCollector) Collect(ch chan<- prometheus.Metric) {
    	// Expose MinIO's version information
    	minioVersionInfo.WithLabelValues(Version, CommitID).Set(1.0)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  4. cmd/bucket-lifecycle.go

    	es := &expiryState{
    		ctx:    ctx,
    		objAPI: objAPI,
    	}
    	workers := make([]chan expiryOp, 0, n)
    	es.workers.Store(&workers)
    	es.ResizeWorkers(n)
    	return es
    }
    
    func (es *expiryState) getWorkerCh(h uint64) chan<- expiryOp {
    	w := es.workers.Load()
    	if w == nil || len(*w) == 0 {
    		return nil
    	}
    	workers := *w
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. cmd/storage-rest-server.go

    	if !s.checkID(params.DiskID) {
    		return grid.NewRemoteErr(errDiskNotFound)
    	}
    	if params.Cache == nil {
    		return grid.NewRemoteErrString("NSScannerHandler: provided cache is nil")
    	}
    
    	// Collect updates, stream them before the full cache is sent.
    	updates := make(chan dataUsageEntry, 1)
    	var wg sync.WaitGroup
    	wg.Add(1)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 44.3K bytes
    - Viewed (0)
  6. internal/dsync/dsync_test.go

    // Borrowed from mutex_test.go
    func HammerMutex(m *DRWMutex, loops int, cdone chan bool) {
    	for i := 0; i < loops; i++ {
    		m.Lock(id, source)
    		m.Unlock(context.Background())
    	}
    	cdone <- true
    }
    
    // Borrowed from mutex_test.go
    func TestMutex(t *testing.T) {
    	loops := 200
    	if testing.Short() {
    		loops = 5
    	}
    	c := make(chan bool)
    	m := NewDRWMutex(ds, "test")
    	for i := 0; i < 10; i++ {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  7. internal/logger/target/http/http.go

    	name := newTgt.Name()
    
    	currentBuff, ok := logChBuffers[name]
    	if !ok {
    		logChBuffers[name] = make(chan interface{}, requiredCap)
    		currentCap = requiredCap
    	} else {
    		currentCap = cap(currentBuff)
    		requiredCap += len(currentBuff)
    	}
    
    	if requiredCap > currentCap {
    		logChBuffers[name] = make(chan interface{}, requiredCap)
    
    		if len(currentBuff) > 0 {
    		drain:
    			for {
    				select {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  8. cmd/batch-expire.go

    //           value: image/* # match objects with 'content-type', all values starting with 'image/'
    //       size:
    //         lessThan: "10MiB" # match objects with size less than this value (e.g. 10MiB)
    //         greaterThan: 1MiB # match objects with size greater than this value (e.g. 1MiB)
    //       purge:
    //           # retainVersions: 0 # (default) delete all versions of the object. This option is the fastest.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 21K bytes
    - Viewed (1)
  9. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    type updateRequest struct {
    	Update []byte
    	Fd     *int
    
    	Resp chan updateResponse
    }
    
    type ZtunnelConnection struct {
    	u       *net.UnixConn
    	Updates chan updateRequest
    }
    
    func newZtunnelConnection(u *net.UnixConn) *ZtunnelConnection {
    	return &ZtunnelConnection{u: u, Updates: make(chan updateRequest, 100)}
    }
    
    func (z *ZtunnelConnection) Close() {
    	z.u.Close()
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  10. internal/grid/benchmark_test.go

    		// Register a single handler which echos the payload.
    		errFatal(remote.RegisterStreamingHandler(handlerTest, StreamHandler{
    			// Send 10x response.
    			Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, out chan<- []byte) *RemoteErr {
    				for i := 0; i < responses; i++ {
    					toSend := GetByteBuffer()[:0]
    					toSend = append(toSend, byte(i))
    					toSend = append(toSend, payload...)
    					select {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
Back to top