telemetry

package
v0.15.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigEnvVar = "VCLUSTER_TELEMETRY_CONFIG"
)

Variables

View Source
var (
	SyncerVersion = "dev"
)

Functions

func GetInstanceCreatorUID

func GetInstanceCreatorUID() string

Gets machine ID and encodes it together with users $HOME path and extra key to protect privacy. Returns a hex-encoded string.

Types

type DefaultCollector

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

func NewDefaultCollector

func NewDefaultCollector(ctx context.Context, config types.SyncerTelemetryConfig) (*DefaultCollector, error)

func (*DefaultCollector) IsEnabled

func (d *DefaultCollector) IsEnabled() bool

func (*DefaultCollector) NewEvent

func (d *DefaultCollector) NewEvent(t types.EventType) *types.Event

func (*DefaultCollector) RecordEvent

func (d *DefaultCollector) RecordEvent(e *types.Event)

func (*DefaultCollector) SetOptions

func (d *DefaultCollector) SetOptions(options *vcontext.VirtualClusterOptions)

func (*DefaultCollector) SetStartCommand

func (d *DefaultCollector) SetStartCommand(startCommand *cobra.Command)

func (*DefaultCollector) SetVirtualClient

func (d *DefaultCollector) SetVirtualClient(virtualClient *kubernetes.Clientset)

type EventCollector

type EventCollector interface {
	IsEnabled() bool
	// RecordEvent adds the produced event to a buffer to eventually be sent to the telemetry backend
	RecordEvent(e *types.Event)
	// NewEvent allocates a new Event struct to be populated by the caller.
	NewEvent(t types.EventType) *types.Event
	SetOptions(options *vcontext.VirtualClusterOptions)
	SetVirtualClient(virtualClient *kubernetes.Clientset)
	// start command object is used to determine which flags were set by the user
	SetStartCommand(startCommand *cobra.Command)
}
var (
	Collector EventCollector
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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