- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for CriticalIf (0.07 sec)
-
internal/logger/logger.go
sendLog(ctx, entry) } // ErrCritical is the value panic'd whenever CriticalIf is called. var ErrCritical struct{} // CriticalIf logs the provided error on the console. It fails the // current go-routine by causing a `panic(ErrCritical)`. func CriticalIf(ctx context.Context, err error, errKind ...interface{}) { if err != nil { LogIf(ctx, "", err, errKind...)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 22 09:43:48 UTC 2024 - 12.4K bytes - Viewed (0) -
cmd/namespace-lock.go
} if !locked { // We failed to get the lock // Decrement ref count since we failed to get the lock n.lockMapMutex.Lock() n.lockMap[resource].ref-- if n.lockMap[resource].ref < 0 { logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0")) } if n.lockMap[resource].ref == 0 { // Remove from the map if there are no more references. delete(n.lockMap, resource) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/metrics.go
float64(disk.TotalSpace), disk.DrivePath, ) } } func metricsHandler() http.Handler { registry := prometheus.NewRegistry() logger.CriticalIf(GlobalContext, registry.Register(minioVersionInfo)) logger.CriticalIf(GlobalContext, registry.Register(newMinioCollector())) gatherers := prometheus.Gatherers{ prometheus.DefaultGatherer, registry, }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 16.6K bytes - Viewed (0) -
cmd/signature-v4-utils.go
func getContentSha256Cksum(r *http.Request, stype serviceType) string { if stype == serviceSTS { payload, err := io.ReadAll(io.LimitReader(r.Body, stsRequestBodyLimit)) if err != nil { logger.CriticalIf(GlobalContext, err) } sum256 := sha256.Sum256(payload) r.Body = io.NopCloser(bytes.NewReader(payload)) return hex.EncodeToString(sum256[:]) } var ( defaultSha256Cksum string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 9.1K bytes - Viewed (0) -
cmd/metrics-v3-types.go
} // There is no way to handle errors here, so we panic the current goroutine // and the Metrics API handler returns a 500 HTTP status code. This should // normally not happen, and usually indicates a bug. logger.CriticalIf(GlobalContext, errors.Wrap(err, "failed to get metrics")) promMetrics := metricValues.ToPromMetrics(mg.CollectorPath.metricPrefix(), mg.ExtraLabels) for _, metric := range promMetrics { ch <- metric }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 30 22:28:46 UTC 2024 - 15.6K bytes - Viewed (0) -
cmd/metrics-v2.go
func metricsNodeHandler() http.Handler { registry := prometheus.NewRegistry() logger.CriticalIf(GlobalContext, registry.Register(nodeCollector)) if err := registry.Register(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{ Namespace: minioNamespace, ReportErrors: true, })); err != nil { logger.CriticalIf(GlobalContext, err) } if err := registry.Register(prometheus.NewGoCollector()); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 131.9K bytes - Viewed (0) -
cmd/encryption-v1.go
// sio max. size is 256 TB reqInfo := (&logger.ReqInfo{}).AppendTags("size", strconv.FormatUint(size, 10)) ctx := logger.SetReqInfo(GlobalContext, reqInfo) logger.CriticalIf(ctx, err) } return int64(size) } // DecryptObjectInfo tries to decrypt the provided object if it is encrypted. // It fails if the object is encrypted and the HTTP headers don't contain
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:06:08 UTC 2024 - 37.2K bytes - Viewed (0) -
cmd/object-api-utils.go
func mustGetUUID() string { u, err := uuid.NewRandom() if err != nil { logger.CriticalIf(GlobalContext, err) } return u.String() } // mustGetUUIDBytes - get a random UUID as 16 bytes unencoded. func mustGetUUIDBytes() []byte { u, err := uuid.NewRandom() if err != nil { logger.CriticalIf(GlobalContext, err) } return u[:] }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/generic-handlers.go
w.Header().Set(xhttp.AmzRequestHostID, globalLocalNodeNameHex) } h.ServeHTTP(w, r) }) } // criticalErrorHandler handles panics and fatal errors by // `panic(logger.ErrCritical)` as done by `logger.CriticalIf`. // // It should be always the first / highest HTTP handler. func setCriticalErrorHandler(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { defer func() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 20.5K bytes - Viewed (0) -
cmd/utils.go
return strings.TrimSpace(s) != s } func request2BucketObjectName(r *http.Request) (bucketName, objectName string) { path, err := getResource(r.URL.Path, r.Host, globalDomainNames) if err != nil { logger.CriticalIf(GlobalContext, err) } return path2BucketObject(path) } // path2BucketObjectWithBasePath returns bucket and prefix, if any, // of a 'path'. basePath is trimmed from the front of the 'path'.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 31.9K bytes - Viewed (0)