Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // APIKey contains the API key for external analytics service. It is set during application build. APIKey string = "" )
Functions ¶
Types ¶
type NoopReporter ¶
type NoopReporter struct{}
NoopReporter is a no-op implementation of the Reporter interface.
func (*NoopReporter) ReportCommand ¶
func (r *NoopReporter) ReportCommand(cmd string) error
ReportCommand reports a command to the analytics service.
func (*NoopReporter) ReportError ¶
func (r *NoopReporter) ReportError(err error, cmd string) error
ReportError reports an error to the analytics service.
type Reporter ¶
type Reporter interface { ReportCommand(cmd string) error ReportError(err error, cmd string) error Close() }
Reporter defines behavior for reporting analytics.
func GetReporter ¶
NewReporter creates a new Reporter instance.
func NewSegmentReporter ¶
NewSegmentReporter creates a new SegmentReporter instance.
type SegmentReporter ¶
type SegmentReporter struct {
// contains filtered or unexported fields
}
SegmentReporter is a Segment implementation of the Reporter interface.
func (*SegmentReporter) ReportCommand ¶
func (r *SegmentReporter) ReportCommand(cmd string) error
ReportCommand reports a command to the analytics service.
func (*SegmentReporter) ReportError ¶
func (r *SegmentReporter) ReportError(in error, cmd string) error
ReportError reports an error to the analytics service.
Click to show internal directories.
Click to hide internal directories.