From 48785e28967e4dfeb4969e0637a3b9c2c6eb7aa4 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 19 Apr 2026 23:36:04 +0700 Subject: [PATCH] checker: adopt unified ReportContext reporter signature Follow the checker-sdk-go interface consolidation: reporter methods now take sdk.ReportContext and read the payload via ctx.Data() instead of the raw json.RawMessage parameter. Backed by the same underlying logic. --- checker/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checker/provider.go b/checker/provider.go index ab6b7e8..3b7a411 100644 --- a/checker/provider.go +++ b/checker/provider.go @@ -53,9 +53,9 @@ func (p *pingProvider) Definition() *happydns.CheckerDefinition { } // ExtractMetrics implements happydns.CheckerMetricsReporter. -func (p *pingProvider) ExtractMetrics(raw json.RawMessage, collectedAt time.Time) ([]happydns.CheckMetric, error) { +func (p *pingProvider) ExtractMetrics(ctx happydns.ReportContext, collectedAt time.Time) ([]happydns.CheckMetric, error) { var data PingData - if err := json.Unmarshal(raw, &data); err != nil { + if err := json.Unmarshal(ctx.Data(), &data); err != nil { return nil, err }