Documentation
¶
Index ¶
- Variables
- func GetMachineID(log log.Logger) string
- func GetPlatformInstanceID(self *managementv1.Self) string
- func GetPlatformUserID(self *managementv1.Self) string
- func Start(isCli bool)
- type ChartInfo
- type Config
- type DefaultCollector
- func (d *DefaultCollector) Flush()
- func (d *DefaultCollector) Init(currentNamespaceConfig *rest.Config, currentNamespace string, ...)
- func (d *DefaultCollector) RecordCLI(self *managementv1.Self, err error)
- func (d *DefaultCollector) RecordError(ctx context.Context, severity ErrorSeverityType, err error)
- func (d *DefaultCollector) RecordStart(ctx context.Context)
- func (d *DefaultCollector) RecordStatus(ctx context.Context)
- func (d *DefaultCollector) SetVirtualClient(virtualClient *kubernetes.Clientset)
- type ErrorSeverityType
- type EventCollector
- type KubernetesVersion
- type StrBool
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedType = errors.New("unsupported type")
ErrUnsupportedType is returned if the type is not implemented
View Source
var (
SyncerVersion = "dev"
)
Functions ¶
func GetMachineID ¶ added in v0.18.0
func GetMachineID(log log.Logger) string
GetMachineID retrieves machine ID and encodes it together with users $HOME path and extra key to protect privacy. Returns a hex-encoded string.
func GetPlatformInstanceID ¶ added in v0.18.0
func GetPlatformInstanceID(self *managementv1.Self) string
GetPlatformInstanceID returns the loft instance id
func GetPlatformUserID ¶ added in v0.18.0
func GetPlatformUserID(self *managementv1.Self) string
GetPlatformUserID returns the loft instance id
Types ¶
type ChartInfo ¶ added in v0.18.0
type ChartInfo struct {
Values map[string]interface{}
Name string
Version string
}
type Config ¶ added in v0.18.0
type Config struct {
Disabled StrBool `json:"disabled,omitempty"`
InstanceCreator string `json:"instanceCreator,omitempty"`
PlatformUserID string `json:"platformUserID,omitempty"`
PlatformInstanceID string `json:"platformInstanceID,omitempty"`
MachineID string `json:"machineID,omitempty"`
}
type DefaultCollector ¶
type DefaultCollector struct {
// contains filtered or unexported fields
}
func NewDefaultCollector ¶
func NewDefaultCollector(config Config, isCli bool) (*DefaultCollector, error)
func (*DefaultCollector) Init ¶ added in v0.18.0
func (d *DefaultCollector) Init(currentNamespaceConfig *rest.Config, currentNamespace string, options *options.VirtualClusterOptions)
func (*DefaultCollector) RecordCLI ¶ added in v0.18.0
func (d *DefaultCollector) RecordCLI(self *managementv1.Self, err error)
func (*DefaultCollector) RecordError ¶ added in v0.18.0
func (d *DefaultCollector) RecordError(ctx context.Context, severity ErrorSeverityType, err error)
func (*DefaultCollector) RecordStart ¶ added in v0.18.0
func (d *DefaultCollector) RecordStart(ctx context.Context)
func (*DefaultCollector) RecordStatus ¶ added in v0.18.0
func (d *DefaultCollector) RecordStatus(ctx context.Context)
func (*DefaultCollector) SetVirtualClient ¶
func (d *DefaultCollector) SetVirtualClient(virtualClient *kubernetes.Clientset)
type ErrorSeverityType ¶ added in v0.18.0
type ErrorSeverityType string
const (
ConfigEnvVar = "VCLUSTER_TELEMETRY_CONFIG"
WarningSeverity ErrorSeverityType = "warning"
ErrorSeverity ErrorSeverityType = "error"
FatalSeverity ErrorSeverityType = "fatal"
PanicSeverity ErrorSeverityType = "panic"
)
type EventCollector ¶
type EventCollector interface {
RecordStart(ctx context.Context)
RecordError(ctx context.Context, severity ErrorSeverityType, err error)
RecordCLI(self *managementv1.Self, err error)
// Flush makes sure all events are sent to the backend
Flush()
Init(currentNamespaceConfig *rest.Config, currentNamespace string, options *options.VirtualClusterOptions)
SetVirtualClient(virtualClient *kubernetes.Clientset)
}
var Collector EventCollector = &noopCollector{}
type KubernetesVersion ¶ added in v0.18.0
type KubernetesVersion struct {
Major string `json:"major"`
Minor string `json:"minor"`
GitVersion string `json:"gitVersion"`
}
type StrBool ¶ added in v0.18.0
type StrBool string
func (*StrBool) UnmarshalJSON ¶ added in v0.18.0
func (f *StrBool) UnmarshalJSON(data []byte) error
UnmarshalJSON parses fields that may be numbers or booleans.
Click to show internal directories.
Click to hide internal directories.