Documentation
¶
Index ¶
Constants ¶
View Source
const Endpoint = "https://telemetry.hasura.io/v1/http"
Endpoint is where telemetry data is sent.
Variables ¶
View Source
var Topic = "cli_test"
Topic is the name under which telemetry is sent.
View Source
var Waiter sync.WaitGroup
Waiter waits for telemetry ops to complete, if required
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
// UUID used for telemetry, generated on first run.
UUID string `json:"uuid"`
// UUID obtained from server.
ServerUUID string `json:"server_uuid"`
// Unique id for the current execution.
ExecutionID string `json:"execution_id"`
// OS platform and architecture.
OSPlatform string `json:"os_platform"`
OSArch string `json:"os_arch"`
// Current cli version.
Version string `json:"version"`
// Current Server version.
ServerVersion string `json:"server_version"`
// Command being executed.
Command string `json:"command"`
// Indicates whether the execution resulted in an error or not.
IsError bool `json:"is_error"`
// Any additional payload information.
Payload map[string]interface{} `json:"payload"`
// Additional objects - mandatory
Logger *logrus.Logger `json:"-"`
// IsBeamed indicates if this data is already beamed or not.
IsBeamed bool `json:"-"`
// CanBeam indicates if data can be beamed or not, e.g. disabled telemetry.
CanBeam bool `json:"-"`
}
Data holds all info collected and transmitted
func BuildEvent ¶
func BuildEvent() *Data
BuildEvent returns a Data object which represent a telemetry event
Click to show internal directories.
Click to hide internal directories.