From bbefcf38c5391c8338bb2edf205ab775e3a38f74 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 22 May 2026 13:16:48 +0300 Subject: feat: implement custom metric commands (define, undefine, list, show) - Add Unregister() to MetricRegistry for removing custom metrics - Handle 'custom show', 'custom list', 'custom define', 'custom undefine' in rpn_parse.go evaluate() - Add CustomList, CustomDefine, CustomUndefine methods to Operations - Update Operator interface with new custom metric methods - Add comprehensive tests for all custom metric operations --- internal/rpn/operations.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/rpn/operations.go') diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go index d45ffd1..9e5bbca 100644 --- a/internal/rpn/operations.go +++ b/internal/rpn/operations.go @@ -165,6 +165,10 @@ type Operator interface { MetricList(stack *Stack) (string, error) MetricCategory(stack *Stack, categoryName string) (string, error) MetricCompatible(stack *Stack) (string, error) + // Custom metric commands + CustomList(stack *Stack) (string, error) + CustomDefine(name string, factor float64, category string) error + CustomUndefine(name string) error } // Operations provides operator implementations and stack manipulation. -- cgit v1.2.3