analytics

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterDetails

type ClusterDetails struct {
	Phase      string
	Provider   string
	KFDVersion string
	DryRun     bool
}

type CommandEvent

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

func (CommandEvent) AddClusterDetails

func (c CommandEvent) AddClusterDetails(d ClusterDetails)

func (CommandEvent) AddErrorMessage

func (c CommandEvent) AddErrorMessage(e error)

func (CommandEvent) AddExitCode

func (c CommandEvent) AddExitCode(e int)

func (CommandEvent) AddSuccessMessage

func (c CommandEvent) AddSuccessMessage(msg string)

func (CommandEvent) Name

func (c CommandEvent) Name() string

func (CommandEvent) Properties

func (c CommandEvent) Properties() map[string]any

type Event

type Event interface {
	Properties() map[string]any
	AddErrorMessage(msg error)
	AddSuccessMessage(msg string)
	AddClusterDetails(c ClusterDetails)
	AddExitCode(code int)
	Name() string
}

func NewCommandEvent

func NewCommandEvent(name string) Event

func NewStopEvent

func NewStopEvent() Event

NewStopEvent creates a new StopEvent. StopEvent is a special type of event used to close the events processing.

type StopEvent

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

StopEvent is a special event used to close the events processing.

func (StopEvent) AddClusterDetails

func (g StopEvent) AddClusterDetails(d ClusterDetails)

func (StopEvent) AddErrorMessage

func (g StopEvent) AddErrorMessage(e error)

func (StopEvent) AddExitCode

func (g StopEvent) AddExitCode(e int)

func (StopEvent) AddSuccessMessage

func (g StopEvent) AddSuccessMessage(msg string)

func (StopEvent) Name

func (g StopEvent) Name() string

func (StopEvent) Properties

func (g StopEvent) Properties() map[string]any

type Tracker

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

func NewTracker

func NewTracker(token, version, arch, os, org, hostname string) *Tracker

NewTracker returns a new Tracker instance.

func (*Tracker) Disable

func (a *Tracker) Disable()

Disable disables the tracker.

func (*Tracker) Flush

func (a *Tracker) Flush()

Flush flushes the events queue, guaranteeing that all events are sent to mixpanel. This method uses a timeout to send a GuardEvent to the event processor to close the process.

func (*Tracker) Track

func (a *Tracker) Track(event Event)

Track collects the event to be consumed by the event processor.

Jump to

Keyboard shortcuts

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