tracker

package
v0.0.0-...-6edac6f Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func CollectorURL

func CollectorURL(u string) Option

func SetAppInfo

func SetAppInfo(app *contexts.App) Option

func TrackingID

func TrackingID(id string) Option

type Options

type Options struct {
	CollectorURL string
	AppInfo      *contexts.App
	Platform     string
	TrackingID   string
	QueueBuffer  int
}

func (Options) EventOptions

func (o Options) EventOptions() []event.Option

type Store

type Store interface {
	Set(*event.Event) error
	Update(*StoreEvent) error
	Remove(*StoreEvent) error
	Get(string) (*StoreEvent, error)
	GetAll() ([]*StoreEvent, error)
}

func NewMemStore

func NewMemStore() (Store, error)

type StoreEvent

type StoreEvent struct {
	ID          string
	Event       []byte
	Attempted   bool
	Attempts    int
	LastAttempt time.Time
}

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Tracker, error)

func (*Tracker) Action

func (t *Tracker) Action(a *contexts.Action, opts ...event.Option) error

func (*Tracker) Alias

func (t *Tracker) Alias(opts ...event.Option) error

func (*Tracker) Close

func (t *Tracker) Close() error

func (*Tracker) Group

func (t *Tracker) Group(g *contexts.Group, opts ...event.Option) error

func (*Tracker) Identify

func (t *Tracker) Identify(u *contexts.User, opts ...event.Option) error

func (*Tracker) Page

func (t *Tracker) Page(page *contexts.Page, opts ...event.Option) error

func (*Tracker) Screen

func (t *Tracker) Screen(opts ...event.Option) error

func (*Tracker) Session

func (t *Tracker) Session(id string, opts ...event.Option) error

func (*Tracker) SetOption

func (t *Tracker) SetOption(opt event.Option) *Tracker

func (*Tracker) Timing

func (t *Tracker) Timing(te *contexts.Timing, opts ...event.Option) error

func (*Tracker) TimingStart

func (t *Tracker) TimingStart(cat, label, variable string) *timer

func (*Tracker) Track

func (t *Tracker) Track(typ event.Type, opts ...event.Option) error

func (*Tracker) Transaction

func (t *Tracker) Transaction(opts ...event.Option) error

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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