feat(IMEX-45): added unauth telemetry call

This commit is contained in:
ElectroNafta
2024-10-24 12:13:52 +02:00
committed by ElectroNafta
parent b4860af56d
commit 0e2d512cf0

View File

@@ -2,6 +2,7 @@ package proton
import (
"context"
"github.com/go-resty/resty/v2"
)
@@ -16,3 +17,10 @@ func (c *Client) SendDataEventMultiple(ctx context.Context, req SendStatsMultiRe
return r.SetBody(req).Post("/data/v1/stats/multiple")
})
}
func (m *Manager) SendUnauthDataEvent(ctx context.Context, req SendStatsReq) error {
if _, err := m.r(ctx).SetBody(req).Post("/data/v1/stats"); err != nil {
return err
}
return nil
}