Documentation
¶
Index ¶
- Constants
- Variables
- func AnonymizeHost(host string) string
- func GetMachineID() string
- func GoogleAnalyticsSender(client *http.Client, payload Payload) (out string, err error)
- func SegmentioSender(client *http.Client, payload Payload) (out string, err error)
- func SendCmdEvent(cmd *cobra.Command, version string) (string, error)
- func SendCmdInitEvent(cmd *cobra.Command, version string) (string, error)
- func SendCreateEvent(event string, params CreateParams) (string, error)
- func SendHeartbeatEvent(host, version, clusterId string) (string, error)
- func SendRunEvent(event string, params RunParams) (string, error)
- func SendServerStartEvent(clusterId, version string) (string, error)
- func TestkubeAnalyticsSender(client *http.Client, payload Payload) (out string, err error)
- type CreateParams
- type Event
- type Params
- type Payload
- type RunParams
- type Sender
Constants ¶
const ( APIHostLocal = "local" APIHostExternal = "external" APIHostTestkubeInternal = "testkube-internal" )
const SegmentioEnvVariableName = "TESTKUBE_SEGMENTIO_KEY"
Variables ¶
var ( TestkubeMeasurementID = "" //this is default but it can be set using ldflag -X github.com/kubeshop/testkube/pkg/telemetry.TestkubeMeasurementID=G-B6KY2SF30K TestkubeMeasurementSecret = "" )
var SegmentioKey = "iL0p6r5C9i35F7tRxnB0k3gB2nGh7VTK"
Brew builds can't be parametrized so we are embedding this one
Functions ¶
func AnonymizeHost ¶
func GoogleAnalyticsSender ¶
func SegmentioSender ¶
SegmentioSender sends ananymous telemetry data to segment.io TODO refactor Sender func as out is not needed (use debug loggers to log output)
func SendCmdEvent ¶
SendCmdEvent will send CLI event to GA
func SendCmdInitEvent ¶
SendCmdInitEvent will send CLI event to GA
func SendCreateEvent ¶
func SendCreateEvent(event string, params CreateParams) (string, error)
SendCreateEvent will send API create event for Test or Test suite to GA
func SendHeartbeatEvent ¶
SendHeartbeatEvent will send CLI event to GA
func SendRunEvent ¶
SendCreateEvent will send API run event for Test or Test suite to GA
func SendServerStartEvent ¶
SendServerStartEvent will send event to GA
Types ¶
type CreateParams ¶
type CreateParams struct { AppVersion string DataSource string Host string ClusterID string TestType string }
CreateParams contains Test or Test suite creation parameters
type Params ¶
type Params struct { EventCount int64 `json:"event_count,omitempty"` EventCategory string `json:"event_category,omitempty"` AppVersion string `json:"app_version,omitempty"` AppName string `json:"app_name,omitempty"` CustomDimensions string `json:"custom_dimensions,omitempty"` DataSource string `json:"data_source,omitempty"` Host string `json:"host,omitempty"` MachineID string `json:"machine_id,omitempty"` ClusterID string `json:"cluster_id,omitempty"` OperatingSystem string `json:"operating_system,omitempty"` Architecture string `json:"architecture,omitempty"` TestType string `json:"test_type,omitempty"` DurationMs int32 `json:"duration_ms,omitempty"` Status string `json:"status,omitempty"` }
type Payload ¶
type Payload struct { UserID string `json:"user_id,omitempty"` ClientID string `json:"client_id,omitempty"` Events []Event `json:"events,omitempty"` }
func NewAPIPayload ¶
func NewCLIPayload ¶
func NewCreatePayload ¶
func NewCreatePayload(name string, params CreateParams) Payload
NewCreatePayload prepares payload for Test or Test suite creation
func NewRunPayload ¶
NewRunPayload prepares payload for Test or Test suite execution