Documentation
¶
Overview ¶
Package noop is the analytics.EventReporter for a deployment that measures nothing. Every AddUser and EventOccurred call is accepted and discarded: no identify or track call reaches a vendor, and no funnel, cohort, or retention figure counts this process. Nothing here fails, so every error return is nil and a caller's failure branch is unreachable.
analytics/config selects it only when the provider is named "noop". A name it does not recognize is errors.ErrUnknownProvider, so a typo cannot quietly turn analytics off — the difference matters here, because a reporter that silently drops events looks exactly like one whose users are not doing anything.
Index ¶
- type EventReporter
- func (c *EventReporter) AddUser(context.Context, string, map[string]any) error
- func (c *EventReporter) Close(context.Context) error
- func (c *EventReporter) EventOccurred(context.Context, string, string, map[string]any) error
- func (c *EventReporter) EventOccurredAnonymous(context.Context, string, string, map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventReporter ¶
type EventReporter struct{}
EventReporter is a no-op EventReporter.
func NewEventReporter ¶
func NewEventReporter() *EventReporter
NewEventReporter returns a new no-op EventReporter.
func (*EventReporter) Close ¶
func (c *EventReporter) Close(context.Context) error
Close does nothing.
func (*EventReporter) EventOccurred ¶
EventOccurred does nothing.
func (*EventReporter) EventOccurredAnonymous ¶
func (c *EventReporter) EventOccurredAnonymous(context.Context, string, string, map[string]any) error
EventOccurredAnonymous does nothing.