Documentation ¶
Overview ¶
Package metrics handles anonymous usage metrics reporting.
Index ¶
- type Reporter
- func (r *Reporter) Close() error
- func (r *Reporter) ReportCreateTopologyEnd(ctx context.Context, id string, createErr error) error
- func (r *Reporter) ReportCreateTopologyStart(ctx context.Context, t *epb.Topology) (string, error)
- func (r *Reporter) ReportDeployClusterEnd(ctx context.Context, id string, deployErr error) error
- func (r *Reporter) ReportDeployClusterStart(ctx context.Context, c *epb.Cluster) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter is a client that reports KNE usage events using PubSub.
func NewReporter ¶
NewReporter creates a new Reporter with a PubSub client for the given project and topic.
func (*Reporter) Close ¶
Close closes the Reporters underlying PubSub client and stops the underlying topic.
func (*Reporter) ReportCreateTopologyEnd ¶
ReportCreateTopologyEnd reports that a topology creation has ended. An error is returned if the event reporting failed.
func (*Reporter) ReportCreateTopologyStart ¶
ReportCreateTopologyStart reports that a topology creation has started. The UUID of the reported event is returned if the event was successfully reported. Else, an error is returned.
func (*Reporter) ReportDeployClusterEnd ¶
ReportDeployClusterEnd reports that a cluster deployment has ended. An error is returned if the event reporting failed.
func (*Reporter) ReportDeployClusterStart ¶
ReportDeployClusterStart reports that a cluster deployment has started. The UUID of the reported event is returned if the event was successfully reported. Else, an error is returned.