events

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventCategory added in v0.0.7

type EventCategory string

EventCategory is the Google Analytics Event category

var (
	// ECInstallSuccess represents install success event category
	ECInstallSuccess EventCategory = "install-success"
	// ECInstallFail represents install failure event category
	ECInstallFail EventCategory = "install-fail"
	// ECInstallTimeout represents install timeout event category
	ECInstallTimeout EventCategory = "install-timeout"

	// ECUninstallSuccess represents uninstall success event category
	ECUninstallSuccess EventCategory = "uninstall-success"
	// ECUninstallFail represents uninstall failure event category
	ECUninstallFail EventCategory = "uninstall-fail"
	// ECUninstallTimeout represents uninstall timeout event category
	ECUninstallTimeout EventCategory = "uninstall-timeout"

	// ECK8sEvent represents k8s events event category
	ECK8sEvent EventCategory = "k8s-event"
)

func (EventCategory) String added in v0.0.7

func (ec EventCategory) String() string

String returns string representation of Event Category

type KbrewEvent

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

KbrewEvent contains information to report Event to Google Analytics

func NewKbrewEvent

func NewKbrewEvent(appConfig *config.AppConfig) *KbrewEvent

NewKbrewEvent return new KbrewEvent

func (*KbrewEvent) Report

func (kv *KbrewEvent) Report(ctx context.Context, ec EventCategory, err error, k8sEvent *k8sEvent) error

Report sends event to Google Analytics

func (*KbrewEvent) ReportK8sEvents

func (kv *KbrewEvent) ReportK8sEvents(ctx context.Context, err error, workloads []corev1.ObjectReference) error

ReportK8sEvents sends kbrew events with K8s events to Google Analytics

Jump to

Keyboard shortcuts

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