mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-23 11:48:04 +08:00
vendor: github.com/moby/buildkit v0.13.0-rc2
full diff: https://github.com/moby/buildkit/compare/8e3fe35738c2...v0.13.0-rc2 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
generated
vendored
@@ -21,12 +21,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
ErrPartialResource = errors.New("partial resource")
|
||||
)
|
||||
// ErrPartialResource is returned by a detector when complete source
|
||||
// information for a Resource is unavailable or the source information
|
||||
// contains invalid values that are omitted from the returned Resource.
|
||||
var ErrPartialResource = errors.New("partial resource")
|
||||
|
||||
// Detector detects OpenTelemetry resource information.
|
||||
type Detector interface {
|
||||
|
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
10
vendor/go.opentelemetry.io/otel/sdk/resource/env.go
generated
vendored
@@ -28,16 +28,14 @@ import (
|
||||
|
||||
const (
|
||||
// resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from.
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES"
|
||||
resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials
|
||||
|
||||
// svcNameKey is the environment variable name that Service Name information will be read from.
|
||||
svcNameKey = "OTEL_SERVICE_NAME"
|
||||
)
|
||||
|
||||
var (
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
)
|
||||
// errMissingValue is returned when a resource value is missing.
|
||||
var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
|
||||
|
||||
// fromEnv is a Detector that implements the Detector and collects
|
||||
// resources from environment. This Detector is included as a
|
||||
@@ -91,7 +89,7 @@ func constructOTResources(s string) (*Resource, error) {
|
||||
continue
|
||||
}
|
||||
key := strings.TrimSpace(k)
|
||||
val, err := url.QueryUnescape(strings.TrimSpace(v))
|
||||
val, err := url.PathUnescape(strings.TrimSpace(v))
|
||||
if err != nil {
|
||||
// Retain original value if decoding fails, otherwise it will be
|
||||
// an empty string.
|
||||
|
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
7
vendor/go.opentelemetry.io/otel/sdk/resource/os.go
generated
vendored
@@ -36,8 +36,10 @@ func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) {
|
||||
osDescription = osDescriptionProvider
|
||||
}
|
||||
|
||||
type osTypeDetector struct{}
|
||||
type osDescriptionDetector struct{}
|
||||
type (
|
||||
osTypeDetector struct{}
|
||||
osDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the operating system type the
|
||||
// service is running on.
|
||||
@@ -56,7 +58,6 @@ func (osTypeDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
// service is running on.
|
||||
func (osDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
|
||||
description, err := osDescription()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
36
vendor/go.opentelemetry.io/otel/sdk/resource/process.go
generated
vendored
@@ -25,14 +25,16 @@ import (
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
|
||||
)
|
||||
|
||||
type pidProvider func() int
|
||||
type executablePathProvider func() (string, error)
|
||||
type commandArgsProvider func() []string
|
||||
type ownerProvider func() (*user.User, error)
|
||||
type runtimeNameProvider func() string
|
||||
type runtimeVersionProvider func() string
|
||||
type runtimeOSProvider func() string
|
||||
type runtimeArchProvider func() string
|
||||
type (
|
||||
pidProvider func() int
|
||||
executablePathProvider func() (string, error)
|
||||
commandArgsProvider func() []string
|
||||
ownerProvider func() (*user.User, error)
|
||||
runtimeNameProvider func() string
|
||||
runtimeVersionProvider func() string
|
||||
runtimeOSProvider func() string
|
||||
runtimeArchProvider func() string
|
||||
)
|
||||
|
||||
var (
|
||||
defaultPidProvider pidProvider = os.Getpid
|
||||
@@ -108,14 +110,16 @@ func setUserProviders(ownerProvider ownerProvider) {
|
||||
owner = ownerProvider
|
||||
}
|
||||
|
||||
type processPIDDetector struct{}
|
||||
type processExecutableNameDetector struct{}
|
||||
type processExecutablePathDetector struct{}
|
||||
type processCommandArgsDetector struct{}
|
||||
type processOwnerDetector struct{}
|
||||
type processRuntimeNameDetector struct{}
|
||||
type processRuntimeVersionDetector struct{}
|
||||
type processRuntimeDescriptionDetector struct{}
|
||||
type (
|
||||
processPIDDetector struct{}
|
||||
processExecutableNameDetector struct{}
|
||||
processExecutablePathDetector struct{}
|
||||
processCommandArgsDetector struct{}
|
||||
processOwnerDetector struct{}
|
||||
processRuntimeNameDetector struct{}
|
||||
processRuntimeVersionDetector struct{}
|
||||
processRuntimeDescriptionDetector struct{}
|
||||
)
|
||||
|
||||
// Detect returns a *Resource that describes the process identifier (PID) of the
|
||||
// executing process.
|
||||
|
Reference in New Issue
Block a user