Documentation ¶
Index ¶
- func HashMD5(s string) string
- func WithAnalytics(ctx context.Context, a *TiltAnalytics) context.Context
- type AnalyticsOpter
- type NullOpter
- type TiltAnalytics
- func (ta *TiltAnalytics) Count(name string, tags map[string]string, n int)
- func (ta *TiltAnalytics) Flush(timeout time.Duration)
- func (ta *TiltAnalytics) Incr(name string, tags map[string]string)
- func (ta *TiltAnalytics) IncrAnonymous(name string, tags map[string]string)
- func (ta *TiltAnalytics) IncrIfUnopted(name string)
- func (ta *TiltAnalytics) Opt() analytics.Opt
- func (ta *TiltAnalytics) SetOpt(opt analytics.Opt) error
- func (ta *TiltAnalytics) Timer(name string, dur time.Duration, tags map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAnalytics ¶ added in v0.8.7
func WithAnalytics(ctx context.Context, a *TiltAnalytics) context.Context
Types ¶
type AnalyticsOpter ¶
An AnalyticsOpter can record a user's choice (opt-in or opt-out) in re: Tilt recording analytics.
type TiltAnalytics ¶
type TiltAnalytics struct {
// contains filtered or unexported fields
}
An Analytics that:
- Has `IncrIfUnopted` to report anonymous metrics only for users who have not opted in/out (or the choice that they did opt in/out).
- Ignores all other calls from users who have not opted in.
- Allows opting in/out at runtime.
func Get ¶ added in v0.8.7
func Get(ctx context.Context) *TiltAnalytics
func NewMemoryTiltAnalyticsForTest ¶ added in v0.8.8
func NewMemoryTiltAnalyticsForTest(opter AnalyticsOpter) (*analytics.MemoryAnalytics, *TiltAnalytics)
NOTE: if you need a ctx as well, use testutils.CtxAndAnalyticsForTest so that you get a ctx with the correct analytics baked in.
func NewTiltAnalytics ¶
func NewTiltAnalytics(opt analytics.Opt, opter AnalyticsOpter, analytics analytics.Analytics, tiltVersion string) *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) IncrAnonymous ¶
func (ta *TiltAnalytics) IncrAnonymous(name string, tags map[string]string)
func (*TiltAnalytics) IncrIfUnopted ¶
func (ta *TiltAnalytics) IncrIfUnopted(name string)
func (*TiltAnalytics) Opt ¶ added in v0.8.7
func (ta *TiltAnalytics) Opt() analytics.Opt
Click to show internal directories.
Click to hide internal directories.