events

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventCatagory

type EventCatagory string

EventCatagory is the Google Analytics Event catagory

var (
	// ECInstallSuccess represents install success event catagory
	ECInstallSuccess EventCatagory = "install-success"
	// ECInstallFail represents install failure event catagory
	ECInstallFail EventCatagory = "install-fail"
	// ECInstallTimeout represents install timeout event catagory
	ECInstallTimeout EventCatagory = "install-timeout"
	// ECK8sEvent represents k8s events event catagory
	ECK8sEvent EventCatagory = "k8s-event"
)

func (EventCatagory) String

func (ec EventCatagory) String() string

String returns string representation of Event Catagory

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 EventCatagory, 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