Documentation
¶
Overview ¶
Package resource provides a resource definition.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KindNames = map[Kind]string{ KindCPU: "cpu", KindMemory: "memory", KindSwap: "swap", KindStorage: "storage", KindEphemeralStorage: "ephemeral-storage", KindNetwork: "network", KindGPU: "gpu", KindTPU: "tpu", } )
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind uint8
Kind represents the kind of a resource
func (Kind) MarshalJSON ¶
MarshalJSON outputs the Kind as a json.
func (*Kind) UnmarshalJSON ¶
UnmarshalJSON parses Kind from json.
type Resource ¶
type Resource struct {
Name string `json:"name"`
Description string `json:"description"`
Kind Kind `json:"kind"`
Quantity Quantity `json:"quantity"`
Attributes types.Map[any] `json:"attributes"`
}
Resource is a struct that represents a resource for naming can be used semantic conventions (https://opentelemetry.io/docs/specs/semconv/)
type Unit ¶
type Unit uint8
Unit represents the unit of a resource
func (Unit) MarshalJSON ¶
MarshalJSON outputs the Unit as a json.
func (*Unit) UnmarshalJSON ¶
UnmarshalJSON parses Unit from json.
Click to show internal directories.
Click to hide internal directories.