Documentation ¶
Index ¶
- Constants
- Variables
- func Close(ctx context.Context)
- func InstallID(ctx context.Context) string
- func NewReporter(ctx context.Context, mode string) context.Context
- func Report(ctx context.Context, action string, entries ...Entry)
- func Run(ctx context.Context) error
- func SetMetadatum(ctx context.Context, key string, value any)
- func Start(ctx context.Context)
- func WithReporter(ctx context.Context, reporter Reporter) context.Context
- type Entry
- type InstallType
- type ReportAnnotator
- type Reporter
Constants ¶
View Source
const EnvironmentMetadataPrefix = "TELEPRESENCE_REPORT_"
EnvironmentMetadataPrefix is the Environment variable prefix for additional metadata to be reported.
Variables ¶
View Source
var DefaultReportAnnotators []ReportAnnotator //nolint:gochecknoglobals // extension point
DefaultReportAnnotators are the default annotator functions that the NewReporter function will pass to NewReporterForInstallType.
Functions ¶
func NewReporter ¶ added in v2.4.10
NewReporter creates a new initialized Reporter instance that can be used to send telepresence reports to Metriton and assigns it to the current context.
func Report ¶ added in v2.14.3
Report sends a report using the Reporter found in the current context.
func Run ¶ added in v2.14.3
Run ensures that all reports on the send queue are sent to the endpoint.
func SetMetadatum ¶ added in v2.14.3
SetMetadatum associates the given key with the given value in the metadata of the Reporter found in the current context.
Types ¶
type InstallType ¶ added in v2.5.4
type InstallType string
const ( CLI InstallType = "cli" Docker InstallType = "docker" )
type ReportAnnotator ¶ added in v2.9.3
type Reporter ¶ added in v2.4.10
type Reporter interface { Close() InstallID() string Report(ctx context.Context, action string, entries ...Entry) Run(ctx context.Context) error SetMetadatum(ctx context.Context, key string, value any) Start(ctx context.Context) }
Reporter is a Metriton reporter.
func NewReporterForInstallType ¶ added in v2.5.4
func NewReporterForInstallType(ctx context.Context, mode string, installType InstallType, reportAnnotators []ReportAnnotator) Reporter
Click to show internal directories.
Click to hide internal directories.