Documentation ¶
Index ¶
- Variables
- func NewContext(ctx context.Context, client Client) context.Context
- func SendTelemetryApproval(user User, approval Approval) error
- type Approval
- type Client
- type CommandInfo
- type Event
- func CreateChangeTelemetryStatusEvent(action string, origin string, err error) Event
- func CreateCompletionCommand(cmdInfo CommandInfo) Event
- func CreateConfigEvent(cmdInfo CommandInfo, err error) Event
- func CreateDiagnosticEvent(err error) Event
- func CreateFollowEvent(err error) Event
- func CreateInfoEvent(cmdInfo CommandInfo, err error) Event
- func CreateLocalExecuteEvent(cmdInfo CommandInfo) Event
- func CreateNamespaceEvent(cmdInfo CommandInfo) Event
- func CreateOpenEvent(err error) Event
- func CreateOrbEvent(cmdInfo CommandInfo) Event
- func CreatePolicyEvent(cmdInfo CommandInfo) Event
- func CreateRunnerInstanceEvent(cmdInfo CommandInfo, err error) Event
- func CreateRunnerResourceClassEvent(cmdInfo CommandInfo) Event
- func CreateRunnerTokenEvent(cmdInfo CommandInfo) Event
- func CreateSetupEvent(isServerCustomer bool) Event
- func CreateUpdateEvent(cmdInfo CommandInfo) Event
- func CreateVersionEvent(version string) Event
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Overwrite this function for tests CreateActiveTelemetry = newSegmentClient SegmentEndpoint = "http://localhost:33457" )
Functions ¶
func SendTelemetryApproval ¶
Sends the user's approval event
Types ¶
type Client ¶
type Client interface { io.Closer // Send a telemetry event. This method is not to be called directly. Use config.Track instead Track(event Event) error }
func CreateClient ¶
Create a telemetry client to be used to send telemetry events
func CreateFileTelemetry ¶
func CreateNullClient ¶
func CreateNullClient() Client
type CommandInfo ¶
func GetCommandInformation ¶
func GetCommandInformation(cmd *cobra.Command, getParent bool) CommandInfo
Utility function used when creating telemetry events. It takes a cobra Command and creates a telemetry.CommandInfo of it If getParent is true, puts both the command's args in `LocalArgs` and the parent's args Else only put the command's args Note: child flags overwrite parent flags with same name
type Event ¶
type Event struct { Object string `json:"object"` Action string `json:"action"` Properties map[string]interface{} `json:"properties"` }
A segment event to be sent to the telemetry Important: this is not meant to be constructed directly apart in tests If you want to create a new event, add its constructor in ./events.go
func CreateCompletionCommand ¶
func CreateCompletionCommand(cmdInfo CommandInfo) Event
func CreateConfigEvent ¶
func CreateConfigEvent(cmdInfo CommandInfo, err error) Event
func CreateDiagnosticEvent ¶
func CreateFollowEvent ¶
func CreateInfoEvent ¶
func CreateInfoEvent(cmdInfo CommandInfo, err error) Event
func CreateLocalExecuteEvent ¶
func CreateLocalExecuteEvent(cmdInfo CommandInfo) Event
func CreateNamespaceEvent ¶
func CreateNamespaceEvent(cmdInfo CommandInfo) Event
func CreateOpenEvent ¶
func CreateOrbEvent ¶
func CreateOrbEvent(cmdInfo CommandInfo) Event
func CreatePolicyEvent ¶
func CreatePolicyEvent(cmdInfo CommandInfo) Event
func CreateRunnerInstanceEvent ¶
func CreateRunnerInstanceEvent(cmdInfo CommandInfo, err error) Event
func CreateRunnerResourceClassEvent ¶
func CreateRunnerResourceClassEvent(cmdInfo CommandInfo) Event
func CreateRunnerTokenEvent ¶ added in v0.1.29041
func CreateRunnerTokenEvent(cmdInfo CommandInfo) Event
func CreateSetupEvent ¶
func CreateUpdateEvent ¶
func CreateUpdateEvent(cmdInfo CommandInfo) Event
func CreateVersionEvent ¶
Click to show internal directories.
Click to hide internal directories.