Versions in this module Expand all Collapse all v0 v0.1.0 Nov 20, 2024 v0.0.1 Nov 5, 2024 Changes in this version + var ErrStreamClosed = fmt.Errorf("client: use of closed Stream") + func LogPrintf(format string, a ...any) + type Client interface + GetFeeds func(ctx context.Context) (r []*feed.Feed, err error) + GetLatestReport func(ctx context.Context, id feed.ID) (r *ReportResponse, err error) + GetReportPage func(ctx context.Context, id feed.ID, startTS uint64) (*ReportPage, error) + GetReports func(ctx context.Context, ids []feed.ID, timestamp uint64) ([]*ReportResponse, error) + Stream func(ctx context.Context, feedIDs []feed.ID) (Stream, error) + StreamWithStatusCallback func(ctx context.Context, feedIDs []feed.ID, ...) (Stream, error) + func New(cfg Config) (c Client, err error) + type Config struct + ApiKey string + ApiSecret string + InsecureSkipVerify bool + InspectHttpResponse func(*http.Response) + LogDebug bool + Logger func(format string, a ...any) + RestURL string + WsHA bool + WsMaxReconnect int + WsURL string + type CtxKey string + const CustomHeadersCtxKey + type ReportPage struct + NextPageTS uint64 + Reports []*ReportResponse + type ReportResponse struct + FeedID feed.ID + FullReport []byte + ObservationsTimestamp uint64 + ValidFromTimestamp uint64 + func (r *ReportResponse) MarshalJSON() ([]byte, error) + func (r *ReportResponse) String() (s string) + func (r *ReportResponse) UnmarshalJSON(b []byte) (err error) + type Stats struct + Accepted uint64 + ActiveConnections uint64 + ConfiguredConnections uint64 + Deduplicated uint64 + FullReconnects uint64 + PartialReconnects uint64 + TotalReceived uint64 + func (s Stats) String() (st string) + type Stream interface + Close func() error + Read func(context.Context) (*ReportResponse, error) + Stats func() Stats