From f3cfcb0a95c6ce1662f0cb2c4eae10b3bf37a7bd Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 24 May 2026 18:41:37 +0300 Subject: =?UTF-8?q?fix(rpn):=20complete=20DIP=20for=20MetricRegistry=20?= =?UTF-8?q?=E2=80=94=20use=20MetricReader/MetricWriter=20interfaces=20(tas?= =?UTF-8?q?k=20ek)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/rpn/operations.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/rpn/operations.go') diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go index f79457c..989ce87 100644 --- a/internal/rpn/operations.go +++ b/internal/rpn/operations.go @@ -13,7 +13,7 @@ type Operations struct { consts ConstantsProvider mode CalculationMode prefixMode PrefixMode - metricRegistry *MetricRegistry + metricRegistry MetricReader mu sync.RWMutex } @@ -38,8 +38,8 @@ var ( // NewOperations creates a new Operations instance with the given variable store. // Does not create a ConstantsProvider internally; caller must use SetConstants. // If no registry is provided, defaults to the global MetricRegistry. -func NewOperations(vars VariableStore, reg ...*MetricRegistry) *Operations { - r := GetMetricRegistry() +func NewOperations(vars VariableStore, reg ...MetricReader) *Operations { + r := MetricReader(GetMetricRegistry()) if len(reg) > 0 && reg[0] != nil { r = reg[0] } -- cgit v1.2.3