Documentation
¶
Overview ¶
Package telemetry registers the telemetry initialiser with the setup system. When TelemetryCmd is enabled and the user runs `init`, they are prompted to opt into anonymous usage telemetry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormOption ¶
type FormOption func(*formConfig)
FormOption configures the telemetry init form for testability.
type TelemetryInitialiser ¶
type TelemetryInitialiser struct {
// contains filtered or unexported fields
}
TelemetryInitialiser implements setup.Initialiser. It prompts the user to opt into telemetry during init.
func NewTelemetryInitialiser ¶
func NewTelemetryInitialiser(p *props.Props, opts ...FormOption) *TelemetryInitialiser
NewTelemetryInitialiser creates a new TelemetryInitialiser.
func (*TelemetryInitialiser) Configure ¶
func (t *TelemetryInitialiser) Configure(p *props.Props, cfg config.Containable) error
Configure prompts the user to opt into telemetry. If TELEMETRY_ENABLED is set, applies it directly without prompting.
func (*TelemetryInitialiser) IsConfigured ¶
func (t *TelemetryInitialiser) IsConfigured(cfg config.Containable) bool
IsConfigured returns true if the telemetry.enabled key has been explicitly set in config, OR if the TELEMETRY_ENABLED environment variable is set (any value counts as "configured — no prompt needed").
func (*TelemetryInitialiser) Name ¶
func (t *TelemetryInitialiser) Name() string
Name returns the human-readable name for this initialiser.