Add cluster config metrics in metrics-v3 (#19507)

endpoint: /minio/metrics/v3/cluster/config
metrics:
- write_quorum
- rrs_parity
- standard_parity
This commit is contained in:
Shireesh Anjal
2024-05-24 18:20:46 +05:30
committed by GitHub
parent 2a03a34bde
commit 5659cddc84
4 changed files with 64 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ func (t *Cache[T]) InitOnce(ttl time.Duration, opts Opts, update func(ctx contex
// GetWithCtx will return a cached value or fetch a new one.
// passes a caller context, if caller context cancels nothing
// is cached.
// Tf the Update function returns an error the value is forwarded as is and not cached.
// If the Update function returns an error the value is forwarded as is and not cached.
func (t *Cache[T]) GetWithCtx(ctx context.Context) (T, error) {
v := t.val.Load()
ttl := t.ttl