analytics

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client publisher

Client is an analytics client that implements the publisher interface

Functions

func MachineID

func MachineID() (string, error)

MachineID returns protected id for the current machine

func MachineIDFromHostname

func MachineIDFromHostname() (string, error)

MachineIDFromHostname generates a machine id hash from hostname

Types

type NullClient

type NullClient struct{}

NullClient is a drop in non-functional analytics publisher

func (*NullClient) Close

func (c *NullClient) Close()

Close the analytics connection

func (*NullClient) Initialize

func (c *NullClient) Initialize() error

Initialize does nothing

func (*NullClient) Publish

func (c *NullClient) Publish(event string, props map[string]interface{})

Publish would send a tracking event

type Phase

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

Phase is a stub implementation of a phase with analytics reporting

func (*Phase) After

func (p *Phase) After(result error) error

After enqueues the sending of analytics

func (*Phase) Before

func (p *Phase) Before(title string) error

Before prepares the analytics properties and sets the start time

func (*Phase) IncProp

func (p *Phase) IncProp(key string)

IncProp increases a numeric data point, creating one if it didn't exist

func (*Phase) SetProp

func (p *Phase) SetProp(key string, value interface{})

SetProp sets a value to a datapoint by key

Jump to

Keyboard shortcuts

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