metrics

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 10 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`

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