Involved Source Files
Package resource provides functionality for resource, which capture
identifying information about the entities for which signals are exported.
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Detector attempts to detect resource information.
If the detector cannot find resource information, the returned resource is nil but no
error is returned.
An error is only returned on unexpected failures.
func MultiDetector(detectors ...Detector) Detector
func MultiDetector(detectors ...Detector) Detector
func detectAll(ctx context.Context, detectors ...Detector) (*Resource, error)
Package-Level Functions (total 6, in which 4 are exported)
DecodeLabels decodes a serialized label map as used in the OC_RESOURCE_LABELS variable.
A list of labels of the form `<key1>="<value1>",<key2>="<value2>",...` is accepted.
Domain names and paths are accepted as label keys.
Most users will want to use FromEnv instead.
EncodeLabels encodes a labels map to a string as provided via the OC_RESOURCE_LABELS environment variable.
FromEnv is a detector that loads resource information from the OC_RESOURCE_TYPE
and OC_RESOURCE_labelS environment variables.
MultiDetector returns a Detector that calls all input detectors in order and
merges each result with the previous one. In case a type of label key is already set,
the first set value is takes precedence.
It returns on the first error that a sub-detector encounters.
detectall calls all input detectors sequentially an merges each result with the previous one.
It returns on the first error that a sub-detector encounters.
merge resource information from b into a. In case of a collision, a takes precedence.
Package-Level Variables (only one, which is unexported)
Package-Level Constants (total 2, both are exported)
Environment variables used by FromEnv to decode a resource.
Environment variables used by FromEnv to decode a resource.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.