package keys
import "cuelang.org/go/internal/golangorgx/tools/event/keys"
Index ¶
- Variables
- func Join[S ~[]T, T ~string](s S) string
- type Boolean
- func NewBoolean(name, description string) *Boolean
- func (k *Boolean) Description() string
- func (k *Boolean) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Boolean) From(t label.Label) bool
- func (k *Boolean) Get(lm label.Map) bool
- func (k *Boolean) Name() string
- func (k *Boolean) Of(v bool) label.Label
- type Error
- func NewError(name, description string) *Error
- func (k *Error) Description() string
- func (k *Error) Format(w io.Writer, buf []byte, l label.Label)
- 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 Float32
- func NewFloat32(name, description string) *Float32
- func (k *Float32) Description() string
- func (k *Float32) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Float32) From(t label.Label) float32
- func (k *Float32) Get(lm label.Map) float32
- func (k *Float32) Name() string
- func (k *Float32) Of(v float32) label.Label
- type Float64
- func NewFloat64(name, description string) *Float64
- func (k *Float64) Description() string
- func (k *Float64) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Float64) From(t label.Label) float64
- func (k *Float64) Get(lm label.Map) float64
- func (k *Float64) Name() string
- func (k *Float64) Of(v float64) label.Label
- type Int
- func NewInt(name, description string) *Int
- func (k *Int) Description() string
- func (k *Int) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Int) From(t label.Label) int
- func (k *Int) Get(lm label.Map) int
- func (k *Int) Name() string
- func (k *Int) Of(v int) label.Label
- type Int16
- func NewInt16(name, description string) *Int16
- func (k *Int16) Description() string
- func (k *Int16) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Int16) From(t label.Label) int16
- func (k *Int16) Get(lm label.Map) int16
- func (k *Int16) Name() string
- func (k *Int16) Of(v int16) label.Label
- type Int32
- func NewInt32(name, description string) *Int32
- func (k *Int32) Description() string
- func (k *Int32) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Int32) From(t label.Label) int32
- func (k *Int32) Get(lm label.Map) int32
- func (k *Int32) Name() string
- func (k *Int32) Of(v int32) label.Label
- type Int64
- func NewInt64(name, description string) *Int64
- func (k *Int64) Description() string
- func (k *Int64) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Int64) From(t label.Label) int64
- func (k *Int64) Get(lm label.Map) int64
- func (k *Int64) Name() string
- func (k *Int64) Of(v int64) label.Label
- type Int8
- func NewInt8(name, description string) *Int8
- func (k *Int8) Description() string
- func (k *Int8) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Int8) From(t label.Label) int8
- func (k *Int8) Get(lm label.Map) int8
- func (k *Int8) Name() string
- func (k *Int8) Of(v int8) label.Label
- type String
- func NewString(name, description string) *String
- func (k *String) Description() string
- func (k *String) Format(w io.Writer, buf []byte, l label.Label)
- 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) Description() string
- func (k *Tag) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Tag) Name() string
- func (k *Tag) New() label.Label
- type UInt
- func NewUInt(name, description string) *UInt
- func (k *UInt) Description() string
- func (k *UInt) Format(w io.Writer, buf []byte, l label.Label)
- func (k *UInt) From(t label.Label) uint
- func (k *UInt) Get(lm label.Map) uint
- func (k *UInt) Name() string
- func (k *UInt) Of(v uint) label.Label
- type UInt16
- func NewUInt16(name, description string) *UInt16
- func (k *UInt16) Description() string
- func (k *UInt16) Format(w io.Writer, buf []byte, l label.Label)
- func (k *UInt16) From(t label.Label) uint16
- func (k *UInt16) Get(lm label.Map) uint16
- func (k *UInt16) Name() string
- func (k *UInt16) Of(v uint16) label.Label
- type UInt32
- func NewUInt32(name, description string) *UInt32
- func (k *UInt32) Description() string
- func (k *UInt32) Format(w io.Writer, buf []byte, l label.Label)
- func (k *UInt32) From(t label.Label) uint32
- func (k *UInt32) Get(lm label.Map) uint32
- func (k *UInt32) Name() string
- func (k *UInt32) Of(v uint32) label.Label
- type UInt64
- func NewUInt64(name, description string) *UInt64
- func (k *UInt64) Description() string
- func (k *UInt64) Format(w io.Writer, buf []byte, l label.Label)
- func (k *UInt64) From(t label.Label) uint64
- func (k *UInt64) Get(lm label.Map) uint64
- func (k *UInt64) Name() string
- func (k *UInt64) Of(v uint64) label.Label
- type UInt8
- func NewUInt8(name, description string) *UInt8
- func (k *UInt8) Description() string
- func (k *UInt8) Format(w io.Writer, buf []byte, l label.Label)
- func (k *UInt8) From(t label.Label) uint8
- func (k *UInt8) Get(lm label.Map) uint8
- func (k *UInt8) Name() string
- func (k *UInt8) Of(v uint8) label.Label
- type Value
- func New(name, description string) *Value
- func (k *Value) Description() string
- func (k *Value) Format(w io.Writer, buf []byte, l label.Label)
- func (k *Value) From(t label.Label) interface{}
- func (k *Value) Get(lm label.Map) interface{}
- func (k *Value) Name() string
- func (k *Value) Of(value interface{}) label.Label
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 Boolean ¶
type Boolean struct {
// contains filtered or unexported fields
}
Boolean represents a key
func NewBoolean ¶
NewBoolean creates a new Key for bool values.
func (*Boolean) Description ¶
func (*Boolean) Format ¶
func (*Boolean) From ¶
From can be used to get a value from a Label.
func (*Boolean) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Boolean) Name ¶
func (*Boolean) Of ¶
Of creates a new Label with this key and the supplied value.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents a key
func NewError ¶
NewError creates a new Key for int64 values.
func (*Error) Description ¶
func (*Error) Format ¶
func (*Error) From ¶
From can be used to get a value from a Label.
func (*Error) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Error) Name ¶
func (*Error) Of ¶
Of creates a new Label with this key and the supplied value.
type Float32 ¶
type Float32 struct {
// contains filtered or unexported fields
}
Float32 represents a key
func NewFloat32 ¶
NewFloat32 creates a new Key for float32 values.
func (*Float32) Description ¶
func (*Float32) Format ¶
func (*Float32) From ¶
From can be used to get a value from a Label.
func (*Float32) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Float32) Name ¶
func (*Float32) Of ¶
Of creates a new Label with this key and the supplied value.
type Float64 ¶
type Float64 struct {
// contains filtered or unexported fields
}
Float64 represents a key
func NewFloat64 ¶
NewFloat64 creates a new Key for int64 values.
func (*Float64) Description ¶
func (*Float64) Format ¶
func (*Float64) From ¶
From can be used to get a value from a Label.
func (*Float64) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Float64) Name ¶
func (*Float64) Of ¶
Of creates a new Label with this key and the supplied value.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int represents a key
func NewInt ¶
NewInt creates a new Key for int values.
func (*Int) Description ¶
func (*Int) Format ¶
func (*Int) From ¶
From can be used to get a value from a Label.
func (*Int) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Int) Name ¶
func (*Int) Of ¶
Of creates a new Label with this key and the supplied value.
type Int16 ¶
type Int16 struct {
// contains filtered or unexported fields
}
Int16 represents a key
func NewInt16 ¶
NewInt16 creates a new Key for int16 values.
func (*Int16) Description ¶
func (*Int16) Format ¶
func (*Int16) From ¶
From can be used to get a value from a Label.
func (*Int16) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Int16) Name ¶
func (*Int16) Of ¶
Of creates a new Label with this key and the supplied value.
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
Int32 represents a key
func NewInt32 ¶
NewInt32 creates a new Key for int32 values.
func (*Int32) Description ¶
func (*Int32) Format ¶
func (*Int32) From ¶
From can be used to get a value from a Label.
func (*Int32) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Int32) Name ¶
func (*Int32) Of ¶
Of creates a new Label with this key and the supplied value.
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
Int64 represents a key
func NewInt64 ¶
NewInt64 creates a new Key for int64 values.
func (*Int64) Description ¶
func (*Int64) Format ¶
func (*Int64) From ¶
From can be used to get a value from a Label.
func (*Int64) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Int64) Name ¶
func (*Int64) Of ¶
Of creates a new Label with this key and the supplied value.
type Int8 ¶
type Int8 struct {
// contains filtered or unexported fields
}
Int8 represents a key
func NewInt8 ¶
NewInt8 creates a new Key for int8 values.
func (*Int8) Description ¶
func (*Int8) Format ¶
func (*Int8) From ¶
From can be used to get a value from a Label.
func (*Int8) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*Int8) Name ¶
func (*Int8) Of ¶
Of 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) Description ¶
func (*String) Format ¶
func (*String) From ¶
From can be used to get a value from a Label.
func (*String) Get ¶
Get can be used to get a label for the key from 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 Key for tagging labels.
func (*Tag) Description ¶
func (*Tag) Format ¶
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 represents a key
func NewUInt ¶
NewUInt creates a new Key for uint values.
func (*UInt) Description ¶
func (*UInt) Format ¶
func (*UInt) From ¶
From can be used to get a value from a Label.
func (*UInt) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*UInt) Name ¶
func (*UInt) Of ¶
Of creates a new Label with this key and the supplied value.
type UInt16 ¶
type UInt16 struct {
// contains filtered or unexported fields
}
UInt16 represents a key
func NewUInt16 ¶
NewUInt16 creates a new Key for uint16 values.
func (*UInt16) Description ¶
func (*UInt16) Format ¶
func (*UInt16) From ¶
From can be used to get a value from a Label.
func (*UInt16) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*UInt16) Name ¶
func (*UInt16) Of ¶
Of creates a new Label with this key and the supplied value.
type UInt32 ¶
type UInt32 struct {
// contains filtered or unexported fields
}
UInt32 represents a key
func NewUInt32 ¶
NewUInt32 creates a new Key for uint32 values.
func (*UInt32) Description ¶
func (*UInt32) Format ¶
func (*UInt32) From ¶
From can be used to get a value from a Label.
func (*UInt32) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*UInt32) Name ¶
func (*UInt32) Of ¶
Of creates a new Label with this key and the supplied value.
type UInt64 ¶
type UInt64 struct {
// contains filtered or unexported fields
}
UInt64 represents a key
func NewUInt64 ¶
NewUInt64 creates a new Key for uint64 values.
func (*UInt64) Description ¶
func (*UInt64) Format ¶
func (*UInt64) From ¶
From can be used to get a value from a Label.
func (*UInt64) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*UInt64) Name ¶
func (*UInt64) Of ¶
Of creates a new Label with this key and the supplied value.
type UInt8 ¶
type UInt8 struct {
// contains filtered or unexported fields
}
UInt8 represents a key
func NewUInt8 ¶
NewUInt8 creates a new Key for uint8 values.
func (*UInt8) Description ¶
func (*UInt8) Format ¶
func (*UInt8) From ¶
From can be used to get a value from a Label.
func (*UInt8) Get ¶
Get can be used to get a label for the key from a label.Map.
func (*UInt8) Name ¶
func (*UInt8) Of ¶
Of creates a new Label with this key and the supplied value.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value represents a key for untyped values.
func New ¶
New creates a new Key for untyped values.
func (*Value) Description ¶
func (*Value) Format ¶
func (*Value) From ¶
From can be used to get a value from a Label.
func (*Value) Get ¶
Get can be used to get a label for the key from 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.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 8 hours ago –
Tools for package owners.