metrics

package
v1.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLISource = "cli"

CLISource is sent for cli metrics

Functions

func GetCommand

func GetCommand(args []string) string

GetCommand get the invoked command

func HasQuietFlag added in v1.0.13

func HasQuietFlag(args []string) bool

HasQuietFlag returns true if one of the arguments is `--quiet` or `-q`

func Track

func Track(context string, args []string, status string)

Track sends the tracking analytics to Docker Desktop

Types

type Client

type Client interface {
	// Send sends the command to Docker Desktop. Note that the function doesn't
	// return anything, not even an error, this is because we don't really care
	// if the metrics were sent or not. We only fire and forget.
	Send(Command)
}

Client sends metrics to Docker Desktopn

func NewClient

func NewClient() Client

NewClient returns a new metrics client

type Command

type Command struct {
	Command string `json:"command"`
	Context string `json:"context"`
	Source  string `json:"source"`
	Status  string `json:"status"`
}

Command is a command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL