mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-28 23:48:30 +02:00
wip
This commit is contained in:
parent
dad954ae16
commit
5b717c9aa5
15 changed files with 746 additions and 9 deletions
|
@ -119,3 +119,16 @@ 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 {
|
||||
res, err := api.cluster.ReportUsageWithResponse(ctx, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if res.StatusCode()/100 != 2 {
|
||||
return fmt.Errorf("unexpected response from ReportUsage: %d", res.StatusCode())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue