metrics

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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`

Types

type Client

type Client interface {
	// WithCliVersionFunc sets the docker cli version func
	// that returns the docker cli version (com.docker.cli)
	WithCliVersionFunc(f func() string)
	// 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)
	// Track sends the tracking analytics to Docker Desktop
	Track(context string, args []string, status string)
}

Client sends metrics to Docker Desktop

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