cfanalytics

package
v0.0.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	START_BEGIN      = "start_begin"
	START_END        = "start_end"
	SELECTED_SERVICE = "selected_service"
	STOP             = "stop"
	STOP_TELEMETRY   = "telemetry off"
	BOSH_ENV         = "bosh"
	ERROR            = "error"
	UNINSTALL        = "uninstall"
	DEPLOY_SERVICE   = "deployed service"
)
View Source
const AnalyticsDLabel = "org.cloudfoundry.cfdev.cfanalyticsd"

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

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

func New

func New(toggle Toggle, client analytics.Client, version string, osVersion string, isBehindProxy bool, exit chan struct{}, ui UI) *Analytics

func (*Analytics) Close

func (a *Analytics) Close()

func (*Analytics) Event

func (a *Analytics) Event(event string, data ...map[string]interface{}) error

func (*Analytics) PromptOptInIfNeeded added in v0.0.12

func (a *Analytics) PromptOptInIfNeeded(customMessage string) error

type AnalyticsD

type AnalyticsD struct {
	Config       config.Config
	DaemonRunner DaemonRunner
}

func (*AnalyticsD) DaemonSpec added in v0.0.14

func (a *AnalyticsD) DaemonSpec() daemon.DaemonSpec

func (*AnalyticsD) Destroy

func (a *AnalyticsD) Destroy() error

func (*AnalyticsD) IsRunning

func (a *AnalyticsD) IsRunning() (bool, error)

func (*AnalyticsD) Start

func (a *AnalyticsD) Start() error

func (*AnalyticsD) Stop

func (a *AnalyticsD) Stop() error

type DaemonRunner

type DaemonRunner interface {
	AddDaemon(daemon.DaemonSpec) error
	RemoveDaemon(string) error
	Start(string) error
	Stop(string) error
	IsRunning(string) (bool, error)
}

type Toggle

type Toggle interface {
	Defined() bool
	CustomAnalyticsDefined() bool
	Enabled() bool
	IsCustom() bool
	SetCFAnalyticsEnabled(value bool) error
	SetCustomAnalyticsEnabled(value bool) error
	GetProps() map[string]interface{}
	SetProp(k, v string) error
}

type UI

type UI interface {
	Ask(prompt string) (answer string)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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