Documentation
¶
Index ¶
- Variables
- func NewRudderstackEventReporter(logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config, ...) (analytics.EventReporter, error)
- type Config
- type EventReporter
- func (c *EventReporter) AddUser(ctx context.Context, userID string, properties map[string]any) error
- func (c *EventReporter) Close()
- func (c *EventReporter) EventOccurred(ctx context.Context, event, userID string, properties map[string]any) error
- func (c *EventReporter) EventOccurredAnonymous(ctx context.Context, event, anonymousID string, properties map[string]any) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilConfig indicates a nil config was provided. ErrNilConfig = platformerrors.New("nil config") // ErrEmptyAPIToken indicates an empty API token was provided. ErrEmptyAPIToken = platformerrors.New("empty Rudderstack API token") // ErrEmptyDataPlaneURL indicates an empty data plane URL was provided. ErrEmptyDataPlaneURL = platformerrors.New("empty data plane URL") )
Functions ¶
func NewRudderstackEventReporter ¶
func NewRudderstackEventReporter(logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config, circuitBreaker circuitbreaking.CircuitBreaker) (analytics.EventReporter, error)
NewRudderstackEventReporter returns a new Segment-backed EventReporter.
Types ¶
type Config ¶
type EventReporter ¶
type EventReporter struct {
// contains filtered or unexported fields
}
EventReporter is a Segment-backed EventReporter.
func (*EventReporter) AddUser ¶
func (c *EventReporter) AddUser(ctx context.Context, userID string, properties map[string]any) error
AddUser upsert's a user's identity.
func (*EventReporter) Close ¶
func (c *EventReporter) Close()
Close wraps the internal client's Close method.
func (*EventReporter) EventOccurred ¶
func (c *EventReporter) EventOccurred(ctx context.Context, event, userID string, properties map[string]any) error
EventOccurred associates events with a user.
func (*EventReporter) EventOccurredAnonymous ¶
func (c *EventReporter) EventOccurredAnonymous(ctx context.Context, event, anonymousID string, properties map[string]any) error
EventOccurredAnonymous records an event for an anonymous user.
Click to show internal directories.
Click to hide internal directories.