A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/terramate-io/terramate@v0.14.4/ui/tui/telemetry below:

telemetry package - github.com/terramate-io/terramate/ui/tui/telemetry - Go Packages

Package telemetry provides types and helpers for CLI telemetry.

This section is empty.

DefaultRecord is the global default record.

Endpoint returns the real telemetry endpoint.

GenerateOrReadSignature attempts to read the analytics signature. If not present, it will create a new one.

func GenerateSignature() string

GenerateSignature generates a new random signature.

ReadSignature parses a signature file. It works for checkpoint and analytics signatures as both use the same format.

SendMessage sends an analytics message to the backend endpoint asynchronously. It returns a channel that will receive the result of the operation when it's done.

AuthType is the authentication method that was used.

const (
	
	AuthNone AuthType = iota
	
	AuthIDPGoogle
	
	AuthIDPGithub
	
	AuthOIDCGithub
	
	AuthOIDCGitlab
	
	AuthAPIKey
)

DetectAuthTypeFromEnv detects AuthType based on environment variables and credentials.

type Message struct {
	Platform ci.PlatformType `json:"platform,omitempty"`
	
	PlatformUser string `json:"platform_user,omitempty"`

	Auth AuthType `json:"auth,omitempty"`
	
	AuthUser string `json:"auth_user,omitempty"`

	Signature string `json:"signature,omitempty"`
	OrgName   string `json:"org_name,omitempty"`
	OrgUUID   string `json:"org_uuid,omitempty"`

	Arch string `json:"arch,omitempty"`
	OS   string `json:"os,omitempty"`

	
	Command string `json:"command,omitempty"`

	
	Details []string `json:"details,omitempty"`
}

Message is the analytics data that will be collected.

MessageOpt is the option type for Set.

AuthUser sets the auth user.

BoolFlag sets the given detail name if flag is true. If ifCmds is not empty, the current command of the record must also match any of the given values.

func Command ΒΆ

Command sets the command name.

DetectFromEnv detects platform, platform_user, auth type, signature, architecture and OS from the environment.

OrgName sets the organization name.

OrgUUID sets the organization uuid.

StringFlag calls BoolFlag with flag = (stringFlag != "").

Record is used to aggregate telemetry data over the runtime of the application.

NewRecord creates an empty record.

Send sends a message for the current record state asynchronously. A record can only be sent once, subsequent calls will be ignored. The function is non-blocking, the result can be checked with WaitForSend().

Set updates the telemetry data in the record. It is safe to be called concurrently.

WaitForSend waits until Send is done, either successfully, or with error/timeout.

SendMessageParams contains parameters for SendMessage.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4