Debian Codegraph @

data.go

raw
1 package proton
2
3 import (
4 "context"
5 "github.com/go-resty/resty/v2"
6 )
7
8 func (c *Client) SendDataEvent(ctx context.Context, req SendStatsReq) error {
9 return c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
10 return r.SetBody(req).Post("/data/v1/stats")
11 })
12 }
13
14 func (c *Client) SendDataEventMultiple(ctx context.Context, req SendStatsMultiReq) error {
15 return c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
16 return r.SetBody(req).Post("/data/v1/stats/multiple")
17 })
18 }