- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 640 for defer (0.04 sec)
-
internal/event/targetlist.go
continue } wg.Add(1) go func(id TargetID, target Target) { list.currentSendCalls.Add(1) list.incCurrentSendCalls(id) list.incTotalEvents(id) defer list.decCurrentSendCalls(id) defer list.currentSendCalls.Add(-1) defer wg.Done() if err := target.Save(event); err != nil { list.eventsErrorsTotal.Add(1) list.incFailedEvents(id) reqInfo := &logger.ReqInfo{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/handler-api.go
} } } func (t *apiConfig) odirectEnabled() bool { t.mu.RLock() defer t.mu.RUnlock() return t.enableODirect } func (t *apiConfig) shouldGzipObjects() bool { t.mu.RLock() defer t.mu.RUnlock() return t.gzipObjects } func (t *apiConfig) permitRootAccess() bool { t.mu.RLock() defer t.mu.RUnlock() return t.rootAccess }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 17:07:10 UTC 2024 - 10.4K bytes - Viewed (0) -
cmd/site-replication-utils.go
sm.resyncStatus[rs.ResyncID] = rs } sm.Unlock() } return nil } func (sm *siteResyncMetrics) report(dID string) *madmin.SiteResyncMetrics { sm.RLock() defer sm.RUnlock() rst, ok := sm.peerResyncMap[dID] if !ok { return nil } rs, ok := sm.resyncStatus[rst.resyncID] if !ok { return nil } m := madmin.SiteResyncMetrics{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 8.9K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[I]) Add(item I) error { b.Lock() defer b.Unlock() if b.isFull() { if b.store == nil { return ErrBatchFull } // commit batch to store if err := b.commit(); err != nil { return err } } b.items = append(b.items, item) return nil } // Len returns the no of items in the batch func (b *Batch[_]) Len() int { b.Lock() defer b.Unlock() return len(b.items) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 2.9K bytes - Viewed (0) -
internal/pubsub/pubsub_test.go
ch1 := make(chan Maskable, 1) ch2 := make(chan Maskable, 1) doneCh := make(chan struct{}) defer close(doneCh) if err := ps.Subscribe(MaskAll, ch1, doneCh, nil); err != nil { t.Fatalf("unexpected error: %v", err) } if err := ps.Subscribe(MaskAll, ch2, doneCh, nil); err != nil { t.Fatalf("unexpected error: %v", err) } ps.Lock() defer ps.Unlock() if len(ps.subs) != 2 || ps.NumSubscribers(MaskAll) != 2 || ps.Subscribers() != 2 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
return false, err } return target.isActive() } func (target *ElasticsearchTarget) isActive() (bool, error) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() err := target.checkAndInitClient(ctx) if err != nil { return false, err } return target.client.ping(ctx, target.args) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 15K bytes - Viewed (0) -
internal/logger/reqinfo.go
func (r *ReqInfo) AppendTags(key, val string) *ReqInfo { if r == nil { return nil } r.Lock() defer r.Unlock() r.tags = append(r.tags, KeyVal{key, val}) return r } // SetTags - sets key/val to ReqInfo.tags func (r *ReqInfo) SetTags(key, val string) *ReqInfo { if r == nil { return nil } r.Lock() defer r.Unlock() // Search of tag key already exists in tags var updated bool for _, tag := range r.tags {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/grid/muxclient.go
// respHandler func (m *muxClient) handleOneWayStream(respHandler chan<- Response, respServer <-chan Response) { if debugPrint { start := time.Now() defer func() { fmt.Println("Mux", m.MuxID, "Request took", time.Since(start).Round(time.Millisecond)) }() } defer func() { // addErrorNonBlockingClose will close the response channel // - maybe async, so we shouldn't do it here. if m.respErr.Load() == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.9K bytes - Viewed (0) -
cmd/prepare-storage.go
return func(endpoint Endpoint, err error, once bool) { reqInfo := (&logger.ReqInfo{}).AppendTags("endpoint", endpoint.String()) ctx := logger.SetReqInfo(GlobalContext, reqInfo) mutex.Lock() defer mutex.Unlock() m, ok := printOnce[endpoint] if !ok { m = make(map[string]int) printOnce[endpoint] = m if once { m[err.Error()]++ peersLogAlwaysIf(ctx, err) return } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 11.1K bytes - Viewed (1) -
cmd/etcd.go
timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout) defer cancel() _, err := client.Delete(timeoutCtx, key) etcdLogIf(ctx, err) return etcdErrToErr(err, client.Endpoints()) } func readKeyEtcd(ctx context.Context, client *etcd.Client, key string) ([]byte, error) { timeoutCtx, cancel := context.WithTimeout(ctx, defaultContextTimeout) defer cancel() resp, err := client.Get(timeoutCtx, key) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 2.9K bytes - Viewed (0)