summaryrefslogtreecommitdiff
path: root/internal/rpn/operations.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-24 18:41:37 +0300
committerPaul Buetow <paul@buetow.org>2026-05-24 18:41:37 +0300
commitf3cfcb0a95c6ce1662f0cb2c4eae10b3bf37a7bd (patch)
treecc87ff8bff5306c7fc7d4d90871d327173e179a5 /internal/rpn/operations.go
parent1b31b4a6bbf4b9ae371801d631c8eb692f17efb6 (diff)
fix(rpn): complete DIP for MetricRegistry — use MetricReader/MetricWriter interfaces (task ek)
Diffstat (limited to 'internal/rpn/operations.go')
-rw-r--r--internal/rpn/operations.go6
1 files changed, 3 insertions, 3 deletions
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]
}