Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 136 for atomic (0.52 sec)

  1. internal/pubsub/pubsub.go

    			}
    		}
    		atomic.StoreUint64(&ps.types, uint64(remainTypes))
    		atomic.AddInt32(&ps.numSubscribers, -1)
    	}()
    
    	return nil
    }
    
    // SubscribeJSON - Adds a subscriber to pubsub system and returns results with JSON encoding.
    func (ps *PubSub[T, M]) SubscribeJSON(mask M, subCh chan<- []byte, doneCh <-chan struct{}, filter func(entry T) bool, wg *sync.WaitGroup) error {
    	totalSubs := atomic.AddInt32(&ps.numSubscribers, 1)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. cmd/bucket-replication-metrics.go

    func (p *ProxyMetric) add(p2 ProxyMetric) {
    	atomic.AddUint64(&p.GetTotal, p2.GetTotal)
    	atomic.AddUint64(&p.HeadTotal, p2.HeadTotal)
    	atomic.AddUint64(&p.GetTagTotal, p2.GetTagTotal)
    	atomic.AddUint64(&p.PutTagTotal, p2.PutTagTotal)
    	atomic.AddUint64(&p.RmvTagTotal, p2.RmvTagTotal)
    	atomic.AddUint64(&p.GetFailedTotal, p2.GetFailedTotal)
    	atomic.AddUint64(&p.HeadFailedTotal, p2.HeadFailedTotal)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  3. cmd/http-stats.go

    	serverStats := ServerHTTPStats{}
    	serverStats.S3RequestsIncoming = atomic.SwapUint64(&st.s3RequestsIncoming, 0)
    	serverStats.S3RequestsInQueue = atomic.LoadInt32(&st.s3RequestsInQueue)
    	serverStats.TotalS3RejectedAuth = atomic.LoadUint64(&st.rejectedRequestsAuth)
    	serverStats.TotalS3RejectedTime = atomic.LoadUint64(&st.rejectedRequestsTime)
    	serverStats.TotalS3RejectedHeader = atomic.LoadUint64(&st.rejectedRequestsHeader)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  4. internal/logger/target/http/http.go

    func (h *Target) IsOnline(ctx context.Context) bool {
    	return atomic.LoadInt32(&h.status) == statusOnline
    }
    
    // Stats returns the target statistics.
    func (h *Target) Stats() types.TargetStats {
    	h.logChMu.RLock()
    	queueLength := len(h.logCh)
    	h.logChMu.RUnlock()
    	stats := types.TargetStats{
    		TotalMessages:  atomic.LoadInt64(&h.totalMessages),
    		FailedMessages: atomic.LoadInt64(&h.failedMessages),
    		QueueLength:    queueLength,
    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)
  5. cmd/dynamic-timeouts.go

    		// We are hitting the timeout too often, so increase the timeout by 25%
    		timeout := atomic.LoadInt64(&dt.timeout) * 125 / 100
    
    		// Set upper cap.
    		if timeout > int64(maxDynamicTimeout) {
    			timeout = int64(maxDynamicTimeout)
    		}
    		// Safety, shouldn't happen
    		if timeout < dt.minimum {
    			timeout = dt.minimum
    		}
    		atomic.StoreInt64(&dt.timeout, timeout)
    	} else if failPct < dynamicTimeoutDecreaseThresholdPct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  6. cmd/data-scanner-metric.go

    		duration := time.Since(startTime)
    
    		atomic.AddUint64(&p.operations[s], 1)
    		if s < scannerMetricLastRealtime {
    			p.latency[s].addSize(duration, int64(sz))
    		}
    	}
    }
    
    // incTime will increment time on metric s with a specific duration.
    // Use for s < scannerMetricLastRealtime
    func (p *scannerMetrics) incTime(s scannerMetric, d time.Duration) {
    	atomic.AddUint64(&p.operations[s], 1)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 25 05:15:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  7. internal/config/lambda/target/lazyinit.go

    package target
    
    import (
    	"sync"
    	"sync/atomic"
    )
    
    // Inspired from Golang sync.Once but it is only marked
    // initialized when the provided function returns nil.
    
    type lazyInit struct {
    	done uint32
    	m    sync.Mutex
    }
    
    func (l *lazyInit) Do(f func() error) error {
    	if atomic.LoadUint32(&l.done) == 0 {
    		return l.doSlow(f)
    	}
    	return nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  8. internal/config/lambda/target/webhook.go

    		ID:             target.id,
    		ActiveRequests: atomic.LoadInt64(&target.activeRequests),
    		TotalRequests:  atomic.LoadInt64(&target.totalRequests),
    		FailedRequests: atomic.LoadInt64(&target.failedRequests),
    	}
    }
    
    // Send - sends an event to the webhook.
    func (target *WebhookTarget) Send(eventData event.Event) (resp *http.Response, err error) {
    	atomic.AddInt64(&target.activeRequests, 1)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 17 20:02:26 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  9. internal/s3select/simdj/reader.go

    	r      io.Reader
    }
    
    func (s *safeCloser) Read(p []byte) (n int, err error) {
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	n, err = s.r.Read(p)
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	return n, err
    }
    
    func (s *safeCloser) Close() error {
    	atomic.CompareAndSwapUint32(&s.closed, 0, 1)
    	return nil
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. cmd/perf-tests.go

    }
    
    func (n *netPerfRX) Connect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections++
    	atomic.StoreUint64(&n.RX, 0)
    	n.lastToConnect = time.Now()
    }
    
    func (n *netPerfRX) Disconnect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections--
    	if n.firstToDisconnect.IsZero() {
    		n.RXSample = atomic.LoadUint64(&n.RX)
    		n.firstToDisconnect = time.Now()
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
Back to top