noop

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

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

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) AddUser

func (c *EventReporter) AddUser(context.Context, string, map[string]any) error

AddUser does nothing.

func (*EventReporter) Close

func (c *EventReporter) Close(context.Context) error

Close does nothing.

func (*EventReporter) EventOccurred

func (c *EventReporter) EventOccurred(context.Context, string, string, map[string]any) error

EventOccurred does nothing.

func (*EventReporter) EventOccurredAnonymous

func (c *EventReporter) EventOccurredAnonymous(context.Context, string, string, map[string]any) error

EventOccurredAnonymous does nothing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL