counter

Imports

Imports #

"flag"
"os"
"golang.org/x/telemetry/counter"
"flag"

Constants & Variables

openCalled var #

var openCalled bool

Structs

dummyCounter struct #

type dummyCounter struct {

}

Functions

CountFlagValue function #

func CountFlagValue(prefix string, flagSet flag.FlagSet, flagName string)

CountFlagValue function #

CountFlagValue creates a counter for the flag value if it is set and increments the counter. The name of the counter is the concatenation of prefix, the flagName, ":", and value.String() for the flag's value.

func CountFlagValue(prefix string, flagSet flag.FlagSet, flagName string)

CountFlags function #

CountFlags creates a counter for every flag that is set and increments the counter. The name of the counter is the concatenation of prefix and the flag name.

func CountFlags(prefix string, flagSet flag.FlagSet)

CountFlags function #

func CountFlags(name string, flagSet flag.FlagSet)

Inc function #

func Inc(name string)

Inc method #

func (dc dummyCounter) Inc()

Inc function #

Inc increments the counter with the given name.

func Inc(name string)

New function #

New returns a counter with the given name.

func New(name string) *counter.Counter

New function #

func New(name string) dummyCounter

NewStack function #

NewStack returns a new stack counter with the given name and depth.

func NewStack(name string, depth int) *counter.StackCounter

NewStack function #

func NewStack(name string, depth int) dummyCounter

Open function #

func Open()

Open function #

Open opens the counter files for writing if telemetry is supported on the current platform (and does nothing otherwise).

func Open()

OpenCalled function #

func OpenCalled() bool

Generated with Arrow