- Sort Score
- Result 10 results
- Languages All
Results 201 - 210 of 640 for defer (0.03 sec)
-
cmd/mrf.go
func (m *mrfState) addPartialOp(op PartialOperation) { if m == nil { return } if atomic.LoadInt32(&m.closed) == 1 { return } m.wg.Add(1) defer m.wg.Done() if atomic.LoadInt32(&m.closing) == 1 { return } select { case m.opCh <- op: default: } } // Do not accept new MRF operations anymore and start to save
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:26:05 UTC 2024 - 6.5K bytes - Viewed (0) -
docs/auditlog/auditlog-echo.go
"net/http" ) var port int func init() { flag.IntVar(&port, "port", 8080, "Port to listen on") } func mainHandler(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) defer r.Body.Close() if err != nil { log.Printf("Error reading request body: %v", err) w.WriteHeader(http.StatusBadRequest) return } log.Printf(">>> %s %s\n", r.Method, r.URL.Path) var out bytes.Buffer
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 1.5K bytes - Viewed (0) -
internal/http/close.go
// Drain any remaining Body and then close the connection. // Without this closing connection would disallow re-using // the same connection for future uses. // - http://stackoverflow.com/a/17961593/4465767 defer respBody.Close() xioutil.DiscardReader(respBody) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 1.7K bytes - Viewed (0) -
cmd/os_windows.go
data := &syscall.Win32finddata{} handle, err := syscall.FindFirstFile(globAllP, data) if err != nil { if err = syscallErrToFileErr(dirPath, err); err == errFileNotFound { return nil } return err } defer syscall.FindClose(handle) for ; ; err = syscall.FindNextFile(handle, data) { if err != nil { if err == syscall.ERROR_NO_MORE_FILES { break } else { if isSysErrPathNotFound(err) { return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Oct 18 18:08:15 UTC 2023 - 5.1K bytes - Viewed (0) -
cmd/object-handlers.go
// also specify a data serialization format (JSON, CSV) of the object. func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r *http.Request) { ctx := newContext(r, w, "SelectObject") defer logger.AuditLog(ctx, w, r, mustGetClaimsFromToken(r)) // Fetch object stat info. objectAPI := api.ObjectAPI() if objectAPI == nil { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 05 05:16:15 UTC 2024 - 117.4K bytes - Viewed (0) -
cmd/bucket-stats.go
qs.TgtXferStats = make(map[string]map[RMetricName]XferStats) qs.MRFStats = ReplicationMRFStats{ LastFailedCount: atomic.LoadUint64(&r.mrfStats.LastFailedCount), } r.RLock() defer r.RUnlock() brs, ok := r.Cache[bucket] if !ok { return qs } for arn := range brs.Stats { qs.TgtXferStats[arn] = make(map[RMetricName]XferStats) } count := 0 var totPeak float64
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 11:39:51 UTC 2024 - 13.4K bytes - Viewed (0) -
cni/pkg/install/cniconfig_test.go
} if !c.chainedCNIPlugin { // Standalone CNI plugin parent := context.Background() ctx1, cancel := context.WithTimeout(parent, 100*time.Millisecond) defer cancel() result, err := getCNIConfigFilepath(ctx1, c.specifiedConfName, tempDir, c.chainedCNIPlugin) if err != nil { assert.Equal(t, result, "") if err == context.DeadlineExceeded {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 18:38:14 UTC 2024 - 15.3K bytes - Viewed (0) -
cmd/data-scanner.go
cycleInfo.next = binary.LittleEndian.Uint64(buf[:8]) buf = buf[8:] _, err := cycleInfo.UnmarshalMsg(buf) bugLogIf(ctx, err) } scannerTimer := time.NewTimer(scannerCycle.Load()) defer scannerTimer.Stop() defer globalScannerMetrics.setCycle(nil) for { select { case <-ctx.Done(): return case <-scannerTimer.C: // Reset the timer for next cycle.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 21:10:34 UTC 2024 - 48.4K bytes - Viewed (0) -
cmd/metrics-resource.go
} return string(name) + "_" + sfx } func updateResourceMetrics(subSys MetricSubsystem, name MetricName, val float64, labels map[string]string, isCumulative bool) { resourceMetricsMapMu.Lock() defer resourceMetricsMapMu.Unlock() subsysMetrics, found := resourceMetricsMap[subSys] if !found { subsysMetrics = ResourceMetrics{} } key := getResourceKey(name, labels) metric, found := subsysMetrics[key]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 23:30:33 UTC 2024 - 17.2K bytes - Viewed (0) -
internal/s3select/csv/reader.go
// Create queue r.queue = make(chan *queueItem, runtime.GOMAXPROCS(0)) r.input = make(chan *queueItem, runtime.GOMAXPROCS(0)) r.readerWg.Add(1) // Start splitter go func() { defer close(r.input) defer close(r.queue) defer r.readerWg.Done() for { q := queueItem{ input: next, dst: make(chan [][]string, 1), err: nextErr, } select { case <-r.close: return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 8.9K bytes - Viewed (0)