core/zero: add usage reporter (#5281)

* wip

* add response

* handle empty email

* use set, update log

* add test

* add coalesce, comments, test

* add test, fix bug

* use builtin cmp.Or

* remove wait ready call

* use api error
This commit is contained in:
Caleb Doxsey 2024-09-12 15:45:54 -06:00 committed by GitHub
parent 82a9dbe42a
commit 146efc1b13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 697 additions and 2 deletions

View file

@ -119,3 +119,10 @@ func (api *API) GetClusterResourceBundles(ctx context.Context) (*cluster_api.Get
func (api *API) GetTelemetryConn() *grpc.ClientConn {
return api.telemetryConn
}
func (api *API) ReportUsage(ctx context.Context, req cluster_api.ReportUsageRequest) error {
_, err := apierror.CheckResponse(
api.cluster.ReportUsageWithResponse(ctx, req),
)
return err
}