segment

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAPIKeyNotProvided = fmt.Errorf("API Key or client must be provided")
)

Functions

func NewFakeTracker

func NewFakeTracker() track.Trackable

func NewSegmentTracker

func NewSegmentTracker(config SegmentTrackerConfig) (track.Trackable, error)

Types

type SegmentTrackerConfig

type SegmentTrackerConfig struct {
	// API Key for connecting with Segment
	APIKey string
	// Segment client
	analytics.Client
	// Name of the application to be tracked
	AppName string
	// Version of the application to be tracked
	AppVersion string
	// Build of the application to be tracked
	AppBuild string
	// The flushing interval of the client.
	Interval time.Duration
	// The maximum number of messages to batch before flushing.
	BatchSize int
}

Jump to

Keyboard shortcuts

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