analytics

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticsOpter

type AnalyticsOpter interface {
	SetOpt(opt analytics.Opt) error
}

An AnalyticsOpter can record a user's choice (opt-in or opt-out) in re: Tilt recording analytics.

type NullOpter

type NullOpter struct{}

func (NullOpter) SetOpt

func (NullOpter) SetOpt(opt analytics.Opt) error

type TiltAnalytics

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

An Analytics that:

  1. Has `IncrIfUnopted` to report anonymous metrics only for users who have not opted in/out (or the choice that they did opt in/out).
  2. Ignores all other calls from users who have not opted in.
  3. Allows opting in/out at runtime.

func NewMemoryTiltAnalytics

func NewMemoryTiltAnalytics(opter AnalyticsOpter) (*analytics.MemoryAnalytics, *TiltAnalytics)

func NewTiltAnalytics

func NewTiltAnalytics(opt analytics.Opt, opter AnalyticsOpter, analytics analytics.Analytics) *TiltAnalytics

func (*TiltAnalytics) Count

func (ta *TiltAnalytics) Count(name string, tags map[string]string, n int)

func (*TiltAnalytics) Flush

func (ta *TiltAnalytics) Flush(timeout time.Duration)

func (*TiltAnalytics) Incr

func (ta *TiltAnalytics) Incr(name string, tags map[string]string)

func (*TiltAnalytics) IncrAnonymous

func (ta *TiltAnalytics) IncrAnonymous(name string, tags map[string]string)

func (*TiltAnalytics) IncrIfUnopted

func (ta *TiltAnalytics) IncrIfUnopted(name string)

func (*TiltAnalytics) OnChange

func (ta *TiltAnalytics) OnChange(ctx context.Context, st store.RStore)

func (*TiltAnalytics) SetOpt

func (ta *TiltAnalytics) SetOpt(opt analytics.Opt) error

func (*TiltAnalytics) Timer

func (ta *TiltAnalytics) Timer(name string, dur time.Duration, tags map[string]string)

Jump to

Keyboard shortcuts

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