tools: golang.org/x/tools/internal/event/keys Index | Files

package keys

import "golang.org/x/tools/internal/event/keys"

Index

Package Files

keys.go standard.go

Variables

var (
    // Msg is a key used to add message strings to label lists.
    Msg = NewString("message", "a readable message")
    // Label is a key used to indicate an event adds labels to the context.
    Label = NewTag("label", "a label context marker")
    // Start is used for things like traces that have a name.
    Start = NewString("start", "span start")
    // Metric is a key used to indicate an event records metrics.
    End = NewTag("end", "a span end marker")
    // Metric is a key used to indicate an event records metrics.
    Detach = NewTag("detach", "a span detach marker")
    // Err is a key used to add error values to label lists.
    Err = NewError("error", "an error that occurred")
    // Metric is a key used to indicate an event records metrics.
    Metric = NewTag("metric", "a metric event marker")
)

type Boolean Uses

type Boolean struct {
    // contains filtered or unexported fields
}

Boolean represents a key

func NewBoolean Uses

func NewBoolean(name, description string) *Boolean

NewBoolean creates a new Key for bool values.

func (*Boolean) Description Uses

func (k *Boolean) Description() string

func (*Boolean) Format Uses

func (k *Boolean) Format(w io.Writer, buf []byte, l label.Label)

func (*Boolean) From Uses

func (k *Boolean) From(t label.Label) bool

From can be used to get a value from a Label.

func (*Boolean) Get Uses

func (k *Boolean) Get(lm label.Map) bool

Get can be used to get a label for the key from a label.Map.

func (*Boolean) Name Uses

func (k *Boolean) Name() string

func (*Boolean) Of Uses

func (k *Boolean) Of(v bool) label.Label

Of creates a new Label with this key and the supplied value.

type Error Uses

type Error struct {
    // contains filtered or unexported fields
}

Error represents a key

func NewError Uses

func NewError(name, description string) *Error

NewError creates a new Key for int64 values.

func (*Error) Description Uses

func (k *Error) Description() string

func (*Error) Format Uses

func (k *Error) Format(w io.Writer, buf []byte, l label.Label)

func (*Error) From Uses

func (k *Error) From(t label.Label) error

From can be used to get a value from a Label.

func (*Error) Get Uses

func (k *Error) Get(lm label.Map) error

Get can be used to get a label for the key from a label.Map.

func (*Error) Name Uses

func (k *Error) Name() string

func (*Error) Of Uses

func (k *Error) Of(v error) label.Label

Of creates a new Label with this key and the supplied value.

type Float32 Uses

type Float32 struct {
    // contains filtered or unexported fields
}

Float32 represents a key

func NewFloat32 Uses

func NewFloat32(name, description string) *Float32

NewFloat32 creates a new Key for float32 values.

func (*Float32) Description Uses

func (k *Float32) Description() string

func (*Float32) Format Uses

func (k *Float32) Format(w io.Writer, buf []byte, l label.Label)

func (*Float32) From Uses

func (k *Float32) From(t label.Label) float32

From can be used to get a value from a Label.

func (*Float32) Get Uses

func (k *Float32) Get(lm label.Map) float32

Get can be used to get a label for the key from a label.Map.

func (*Float32) Name Uses

func (k *Float32) Name() string

func (*Float32) Of Uses

func (k *Float32) Of(v float32) label.Label

Of creates a new Label with this key and the supplied value.

type Float64 Uses

type Float64 struct {
    // contains filtered or unexported fields
}

Float64 represents a key

func NewFloat64 Uses

func NewFloat64(name, description string) *Float64

NewFloat64 creates a new Key for int64 values.

func (*Float64) Description Uses

func (k *Float64) Description() string

func (*Float64) Format Uses

func (k *Float64) Format(w io.Writer, buf []byte, l label.Label)

func (*Float64) From Uses

func (k *Float64) From(t label.Label) float64

From can be used to get a value from a Label.

func (*Float64) Get Uses

func (k *Float64) Get(lm label.Map) float64

Get can be used to get a label for the key from a label.Map.

func (*Float64) Name Uses

func (k *Float64) Name() string

func (*Float64) Of Uses

func (k *Float64) Of(v float64) label.Label

Of creates a new Label with this key and the supplied value.

type Int Uses

type Int struct {
    // contains filtered or unexported fields
}

Int represents a key

func NewInt Uses

func NewInt(name, description string) *Int

NewInt creates a new Key for int values.

func (*Int) Description Uses

func (k *Int) Description() string

func (*Int) Format Uses

func (k *Int) Format(w io.Writer, buf []byte, l label.Label)

func (*Int) From Uses

func (k *Int) From(t label.Label) int

From can be used to get a value from a Label.

func (*Int) Get Uses

func (k *Int) Get(lm label.Map) int

Get can be used to get a label for the key from a label.Map.

func (*Int) Name Uses

func (k *Int) Name() string

func (*Int) Of Uses

func (k *Int) Of(v int) label.Label

Of creates a new Label with this key and the supplied value.

type Int16 Uses

type Int16 struct {
    // contains filtered or unexported fields
}

Int16 represents a key

func NewInt16 Uses

func NewInt16(name, description string) *Int16

NewInt16 creates a new Key for int16 values.

func (*Int16) Description Uses

func (k *Int16) Description() string

func (*Int16) Format Uses

func (k *Int16) Format(w io.Writer, buf []byte, l label.Label)

func (*Int16) From Uses

func (k *Int16) From(t label.Label) int16

From can be used to get a value from a Label.

func (*Int16) Get Uses

func (k *Int16) Get(lm label.Map) int16

Get can be used to get a label for the key from a label.Map.

func (*Int16) Name Uses

func (k *Int16) Name() string

func (*Int16) Of Uses

func (k *Int16) Of(v int16) label.Label

Of creates a new Label with this key and the supplied value.

type Int32 Uses

type Int32 struct {
    // contains filtered or unexported fields
}

Int32 represents a key

func NewInt32 Uses

func NewInt32(name, description string) *Int32

NewInt32 creates a new Key for int32 values.

func (*Int32) Description Uses

func (k *Int32) Description() string

func (*Int32) Format Uses

func (k *Int32) Format(w io.Writer, buf []byte, l label.Label)

func (*Int32) From Uses

func (k *Int32) From(t label.Label) int32

From can be used to get a value from a Label.

func (*Int32) Get Uses

func (k *Int32) Get(lm label.Map) int32

Get can be used to get a label for the key from a label.Map.

func (*Int32) Name Uses

func (k *Int32) Name() string

func (*Int32) Of Uses

func (k *Int32) Of(v int32) label.Label

Of creates a new Label with this key and the supplied value.

type Int64 Uses

type Int64 struct {
    // contains filtered or unexported fields
}

Int64 represents a key

func NewInt64 Uses

func NewInt64(name, description string) *Int64

NewInt64 creates a new Key for int64 values.

func (*Int64) Description Uses

func (k *Int64) Description() string

func (*Int64) Format Uses

func (k *Int64) Format(w io.Writer, buf []byte, l label.Label)

func (*Int64) From Uses

func (k *Int64) From(t label.Label) int64

From can be used to get a value from a Label.

func (*Int64) Get Uses

func (k *Int64) Get(lm label.Map) int64

Get can be used to get a label for the key from a label.Map.

func (*Int64) Name Uses

func (k *Int64) Name() string

func (*Int64) Of Uses

func (k *Int64) Of(v int64) label.Label

Of creates a new Label with this key and the supplied value.

type Int8 Uses

type Int8 struct {
    // contains filtered or unexported fields
}

Int8 represents a key

func NewInt8 Uses

func NewInt8(name, description string) *Int8

NewInt8 creates a new Key for int8 values.

func (*Int8) Description Uses

func (k *Int8) Description() string

func (*Int8) Format Uses

func (k *Int8) Format(w io.Writer, buf []byte, l label.Label)

func (*Int8) From Uses

func (k *Int8) From(t label.Label) int8

From can be used to get a value from a Label.

func (*Int8) Get Uses

func (k *Int8) Get(lm label.Map) int8

Get can be used to get a label for the key from a label.Map.

func (*Int8) Name Uses

func (k *Int8) Name() string

func (*Int8) Of Uses

func (k *Int8) Of(v int8) label.Label

Of creates a new Label with this key and the supplied value.

type String Uses

type String struct {
    // contains filtered or unexported fields
}

String represents a key

func NewString Uses

func NewString(name, description string) *String

NewString creates a new Key for int64 values.

func (*String) Description Uses

func (k *String) Description() string

func (*String) Format Uses

func (k *String) Format(w io.Writer, buf []byte, l label.Label)

func (*String) From Uses

func (k *String) From(t label.Label) string

From can be used to get a value from a Label.

func (*String) Get Uses

func (k *String) Get(lm label.Map) string

Get can be used to get a label for the key from a label.Map.

func (*String) Name Uses

func (k *String) Name() string

func (*String) Of Uses

func (k *String) Of(v string) label.Label

Of creates a new Label with this key and the supplied value.

type Tag Uses

type Tag struct {
    // contains filtered or unexported fields
}

Tag represents a key for tagging labels that have no value. These are used when the existence of the label is the entire information it carries, such as marking events to be of a specific kind, or from a specific package.

func NewTag Uses

func NewTag(name, description string) *Tag

NewTag creates a new Key for tagging labels.

func (*Tag) Description Uses

func (k *Tag) Description() string

func (*Tag) Format Uses

func (k *Tag) Format(w io.Writer, buf []byte, l label.Label)

func (*Tag) Name Uses

func (k *Tag) Name() string

func (*Tag) New Uses

func (k *Tag) New() label.Label

New creates a new Label with this key.

type UInt Uses

type UInt struct {
    // contains filtered or unexported fields
}

UInt represents a key

func NewUInt Uses

func NewUInt(name, description string) *UInt

NewUInt creates a new Key for uint values.

func (*UInt) Description Uses

func (k *UInt) Description() string

func (*UInt) Format Uses

func (k *UInt) Format(w io.Writer, buf []byte, l label.Label)

func (*UInt) From Uses

func (k *UInt) From(t label.Label) uint

From can be used to get a value from a Label.

func (*UInt) Get Uses

func (k *UInt) Get(lm label.Map) uint

Get can be used to get a label for the key from a label.Map.

func (*UInt) Name Uses

func (k *UInt) Name() string

func (*UInt) Of Uses

func (k *UInt) Of(v uint) label.Label

Of creates a new Label with this key and the supplied value.

type UInt16 Uses

type UInt16 struct {
    // contains filtered or unexported fields
}

UInt16 represents a key

func NewUInt16 Uses

func NewUInt16(name, description string) *UInt16

NewUInt16 creates a new Key for uint16 values.

func (*UInt16) Description Uses

func (k *UInt16) Description() string

func (*UInt16) Format Uses

func (k *UInt16) Format(w io.Writer, buf []byte, l label.Label)

func (*UInt16) From Uses

func (k *UInt16) From(t label.Label) uint16

From can be used to get a value from a Label.

func (*UInt16) Get Uses

func (k *UInt16) Get(lm label.Map) uint16

Get can be used to get a label for the key from a label.Map.

func (*UInt16) Name Uses

func (k *UInt16) Name() string

func (*UInt16) Of Uses

func (k *UInt16) Of(v uint16) label.Label

Of creates a new Label with this key and the supplied value.

type UInt32 Uses

type UInt32 struct {
    // contains filtered or unexported fields
}

UInt32 represents a key

func NewUInt32 Uses

func NewUInt32(name, description string) *UInt32

NewUInt32 creates a new Key for uint32 values.

func (*UInt32) Description Uses

func (k *UInt32) Description() string

func (*UInt32) Format Uses

func (k *UInt32) Format(w io.Writer, buf []byte, l label.Label)

func (*UInt32) From Uses

func (k *UInt32) From(t label.Label) uint32

From can be used to get a value from a Label.

func (*UInt32) Get Uses

func (k *UInt32) Get(lm label.Map) uint32

Get can be used to get a label for the key from a label.Map.

func (*UInt32) Name Uses

func (k *UInt32) Name() string

func (*UInt32) Of Uses

func (k *UInt32) Of(v uint32) label.Label

Of creates a new Label with this key and the supplied value.

type UInt64 Uses

type UInt64 struct {
    // contains filtered or unexported fields
}

UInt64 represents a key

func NewUInt64 Uses

func NewUInt64(name, description string) *UInt64

NewUInt64 creates a new Key for uint64 values.

func (*UInt64) Description Uses

func (k *UInt64) Description() string

func (*UInt64) Format Uses

func (k *UInt64) Format(w io.Writer, buf []byte, l label.Label)

func (*UInt64) From Uses

func (k *UInt64) From(t label.Label) uint64

From can be used to get a value from a Label.

func (*UInt64) Get Uses

func (k *UInt64) Get(lm label.Map) uint64

Get can be used to get a label for the key from a label.Map.

func (*UInt64) Name Uses

func (k *UInt64) Name() string

func (*UInt64) Of Uses

func (k *UInt64) Of(v uint64) label.Label

Of creates a new Label with this key and the supplied value.

type UInt8 Uses

type UInt8 struct {
    // contains filtered or unexported fields
}

UInt8 represents a key

func NewUInt8 Uses

func NewUInt8(name, description string) *UInt8

NewUInt8 creates a new Key for uint8 values.

func (*UInt8) Description Uses

func (k *UInt8) Description() string

func (*UInt8) Format Uses

func (k *UInt8) Format(w io.Writer, buf []byte, l label.Label)

func (*UInt8) From Uses

func (k *UInt8) From(t label.Label) uint8

From can be used to get a value from a Label.

func (*UInt8) Get Uses

func (k *UInt8) Get(lm label.Map) uint8

Get can be used to get a label for the key from a label.Map.

func (*UInt8) Name Uses

func (k *UInt8) Name() string

func (*UInt8) Of Uses

func (k *UInt8) Of(v uint8) label.Label

Of creates a new Label with this key and the supplied value.

type Value Uses

type Value struct {
    // contains filtered or unexported fields
}

Value represents a key for untyped values.

func New Uses

func New(name, description string) *Value

New creates a new Key for untyped values.

func (*Value) Description Uses

func (k *Value) Description() string

func (*Value) Format Uses

func (k *Value) Format(w io.Writer, buf []byte, l label.Label)

func (*Value) From Uses

func (k *Value) From(t label.Label) interface{}

From can be used to get a value from a Label.

func (*Value) Get Uses

func (k *Value) Get(lm label.Map) interface{}

Get can be used to get a label for the key from a label.Map.

func (*Value) Name Uses

func (k *Value) Name() string

func (*Value) Of Uses

func (k *Value) Of(value interface{}) label.Label

Of creates a new Label with this key and the supplied value.

Package keys imports 5 packages (graph) and is imported by 9 packages. Updated 2020-07-16. Refresh now. Tools for package owners.