package keys
import "golang.org/x/tools/internal/event/keys"
Index ¶
- Variables
- func Join[S ~[]T, T ~string](s S) string
- type Error
- func NewError(name, description string) *Error
- func (k *Error) Append(buf []byte, l label.Label) []byte
- func (k *Error) Description() string
- func (k *Error) From(t label.Label) error
- func (k *Error) Get(lm label.Map) error
- func (k *Error) Name() string
- func (k *Error) Of(v error) label.Label
- type Float
- func NewFloat(name, description string) *Float
- func (k *Float) Append(buf []byte, l label.Label) []byte
- func (k *Float) Description() string
- func (k *Float) From(t label.Label) float64
- func (k *Float) Get(lm label.Map) float64
- func (k *Float) Name() string
- func (k *Float) Of(v float64) label.Label
- type Int
- func NewInt(name, description string) *Int
- func (k *Int) Append(buf []byte, l label.Label) []byte
- func (k *Int) Description() string
- func (k *Int) From(t label.Label) int64
- func (k *Int) Get(lm label.Map) int64
- func (k *Int) Name() string
- func (k *Int) Of(v int) label.Label
- func (k *Int) Of64(v int64) label.Label
- type String
- func NewString(name, description string) *String
- func (k *String) Append(buf []byte, l label.Label) []byte
- func (k *String) Description() string
- func (k *String) From(t label.Label) string
- func (k *String) Get(lm label.Map) string
- func (k *String) Name() string
- func (k *String) Of(v string) label.Label
- type Tag
- func NewTag(name, description string) *Tag
- func (k *Tag) Append(buf []byte, l label.Label) []byte
- func (k *Tag) Description() string
- func (k *Tag) Name() string
- func (k *Tag) New() label.Label
- type Uint
- func NewUint(name, description string) *Uint
- func (k *Uint) Append(buf []byte, l label.Label) []byte
- func (k *Uint) Description() string
- func (k *Uint) From(t label.Label) uint64
- func (k *Uint) Get(lm label.Map) uint64
- func (k *Uint) Name() string
- func (k *Uint) Of(v uint64) label.Label
- type Value
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") )
Functions ¶
func Join ¶
Join returns a canonical join of the keys in S: a sorted comma-separated string list.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a key
func NewError ¶
NewError returns a new label.Key for error values.
func (*Error) Append ¶
func (*Error) Description ¶
func (*Error) From ¶
From returns the value of a Label.
func (*Error) Get ¶
Get returns the label for the key of a label.Map.
func (*Error) Name ¶
func (*Error) Of ¶
Of returns a new Label with this key and the supplied value.
type Float ¶
type Float struct {
// contains filtered or unexported fields
}
Float is a label.Key for floating-point values.
func NewFloat ¶
NewFloat creates a new label.Key for floating-point values.
func (*Float) Append ¶
func (*Float) Description ¶
func (*Float) From ¶
From returns the value of a Label.
func (*Float) Get ¶
Get returns the label for the key of a label.Map.
func (*Float) Name ¶
func (*Float) Of ¶
Of creates a new Label with this key and the supplied value.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int is a label.Key for signed integers.
func NewInt ¶
NewInt returns a new label.Key for int64 values.
func (*Int) Append ¶
func (*Int) Description ¶
func (*Int) From ¶
From returns the value of a Label.
func (*Int) Get ¶
Get returns the label for the key of a label.Map.
func (*Int) Name ¶
func (*Int) Of ¶
Of creates a new Label with this key and the supplied value.
func (*Int) Of64 ¶
Of64 creates a new Label with this key and the supplied value.
type String ¶
type String struct {
// contains filtered or unexported fields
}
String represents a key
func NewString ¶
NewString creates a new Key for int64 values.
func (*String) Append ¶
func (*String) Description ¶
func (*String) From ¶
From returns the value of a Label.
func (*String) Get ¶
Get returns the label for the key of a label.Map.
func (*String) Name ¶
func (*String) Of ¶
Of creates a new Label with this key and the supplied value.
type Tag ¶
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 ¶
NewTag creates a new label.Key for tagging labels.
func (*Tag) Append ¶
func (*Tag) Description ¶
func (*Tag) Name ¶
func (*Tag) New ¶
New creates a new Label with this key.
type Uint ¶
type Uint struct {
// contains filtered or unexported fields
}
Uint is a label.Key for unsigned integers.
func NewUint ¶
NewUint creates a new label.Key for unsigned values.
func (*Uint) Append ¶
func (*Uint) Description ¶
func (*Uint) From ¶
From returns the value of a Label.
func (*Uint) Get ¶
Get returns the label for the key of a label.Map.
func (*Uint) Name ¶
func (*Uint) Of ¶
Of creates a new Label with this key and the supplied value.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is a label.Key for untyped values.
func New ¶
New creates a new Key for untyped values.
func (*Value) Append ¶
func (*Value) Description ¶
func (*Value) From ¶
From returns the value of a Label.
func (*Value) Get ¶
Get returns the label for the key of a label.Map.
func (*Value) Name ¶
func (*Value) Of ¶
Of creates a new Label with this key and the supplied value.
Source Files ¶
keys.go standard.go util.go
- Version
- v0.43.0
- Published
- Mar 12, 2026
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 3 hours ago –
Tools for package owners.