Documentation ¶
Index ¶
- Constants
- Variables
- func GetInstanceCreatorUID() string
- type DefaultCollector
- func (d *DefaultCollector) IsEnabled() bool
- func (d *DefaultCollector) NewEvent(t types.EventType) *types.Event
- func (d *DefaultCollector) RecordEvent(e *types.Event)
- func (d *DefaultCollector) SetOptions(options *vcontext.VirtualClusterOptions)
- func (d *DefaultCollector) SetStartCommand(startCommand *cobra.Command)
- func (d *DefaultCollector) SetVirtualClient(virtualClient *kubernetes.Clientset)
- type EventCollector
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(_ 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
)
Click to show internal directories.
Click to hide internal directories.