From 3a37e6155e0ce555c6b0f348665e5ec075d671be Mon Sep 17 00:00:00 2001
From: Tonis Tiigi
Date: Wed, 26 Aug 2026 15:27:04 -0700
Subject: [PATCH] vendor: update buildkit to v0.33.0-rc1
Signed-off-by: Tonis Tiigi
---
go.mod | 104 +-
go.sum | 236 +-
tests/bake.go | 6 +-
tests/build.go | 14 +-
tests/compose.go | 4 +-
tests/policy_build.go | 2 +-
.../aws-sdk-go-v2/aws/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/aws/middleware/metadata.go | 17 +-
.../aws/signer/internal/v4/headers.go | 4 +
.../aws/transport/http/client.go | 27 +-
.../aws/aws-sdk-go-v2/config/CHANGELOG.md | 37 +
.../config/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/credentials/CHANGELOG.md | 37 +
.../endpointcreds/internal/client/client.go | 2 -
.../internal/client/middleware.go | 10 +-
.../credentials/go_module_metadata.go | 2 +-
.../feature/ec2/imds/CHANGELOG.md | 37 +
.../feature/ec2/imds/go_module_metadata.go | 2 +-
.../internal/configsources/CHANGELOG.md | 37 +
.../configsources/go_module_metadata.go | 2 +-
.../internal/endpoints/v2/CHANGELOG.md | 37 +
.../endpoints/v2/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/internal/v4a/CHANGELOG.md | 37 +
.../internal/v4a/go_module_metadata.go | 2 +-
.../internal/accept-encoding/CHANGELOG.md | 20 +
.../accept-encoding/go_module_metadata.go | 2 +-
.../internal/presigned-url/CHANGELOG.md | 37 +
.../presigned-url/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/service/signin/CHANGELOG.md | 37 +
.../service/signin/api_client.go | 50 +-
.../signin/api_op_CreateOAuth2Token.go | 13 -
.../signin/api_op_CreateOAuth2TokenWithIAM.go | 13 -
...DeleteConsoleAuthorizationConfiguration.go | 13 -
...pi_op_DeleteResourcePermissionStatement.go | 13 -
...op_GetConsoleAuthorizationConfiguration.go | 13 -
.../signin/api_op_GetResourcePolicy.go | 13 -
.../api_op_IntrospectOAuth2TokenWithIAM.go | 13 -
...api_op_ListResourcePermissionStatements.go | 13 -
...op_PutConsoleAuthorizationConfiguration.go | 13 -
.../api_op_PutResourcePermissionStatement.go | 13 -
.../signin/api_op_RevokeOAuth2TokenWithIAM.go | 13 -
.../service/signin/deserializers.go | 121 +-
.../service/signin/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/service/sso/CHANGELOG.md | 37 +
.../aws-sdk-go-v2/service/sso/api_client.go | 50 +-
.../service/sso/api_op_GetRoleCredentials.go | 13 -
.../service/sso/api_op_ListAccountRoles.go | 13 -
.../service/sso/api_op_ListAccounts.go | 13 -
.../service/sso/api_op_Logout.go | 13 -
.../service/sso/deserializers.go | 44 +-
.../service/sso/go_module_metadata.go | 2 +-
.../service/ssooidc/CHANGELOG.md | 37 +
.../service/ssooidc/api_client.go | 50 +-
.../service/ssooidc/api_op_CreateToken.go | 13 -
.../ssooidc/api_op_CreateTokenWithIAM.go | 13 -
.../service/ssooidc/api_op_RegisterClient.go | 13 -
.../api_op_StartDeviceAuthorization.go | 13 -
.../service/ssooidc/deserializers.go | 44 +-
.../service/ssooidc/go_module_metadata.go | 2 +-
.../aws-sdk-go-v2/service/sts/CHANGELOG.md | 37 +
.../aws-sdk-go-v2/service/sts/api_client.go | 50 +-
.../service/sts/api_op_AssumeRole.go | 13 -
.../service/sts/api_op_AssumeRoleWithSAML.go | 13 -
.../sts/api_op_AssumeRoleWithWebIdentity.go | 13 -
.../service/sts/api_op_AssumeRoot.go | 13 -
.../sts/api_op_DecodeAuthorizationMessage.go | 13 -
.../service/sts/api_op_GetAccessKeyInfo.go | 13 -
.../service/sts/api_op_GetCallerIdentity.go | 13 -
.../sts/api_op_GetDelegatedAccessToken.go | 13 -
.../service/sts/api_op_GetFederationToken.go | 13 -
.../service/sts/api_op_GetSessionToken.go | 13 -
.../service/sts/api_op_GetWebIdentityToken.go | 13 -
.../service/sts/deserializers.go | 121 +-
.../service/sts/go_module_metadata.go | 2 +-
vendor/github.com/aws/smithy-go/AGENTS.md | 5 +-
vendor/github.com/aws/smithy-go/CHANGELOG.md | 60 +
vendor/github.com/aws/smithy-go/README.md | 8 +-
.../aws/smithy-go/go_module_metadata.go | 2 +-
vendor/github.com/aws/smithy-go/schema.go | 36 +-
vendor/github.com/aws/smithy-go/schema_ext.go | 11 +-
.../smithy-go/transport/http/eventstream.go | 12 +-
.../http/middleware_close_response_body.go | 29 +
.../containerd/v2/version/version.go | 2 +-
.../platforms/platform_windows_compat.go | 25 +-
.../docker/cli/cli/command/registry.go | 19 +-
.../cli/cli/config/credentials/file_store.go | 43 +-
.../docker/cli/internal/prompt/prompt.go | 12 +-
.../felixge/httpsnoop/capture_metrics.go | 37 +-
.../felixge/httpsnoop/wrap_generated.go | 16179 ++++++++++++++++
.../httpsnoop/wrap_generated_gteq_1.8.go | 436 -
.../httpsnoop/wrap_generated_lt_1.8.go | 278 -
.../github.com/go-logr/logr/context_noslog.go | 1 -
.../github.com/go-logr/logr/context_slog.go | 1 -
vendor/github.com/go-logr/logr/funcr/funcr.go | 47 +-
.../github.com/go-logr/logr/funcr/slogsink.go | 22 +-
vendor/github.com/go-logr/logr/sloghandler.go | 1 -
vendor/github.com/go-logr/logr/slogr.go | 1 -
vendor/github.com/go-logr/logr/slogsink.go | 1 -
.../compress/huff0/decompress_amd64.go | 203 +-
.../compress/huff0/decompress_amd64.s | 4 +-
.../compress/huff0/decompress_arm64.go | 37 +
.../compress/huff0/decompress_arm64.s | 851 +
.../compress/huff0/decompress_asm.go | 193 +
.../compress/huff0/decompress_generic.go | 2 +-
.../klauspost/compress/zstd/blockdec.go | 9 +-
.../klauspost/compress/zstd/dict.go | 85 +-
.../klauspost/compress/zstd/seqdec_amd64.s | 4 +-
.../klauspost/compress/zstd/seqdec_arm64.s | 601 +-
.../klauspost/compress/zstd/seqdec_asm.go | 33 +-
.../api/services/control/control.pb.go | 2 +-
.../api/services/control/control_grpc.pb.go | 2 +-
.../moby/buildkit/api/types/worker.pb.go | 2 +-
.../buildkit/client/connhelper/ssh/ssh.go | 2 +-
.../moby/buildkit/client/llb/definition.go | 4 +-
.../moby/buildkit/client/llb/exec.go | 4 +-
.../moby/buildkit/client/llb/fileop.go | 4 +-
.../moby/buildkit/client/llb/merge.go | 2 +-
.../moby/buildkit/client/llb/passthrough.go | 6 +-
.../moby/buildkit/client/llb/source.go | 23 +-
.../github.com/moby/buildkit/client/solve.go | 2 +-
.../buildkit/cmd/buildkitd/config/config.go | 2 +-
.../frontend/dockerfile/parser/parser.go | 2 +-
.../moby/buildkit/frontend/dockerui/config.go | 12 +-
.../buildkit/frontend/dockerui/context.go | 20 +-
.../frontend/dockerui/namedcontext.go | 4 +-
.../frontend/gateway/client/attestation.go | 6 +-
.../frontend/gateway/grpcclient/client.go | 4 +-
.../frontend/gateway/pb/gateway.pb.go | 2 +-
.../frontend/gateway/pb/gateway_grpc.pb.go | 2 +-
.../buildkit/frontend/subrequests/describe.go | 4 +-
.../frontend/subrequests/lint/lint.go | 4 +-
.../frontend/subrequests/outline/outline.go | 6 +-
.../frontend/subrequests/targets/targets.go | 2 +-
.../moby/buildkit/session/auth/auth.pb.go | 2 +-
.../buildkit/session/auth/auth_grpc.pb.go | 2 +-
.../buildkit/session/exporter/exporter.pb.go | 2 +-
.../session/exporter/exporter_grpc.pb.go | 2 +-
.../buildkit/session/filesync/filesync.pb.go | 2 +-
.../session/filesync/filesync_grpc.pb.go | 2 +-
.../github.com/moby/buildkit/session/grpc.go | 2 +-
.../moby/buildkit/session/header.go | 23 +
.../moby/buildkit/session/manager.go | 12 +-
.../moby/buildkit/session/secrets/secrets.go | 2 +-
.../buildkit/session/secrets/secrets.pb.go | 2 +-
.../session/secrets/secrets_grpc.pb.go | 2 +-
.../session/secrets/secretsprovider/store.go | 2 +-
.../moby/buildkit/session/session.go | 15 +-
.../buildkit/session/sshforward/ssh.pb.go | 2 +-
.../session/sshforward/ssh_grpc.pb.go | 2 +-
.../sshforward/sshprovider/agentprovider.go | 16 +-
.../sshprovider/agentprovider_unix.go | 2 +-
.../moby/buildkit/session/upload/upload.pb.go | 2 +-
.../buildkit/session/upload/upload_grpc.pb.go | 2 +-
.../buildkit/solver/errdefs/errdefs.pb.go | 2 +-
.../moby/buildkit/solver/errdefs/source.go | 2 +-
.../moby/buildkit/solver/pb/attr.go | 1 +
.../moby/buildkit/solver/pb/ops.pb.go | 2 +-
.../moby/buildkit/solver/result/result.go | 2 +-
.../buildkit/sourcepolicy/pb/policy.pb.go | 2 +-
.../policysession/policysession.pb.go | 2 +-
.../policysession/policysession_grpc.pb.go | 2 +-
.../sourcepolicy/policysession/provider.go | 2 +-
.../moby/buildkit/util/apicaps/pb/caps.pb.go | 2 +-
.../moby/buildkit/util/contentutil/buffer.go | 2 +-
.../moby/buildkit/util/contentutil/fetcher.go | 4 +-
.../util/contentutil/multiprovider.go | 34 +
.../moby/buildkit/util/contentutil/refs.go | 10 +-
.../util/flightcontrol/flightcontrol.go | 4 +-
.../moby/buildkit/util/gitutil/git_cli.go | 18 +
.../buildkit/util/gitutil/gitobject/parse.go | 6 +-
.../buildkit/util/gitutil/gitsign/gitsign.go | 4 +-
.../moby/buildkit/util/leaseutil/manager.go | 2 +-
.../buildkit/util/resolver/limited/group.go | 17 +-
.../moby/buildkit/util/stack/stack.pb.go | 2 +-
.../moby/buildkit/util/system/path.go | 2 +-
.../util/testutil/dockerd/client/request.go | 6 +-
.../buildkit/util/testutil/dockerd/config.go | 5 +
.../util/testutil/integration/registry.go | 2 +-
.../buildkit/util/testutil/integration/run.go | 26 +-
.../util/testutil/integration/sandbox.go | 2 +-
.../util/testutil/integration/util.go | 2 +-
.../buildkit/util/testutil/workers/dockerd.go | 5 +
.../pelletier/go-toml/v2/.goreleaser.yaml | 32 +-
.../github.com/pelletier/go-toml/v2/AGENTS.md | 11 +-
.../pelletier/go-toml/v2/CONTRIBUTING.md | 19 +
.../pelletier/go-toml/v2/Dockerfile | 7 +-
.../github.com/pelletier/go-toml/v2/README.md | 341 +-
.../go-toml/v2/capability_baseline.txt | 1 +
.../github.com/pelletier/go-toml/v2/caps.sh | 101 +
vendor/github.com/pelletier/go-toml/v2/ci.sh | 6 +-
.../github.com/pelletier/go-toml/v2/decode.go | 767 +-
.../pelletier/go-toml/v2/decode_fused.go | 362 +
.../github.com/pelletier/go-toml/v2/errors.go | 282 +-
.../go-toml/v2/internal/characters/ascii.go | 42 -
.../go-toml/v2/internal/characters/utf8.go | 175 -
.../v2/internal/parserbridge/parserbridge.go | 37 +
.../go-toml/v2/internal/tracker/key.go | 3 +-
.../go-toml/v2/internal/tracker/seen.go | 551 +-
.../pelletier/go-toml/v2/localtime.go | 7 +-
.../pelletier/go-toml/v2/marshaler.go | 2101 +-
.../github.com/pelletier/go-toml/v2/strict.go | 94 +-
.../github.com/pelletier/go-toml/v2/toml.abnf | 21 +-
.../github.com/pelletier/go-toml/v2/types.go | 13 +-
.../pelletier/go-toml/v2/unmarshaler.go | 2994 ++-
.../pelletier/go-toml/v2/unstable/ast.go | 85 +-
.../pelletier/go-toml/v2/unstable/bridge.go | 21 +
.../pelletier/go-toml/v2/unstable/builder.go | 64 -
.../pelletier/go-toml/v2/unstable/kind.go | 4 +-
.../go-toml/v2/unstable/marshaler.go | 29 +
.../pelletier/go-toml/v2/unstable/parser.go | 2299 ++-
.../pelletier/go-toml/v2/unstable/scanner.go | 270 -
.../go-toml/v2/unstable/unmarshaler.go | 31 +-
.../github.com/tonistiigi/fsutil/tarwriter.go | 3 +-
.../google.golang.org/grpc/otelgrpc/config.go | 2 +-
.../google.golang.org/grpc/otelgrpc/doc.go | 2 +-
.../grpc/otelgrpc/interceptor.go | 45 +-
.../grpc/otelgrpc/interceptorinfo.go | 2 +-
.../grpc/otelgrpc/internal/parse.go | 4 +-
.../grpc/otelgrpc/metadata_supplier.go | 2 +-
.../grpc/otelgrpc/stats_handler.go | 42 +-
.../grpc/otelgrpc/version.go | 4 +-
.../net/http/httptrace/otelhttptrace/api.go | 2 +-
.../httptrace/otelhttptrace/clienttrace.go | 2 +-
.../http/httptrace/otelhttptrace/httptrace.go | 2 +-
.../otelhttptrace/internal/semconv/client.go | 70 +-
.../otelhttptrace/internal/semconv/gen.go | 2 +-
.../otelhttptrace/internal/semconv/server.go | 42 +-
.../otelhttptrace/internal/semconv/util.go | 24 +-
.../http/httptrace/otelhttptrace/version.go | 4 +-
.../net/http/otelhttp/common.go | 2 +-
.../net/http/otelhttp/config.go | 2 +-
.../instrumentation/net/http/otelhttp/doc.go | 2 +-
.../net/http/otelhttp/handler.go | 2 +-
.../otelhttp/internal/request/body_wrapper.go | 8 +-
.../net/http/otelhttp/internal/request/gen.go | 2 +-
.../internal/request/resp_writer_wrapper.go | 8 +-
.../http/otelhttp/internal/semconv/client.go | 70 +-
.../net/http/otelhttp/internal/semconv/gen.go | 2 +-
.../http/otelhttp/internal/semconv/server.go | 42 +-
.../http/otelhttp/internal/semconv/util.go | 24 +-
.../net/http/otelhttp/labeler.go | 2 +-
.../net/http/otelhttp/start_time_context.go | 2 +-
.../net/http/otelhttp/transport.go | 23 +-
.../net/http/otelhttp/version.go | 4 +-
vendor/go.opentelemetry.io/otel/.golangci.yml | 4 +-
vendor/go.opentelemetry.io/otel/.lycheeignore | 14 +
vendor/go.opentelemetry.io/otel/AGENTS.md | 3 +
vendor/go.opentelemetry.io/otel/CHANGELOG.md | 78 +-
.../go.opentelemetry.io/otel/CONTRIBUTING.md | 12 +-
vendor/go.opentelemetry.io/otel/Makefile | 20 +-
vendor/go.opentelemetry.io/otel/README.md | 7 +
.../go.opentelemetry.io/otel/attribute/doc.go | 2 +-
.../otel/attribute/encoder.go | 2 +-
.../otel/attribute/filter.go | 2 +-
.../otel/attribute/hash.go | 162 +-
.../otel/attribute/internal/attribute.go | 2 +-
.../otel/attribute/internal/xxhash/xxhash.go | 2 +-
.../otel/attribute/iterator.go | 2 +-
.../go.opentelemetry.io/otel/attribute/key.go | 134 +-
.../go.opentelemetry.io/otel/attribute/kv.go | 80 +-
.../otel/attribute/rawhelpers.go | 2 +-
.../go.opentelemetry.io/otel/attribute/set.go | 2 +-
.../otel/attribute/type_string.go | 5 +-
.../otel/attribute/value.go | 312 +-
.../otel/baggage/baggage.go | 2 +-
.../otel/baggage/context.go | 2 +-
.../go.opentelemetry.io/otel/baggage/doc.go | 2 +-
.../go.opentelemetry.io/otel/codes/codes.go | 4 +-
vendor/go.opentelemetry.io/otel/codes/doc.go | 2 +-
.../otel/dependencies.Dockerfile | 2 +-
vendor/go.opentelemetry.io/otel/doc.go | 2 +-
.../go.opentelemetry.io/otel/error_handler.go | 2 +-
.../otlp/otlpmetric/otlpmetricgrpc/client.go | 2 +-
.../otlp/otlpmetric/otlpmetricgrpc/config.go | 2 +-
.../otlp/otlpmetric/otlpmetricgrpc/doc.go | 2 +-
.../otlpmetric/otlpmetricgrpc/exporter.go | 2 +-
.../internal/counter/counter.go | 8 +-
.../internal/envconfig/envconfig.go | 10 +-
.../otlpmetric/otlpmetricgrpc/internal/gen.go | 6 +-
.../internal/observ/instrumentation.go | 6 +-
.../otlpmetricgrpc/internal/observ/target.go | 13 +-
.../internal/oconf/envconfig.go | 62 +-
.../otlpmetricgrpc/internal/oconf/options.go | 19 +-
.../internal/oconf/optiontypes.go | 8 +-
.../otlpmetricgrpc/internal/oconf/tls.go | 8 +-
.../otlpmetricgrpc/internal/partialsuccess.go | 10 +-
.../otlpmetricgrpc/internal/retry/retry.go | 8 +-
.../internal/transform/attribute.go | 17 +-
.../internal/transform/error.go | 8 +-
.../internal/transform/metricdata.go | 11 +-
.../otlpmetricgrpc/internal/x/observ.go | 2 +-
.../otlpmetric/otlpmetricgrpc/internal/x/x.go | 8 +-
.../otlp/otlpmetric/otlpmetricgrpc/version.go | 4 +-
.../otlp/otlpmetric/otlpmetrichttp/client.go | 26 +-
.../otlp/otlpmetric/otlpmetrichttp/config.go | 7 +-
.../otlp/otlpmetric/otlpmetrichttp/doc.go | 2 +-
.../otlpmetric/otlpmetrichttp/exporter.go | 2 +-
.../internal/counter/counter.go | 8 +-
.../internal/envconfig/envconfig.go | 10 +-
.../otlpmetric/otlpmetrichttp/internal/gen.go | 4 +-
.../otlpmetrichttp/internal/observ/count.go | 2 +-
.../internal/observ/instrumentation.go | 6 +-
.../internal/oconf/envconfig.go | 62 +-
.../otlpmetrichttp/internal/oconf/options.go | 19 +-
.../internal/oconf/optiontypes.go | 8 +-
.../otlpmetrichttp/internal/oconf/tls.go | 8 +-
.../otlpmetrichttp/internal/partialsuccess.go | 10 +-
.../otlpmetrichttp/internal/retry/retry.go | 8 +-
.../internal/transform/attribute.go | 17 +-
.../internal/transform/error.go | 8 +-
.../internal/transform/metricdata.go | 11 +-
.../otlpmetrichttp/internal/version.go | 4 +-
.../otlpmetrichttp/internal/x/README.md | 2 +-
.../otlpmetrichttp/internal/x/observ.go | 2 +-
.../otlpmetric/otlpmetrichttp/internal/x/x.go | 8 +-
.../otlp/otlpmetric/otlpmetrichttp/version.go | 2 +-
.../otel/exporters/otlp/otlptrace/clients.go | 2 +-
.../otel/exporters/otlp/otlptrace/doc.go | 2 +-
.../otel/exporters/otlp/otlptrace/exporter.go | 6 +-
.../internal/tracetransform/attribute.go | 8 +-
.../tracetransform/instrumentation.go | 2 +-
.../internal/tracetransform/resource.go | 2 +-
.../otlptrace/internal/tracetransform/span.go | 26 +-
.../otlp/otlptrace/otlptracegrpc/client.go | 10 +-
.../otlp/otlptrace/otlptracegrpc/doc.go | 2 +-
.../otlp/otlptrace/otlptracegrpc/exporter.go | 2 +-
.../otlptracegrpc/internal/counter/counter.go | 8 +-
.../internal/envconfig/envconfig.go | 10 +-
.../otlptrace/otlptracegrpc/internal/gen.go | 6 +-
.../otlptracegrpc/internal/observ/doc.go | 2 +-
.../internal/observ/instrumentation.go | 6 +-
.../otlptracegrpc/internal/observ/target.go | 13 +-
.../internal/otlpconfig/envconfig.go | 62 +-
.../internal/otlpconfig/options.go | 19 +-
.../internal/otlpconfig/optiontypes.go | 8 +-
.../otlptracegrpc/internal/otlpconfig/tls.go | 8 +-
.../otlptracegrpc/internal/partialsuccess.go | 10 +-
.../otlptracegrpc/internal/retry/retry.go | 8 +-
.../otlptracegrpc/internal/version.go | 4 +-
.../otlptracegrpc/internal/x/observ.go | 2 +-
.../otlptrace/otlptracegrpc/internal/x/x.go | 8 +-
.../otlp/otlptrace/otlptracegrpc/options.go | 2 +-
.../otlp/otlptrace/otlptracehttp/client.go | 38 +-
.../otlp/otlptrace/otlptracehttp/doc.go | 2 +-
.../otlp/otlptrace/otlptracehttp/exporter.go | 2 +-
.../otlptracehttp/internal/counter/counter.go | 8 +-
.../internal/envconfig/envconfig.go | 10 +-
.../otlptrace/otlptracehttp/internal/gen.go | 4 +-
.../internal/observ/instrumentation.go | 6 +-
.../internal/otlpconfig/envconfig.go | 62 +-
.../internal/otlpconfig/options.go | 19 +-
.../internal/otlpconfig/optiontypes.go | 8 +-
.../otlptracehttp/internal/otlpconfig/tls.go | 8 +-
.../otlptracehttp/internal/partialsuccess.go | 10 +-
.../otlptracehttp/internal/retry/retry.go | 8 +-
.../otlptracehttp/internal/version.go | 4 +-
.../otlptracehttp/internal/x/observ.go | 2 +-
.../otlptrace/otlptracehttp/internal/x/x.go | 8 +-
.../otlp/otlptrace/otlptracehttp/options.go | 7 +-
.../otel/exporters/otlp/otlptrace/version.go | 4 +-
vendor/go.opentelemetry.io/otel/handler.go | 2 +-
.../otel/internal/baggage/baggage.go | 2 +-
.../otel/internal/baggage/context.go | 2 +-
.../internal/errorhandler/errorhandler.go | 2 +-
.../otel/internal/global/handler.go | 2 +-
.../otel/internal/global/instruments.go | 2 +-
.../otel/internal/global/internal_logging.go | 2 +-
.../otel/internal/global/meter.go | 2 +-
.../otel/internal/global/propagator.go | 2 +-
.../otel/internal/global/state.go | 2 +-
.../otel/internal/global/trace.go | 2 +-
.../otel/internal_logging.go | 2 +-
vendor/go.opentelemetry.io/otel/metric.go | 2 +-
.../otel/metric/asyncfloat64.go | 2 +-
.../otel/metric/asyncint64.go | 2 +-
.../go.opentelemetry.io/otel/metric/config.go | 2 +-
vendor/go.opentelemetry.io/otel/metric/doc.go | 2 +-
.../otel/metric/embedded/embedded.go | 2 +-
.../otel/metric/instrument.go | 2 +-
.../go.opentelemetry.io/otel/metric/meter.go | 2 +-
.../otel/metric/noop/noop.go | 2 +-
.../otel/metric/syncfloat64.go | 4 +-
.../otel/metric/syncint64.go | 4 +-
.../go.opentelemetry.io/otel/propagation.go | 2 +-
.../otel/propagation/baggage.go | 2 +-
.../otel/propagation/doc.go | 2 +-
.../otel/propagation/propagation.go | 2 +-
.../otel/propagation/trace_context.go | 2 +-
.../go.opentelemetry.io/otel/requirements.txt | 2 +-
.../otel/sdk/instrumentation/doc.go | 2 +-
.../otel/sdk/instrumentation/library.go | 2 +-
.../otel/sdk/instrumentation/scope.go | 2 +-
.../otel/sdk/internal/attrnorm/dedup.go | 300 +
.../otel/sdk/internal/attrnorm/truncate.go | 232 +
.../otel/sdk/internal/x/features.go | 2 +-
.../otel/sdk/internal/x/x.go | 8 +-
.../otel/sdk/metric/aggregation.go | 2 +-
.../otel/sdk/metric/cache.go | 2 +-
.../otel/sdk/metric/config.go | 4 +-
.../otel/sdk/metric/doc.go | 2 +-
.../otel/sdk/metric/env.go | 2 +-
.../otel/sdk/metric/exemplar.go | 2 +-
.../otel/sdk/metric/exemplar/doc.go | 2 +-
.../otel/sdk/metric/exemplar/exemplar.go | 2 +-
.../otel/sdk/metric/exemplar/filter.go | 2 +-
.../metric/exemplar/fixed_size_reservoir.go | 170 +-
.../metric/exemplar/histogram_reservoir.go | 58 +-
.../otel/sdk/metric/exemplar/next_tracker.go | 154 +
.../otel/sdk/metric/exemplar/reservoir.go | 2 +-
.../otel/sdk/metric/exemplar/storage.go | 57 +-
.../otel/sdk/metric/exemplar/value.go | 2 +-
.../otel/sdk/metric/exporter.go | 2 +-
.../otel/sdk/metric/instrument.go | 55 +-
.../metric/internal/aggregate/aggregate.go | 2 +-
.../sdk/metric/internal/aggregate/atomic.go | 18 +-
.../otel/sdk/metric/internal/aggregate/doc.go | 2 +-
.../sdk/metric/internal/aggregate/drop.go | 2 +-
.../sdk/metric/internal/aggregate/exemplar.go | 2 +-
.../aggregate/exponential_histogram.go | 28 +-
.../internal/aggregate/filtered_reservoir.go | 2 +-
.../metric/internal/aggregate/histogram.go | 92 +-
.../metric/internal/aggregate/lastvalue.go | 14 +-
.../sdk/metric/internal/aggregate/limit.go | 2 +-
.../otel/sdk/metric/internal/aggregate/sum.go | 14 +-
.../sdk/metric/internal/attrnorm/dedup.go | 300 +
.../otel/sdk/metric/internal/gen.go | 10 +
.../metric/internal/observ/instrumentation.go | 6 +-
.../internal/reservoir/concurrent_safe.go | 2 +-
.../otel/sdk/metric/internal/reservoir/doc.go | 2 +-
.../otel/sdk/metric/internal/reuse_slice.go | 2 +-
.../otel/sdk/metric/internal/x/features.go | 22 +
.../otel/sdk/metric/internal/x/x.go | 52 +-
.../otel/sdk/metric/manual_reader.go | 2 +-
.../otel/sdk/metric/meter.go | 16 +-
.../otel/sdk/metric/metricdata/data.go | 2 +-
.../otel/sdk/metric/metricdata/temporality.go | 2 +-
.../otel/sdk/metric/periodic_reader.go | 4 +-
.../otel/sdk/metric/pipeline.go | 2 +-
.../otel/sdk/metric/provider.go | 6 +-
.../otel/sdk/metric/reader.go | 2 +-
.../otel/sdk/metric/splitmetrics.go | 2 +-
.../otel/sdk/metric/version.go | 4 +-
.../otel/sdk/metric/view.go | 2 +-
.../otel/sdk/resource/auto.go | 2 +-
.../otel/sdk/resource/builtin.go | 4 +-
.../otel/sdk/resource/config.go | 6 +-
.../otel/sdk/resource/container.go | 4 +-
.../otel/sdk/resource/doc.go | 2 +-
.../otel/sdk/resource/env.go | 4 +-
.../otel/sdk/resource/host_id.go | 4 +-
.../otel/sdk/resource/host_id_bsd.go | 2 +-
.../otel/sdk/resource/host_id_darwin.go | 2 +-
.../otel/sdk/resource/host_id_exec.go | 2 +-
.../otel/sdk/resource/host_id_linux.go | 2 +-
.../otel/sdk/resource/host_id_readfile.go | 2 +-
.../otel/sdk/resource/host_id_unsupported.go | 2 +-
.../otel/sdk/resource/host_id_windows.go | 2 +-
.../otel/sdk/resource/os.go | 4 +-
.../otel/sdk/resource/os_release_darwin.go | 2 +-
.../otel/sdk/resource/os_release_unix.go | 2 +-
.../otel/sdk/resource/os_unix.go | 2 +-
.../otel/sdk/resource/os_unsupported.go | 2 +-
.../otel/sdk/resource/os_windows.go | 2 +-
.../otel/sdk/resource/process.go | 4 +-
.../otel/sdk/resource/resource.go | 23 +-
.../otel/sdk/trace/batch_span_processor.go | 7 +-
.../go.opentelemetry.io/otel/sdk/trace/doc.go | 2 +-
.../otel/sdk/trace/event.go | 2 +-
.../otel/sdk/trace/evictedqueue.go | 2 +-
.../otel/sdk/trace/id_generator.go | 2 +-
.../otel/sdk/trace/internal/env/env.go | 2 +-
.../internal/observ/batch_span_processor.go | 6 +-
.../otel/sdk/trace/internal/observ/doc.go | 2 +-
.../internal/observ/simple_span_processor.go | 6 +-
.../otel/sdk/trace/internal/observ/tracer.go | 4 +-
.../otel/sdk/trace/link.go | 2 +-
.../otel/sdk/trace/provider.go | 61 +-
.../otel/sdk/trace/sampler_env.go | 2 +-
.../otel/sdk/trace/sampling.go | 2 +-
.../otel/sdk/trace/simple_span_processor.go | 14 +-
.../otel/sdk/trace/snapshot.go | 2 +-
.../otel/sdk/trace/span.go | 250 +-
.../otel/sdk/trace/span_exporter.go | 2 +-
.../otel/sdk/trace/span_limits.go | 10 +-
.../otel/sdk/trace/span_processor.go | 2 +-
.../otel/sdk/trace/tracer.go | 2 +-
.../otel/sdk/trace/tracetest/exporter.go | 2 +-
.../otel/sdk/trace/tracetest/recorder.go | 2 +-
.../otel/sdk/trace/tracetest/span.go | 2 +-
.../go.opentelemetry.io/otel/sdk/version.go | 4 +-
.../otel/semconv/internal/metricpool/pool.go | 48 +
.../otel/semconv/v1.37.0/attribute_group.go | 2 +-
.../otel/semconv/v1.37.0/doc.go | 2 +-
.../otel/semconv/v1.37.0/error_type.go | 2 +-
.../otel/semconv/v1.37.0/exception.go | 2 +-
.../otel/semconv/v1.37.0/schema.go | 2 +-
.../otel/semconv/v1.41.0/attribute_group.go | 14 +-
.../otel/semconv/v1.41.0/doc.go | 2 +-
.../otel/semconv/v1.41.0/error_type.go | 2 +-
.../otel/semconv/v1.41.0/exception.go | 2 +-
.../otel/semconv/v1.41.0/otelconv/metric.go | 215 +-
.../otel/semconv/v1.41.0/schema.go | 2 +-
.../otel/semconv/v1.43.0/MIGRATION.md | 4 +
.../otel/semconv/v1.43.0/README.md | 3 +
.../otel/semconv/v1.43.0/attribute_group.go | 16054 +++++++++++++++
.../otel/semconv/v1.43.0/doc.go | 11 +
.../otel/semconv/v1.43.0/error_type.go | 83 +
.../otel/semconv/v1.43.0/exception.go | 11 +
.../{v1.41.0 => v1.43.0}/httpconv/metric.go | 209 +-
.../otel/semconv/v1.43.0/otelconv/metric.go | 3197 +++
.../{v1.41.0 => v1.43.0}/rpcconv/metric.go | 39 +-
.../otel/semconv/v1.43.0/schema.go | 11 +
vendor/go.opentelemetry.io/otel/trace.go | 2 +-
vendor/go.opentelemetry.io/otel/trace/auto.go | 14 +-
.../go.opentelemetry.io/otel/trace/config.go | 2 +-
.../go.opentelemetry.io/otel/trace/context.go | 2 +-
vendor/go.opentelemetry.io/otel/trace/doc.go | 2 +-
.../otel/trace/embedded/embedded.go | 2 +-
vendor/go.opentelemetry.io/otel/trace/hex.go | 2 +-
.../otel/trace/internal/telemetry/attr.go | 2 +-
.../otel/trace/internal/telemetry/doc.go | 2 +-
.../otel/trace/internal/telemetry/id.go | 2 +-
.../otel/trace/internal/telemetry/number.go | 2 +-
.../otel/trace/internal/telemetry/resource.go | 2 +-
.../otel/trace/internal/telemetry/scope.go | 2 +-
.../otel/trace/internal/telemetry/span.go | 2 +-
.../otel/trace/internal/telemetry/status.go | 2 +-
.../otel/trace/internal/telemetry/traces.go | 2 +-
.../otel/trace/internal/telemetry/value.go | 2 +-
.../otel/trace/nonrecording.go | 2 +-
vendor/go.opentelemetry.io/otel/trace/noop.go | 2 +-
.../otel/trace/noop/noop.go | 2 +-
.../otel/trace/provider.go | 2 +-
vendor/go.opentelemetry.io/otel/trace/span.go | 2 +-
.../go.opentelemetry.io/otel/trace/trace.go | 2 +-
.../go.opentelemetry.io/otel/trace/tracer.go | 2 +-
.../otel/trace/tracestate.go | 2 +-
vendor/go.opentelemetry.io/otel/version.go | 4 +-
vendor/go.opentelemetry.io/otel/versions.yaml | 8 +-
.../proto/otlp/common/v1/common.pb.go | 6 +-
.../proto/otlp/metrics/v1/metrics.pb.go | 2 +-
.../x/crypto/internal/poly1305/mac_noasm.go | 2 +-
.../x/crypto/internal/poly1305/sum_asm.go | 2 +-
.../x/crypto/internal/poly1305/sum_riscv64.s | 158 +
.../golang.org/x/crypto/ssh/agent/keyring.go | 2 +-
.../golang.org/x/crypto/ssh/agent/server.go | 4 +-
vendor/golang.org/x/crypto/ssh/certs.go | 15 +-
vendor/golang.org/x/crypto/ssh/channel.go | 69 +-
vendor/golang.org/x/crypto/ssh/client_auth.go | 2 +-
vendor/golang.org/x/crypto/ssh/common.go | 8 +-
vendor/golang.org/x/crypto/ssh/connection.go | 2 +-
vendor/golang.org/x/crypto/ssh/handshake.go | 2 +-
vendor/golang.org/x/crypto/ssh/keys.go | 17 +-
vendor/golang.org/x/crypto/ssh/messages.go | 11 +-
vendor/golang.org/x/crypto/ssh/mux.go | 13 +-
vendor/golang.org/x/crypto/ssh/server.go | 79 +-
vendor/golang.org/x/crypto/ssh/ssh_gss.go | 16 +-
vendor/golang.org/x/crypto/ssh/streamlocal.go | 2 +
vendor/golang.org/x/crypto/ssh/tcpip.go | 2 +
vendor/golang.org/x/net/http2/hpack/encode.go | 1 -
vendor/golang.org/x/net/http2/hpack/hpack.go | 1 -
vendor/golang.org/x/net/http2/hpack/tables.go | 51 +-
.../golang.org/x/net/http2/transport_wrap.go | 49 +-
.../x/tools/go/ast/inspector/cursor.go | 41 +
.../golang.org/x/tools/go/packages/visit.go | 33 +-
.../x/tools/go/types/objectpath/objectpath.go | 9 +-
.../x/tools/go/types/typeutil/callee.go | 86 -
.../x/tools/go/types/typeutil/imports.go | 30 -
.../x/tools/go/types/typeutil/map.go | 459 -
.../tools/go/types/typeutil/methodsetcache.go | 71 -
.../x/tools/go/types/typeutil/ui.go | 53 -
.../x/tools/internal/moremaps/maps.go | 116 +
.../x/tools/internal/stdlib/deps.go | 669 +-
.../x/tools/internal/stdlib/manifest.go | 2 +
.../x/tools/internal/typeparams/common.go | 68 -
.../x/tools/internal/typeparams/coretype.go | 157 -
.../x/tools/internal/typeparams/free.go | 129 -
.../x/tools/internal/typeparams/normalize.go | 216 -
.../x/tools/internal/typeparams/termlist.go | 169 -
.../x/tools/internal/typeparams/typeterm.go | 172 -
.../internal/typesinternal/assignedaddress.go | 128 +
.../internal/typesinternal/classify_call.go | 77 +-
.../x/tools/internal/typesinternal/element.go | 65 +-
.../x/tools/internal/typesinternal/toonew.go | 44 +-
.../x/tools/internal/typesinternal/types.go | 8 +
vendor/google.golang.org/grpc/clientconn.go | 23 +-
.../clientconn_disconnect_reason_noplan9.go | 48 +
.../clientconn_disconnect_reason_plan9.go | 39 +
.../grpc/cmd/protoc-gen-go-grpc/grpc.go | 146 +-
.../grpc/cmd/protoc-gen-go-grpc/main.go | 4 +-
.../protoc-gen-go-grpc_test.sh | 2 +-
.../grpc/internal/envconfig/envconfig.go | 12 +-
.../grpc/internal/envconfig/xds.go | 7 +-
.../internal/grpcsync/callback_serializer.go | 26 +
.../grpc/internal/mem/buffer_pool.go | 14 +
.../grpc/internal/resolver/config_selector.go | 78 +-
.../grpc/internal/transport/client_stream.go | 5 +-
.../grpc/internal/transport/handler_server.go | 2 +-
.../grpc/internal/transport/http2_client.go | 6 +-
.../grpc/internal/transport/http2_server.go | 8 +-
.../grpc/internal/transport/transport.go | 112 +-
.../google.golang.org/grpc/mem/buffer_pool.go | 4 -
vendor/google.golang.org/grpc/mem/buffers.go | 6 +-
vendor/google.golang.org/grpc/stream.go | 35 +-
vendor/google.golang.org/grpc/version.go | 2 +-
.../editiondefaults/editions_defaults.binpb | Bin 154 -> 191 bytes
.../internal/encoding/defval/default.go | 8 +-
.../protobuf/internal/genid/descriptor_gen.go | 5 +
.../protobuf/internal/version/version.go | 4 +-
.../reflect/protoreflect/source_gen.go | 2 +
.../types/descriptorpb/descriptor.pb.go | 101 +-
.../protobuf/types/known/anypb/any.pb.go | 160 +-
.../types/known/fieldmaskpb/field_mask.pb.go | 34 +-
.../types/known/structpb/struct.pb.go | 55 +-
.../types/known/timestamppb/timestamp.pb.go | 6 +-
vendor/modules.txt | 124 +-
616 files changed, 49733 insertions(+), 11343 deletions(-)
create mode 100644 vendor/github.com/felixge/httpsnoop/wrap_generated.go
delete mode 100644 vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
delete mode 100644 vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
create mode 100644 vendor/github.com/klauspost/compress/huff0/decompress_arm64.go
create mode 100644 vendor/github.com/klauspost/compress/huff0/decompress_arm64.s
create mode 100644 vendor/github.com/klauspost/compress/huff0/decompress_asm.go
create mode 100644 vendor/github.com/moby/buildkit/session/header.go
create mode 100644 vendor/github.com/pelletier/go-toml/v2/capability_baseline.txt
create mode 100644 vendor/github.com/pelletier/go-toml/v2/caps.sh
create mode 100644 vendor/github.com/pelletier/go-toml/v2/decode_fused.go
delete mode 100644 vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go
delete mode 100644 vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go
create mode 100644 vendor/github.com/pelletier/go-toml/v2/internal/parserbridge/parserbridge.go
create mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/bridge.go
delete mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/builder.go
create mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go
delete mode 100644 vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/dedup.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/truncate.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/next_tracker.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/attrnorm/dedup.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/gen.go
create mode 100644 vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/features.go
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/internal/metricpool/pool.go
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/MIGRATION.md
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/README.md
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/attribute_group.go
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/doc.go
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/error_type.go
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/exception.go
rename vendor/go.opentelemetry.io/otel/semconv/{v1.41.0 => v1.43.0}/httpconv/metric.go (96%)
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/otelconv/metric.go
rename vendor/go.opentelemetry.io/otel/semconv/{v1.41.0 => v1.43.0}/rpcconv/metric.go (94%)
create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.43.0/schema.go
create mode 100644 vendor/golang.org/x/crypto/internal/poly1305/sum_riscv64.s
delete mode 100644 vendor/golang.org/x/tools/go/types/typeutil/callee.go
delete mode 100644 vendor/golang.org/x/tools/go/types/typeutil/imports.go
delete mode 100644 vendor/golang.org/x/tools/go/types/typeutil/map.go
delete mode 100644 vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go
delete mode 100644 vendor/golang.org/x/tools/go/types/typeutil/ui.go
create mode 100644 vendor/golang.org/x/tools/internal/moremaps/maps.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/common.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/coretype.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/free.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/normalize.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/termlist.go
delete mode 100644 vendor/golang.org/x/tools/internal/typeparams/typeterm.go
create mode 100644 vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go
create mode 100644 vendor/google.golang.org/grpc/clientconn_disconnect_reason_noplan9.go
create mode 100644 vendor/google.golang.org/grpc/clientconn_disconnect_reason_plan9.go
diff --git a/go.mod b/go.mod
index cb1d0e86708e..2b4356e745e0 100644
--- a/go.mod
+++ b/go.mod
@@ -6,17 +6,17 @@ require (
github.com/Masterminds/semver/v3 v3.4.0
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29
github.com/ProtonMail/go-crypto v1.4.1
- github.com/aws/aws-sdk-go-v2/config v1.32.31
+ github.com/aws/aws-sdk-go-v2/config v1.32.39
github.com/compose-spec/compose-go/v2 v2.14.0
github.com/containerd/console v1.0.5
- github.com/containerd/containerd/v2 v2.3.3
+ github.com/containerd/containerd/v2 v2.3.4
github.com/containerd/continuity v0.5.0
github.com/containerd/errdefs v1.0.0
github.com/containerd/log v0.1.0
- github.com/containerd/platforms v1.0.0-rc.4
+ github.com/containerd/platforms v1.0.0-rc.5
github.com/creack/pty v1.1.24
github.com/distribution/reference v0.6.0
- github.com/docker/cli v29.6.2+incompatible
+ github.com/docker/cli v29.7.2+incompatible
github.com/docker/cli-docs-tool v0.11.0
github.com/docker/docker v28.5.2+incompatible
github.com/docker/go-units v0.5.0
@@ -29,7 +29,7 @@ require (
github.com/hashicorp/hcl/v2 v2.24.0
github.com/in-toto/in-toto-golang v0.11.0
github.com/mitchellh/hashstructure/v2 v2.0.2
- github.com/moby/buildkit v0.32.2
+ github.com/moby/buildkit v0.33.0-rc1
github.com/moby/moby/api v1.55.0
github.com/moby/moby/client v0.5.0
github.com/moby/policy-helpers v0.0.0-20260722051018-856be88baec4
@@ -39,7 +39,7 @@ require (
github.com/open-policy-agent/opa v1.14.1
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.1
- github.com/pelletier/go-toml/v2 v2.3.1
+ github.com/pelletier/go-toml/v2 v2.4.3
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/pkg/errors v0.9.1
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
@@ -49,30 +49,30 @@ require (
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.12.1
- github.com/tonistiigi/fsutil v0.0.0-20260717003753-6d9dc2ebad62
+ github.com/tonistiigi/fsutil v0.0.0-20260819142231-83cac42c1c52
github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0
github.com/tonistiigi/jaeger-ui-rest v0.0.0-20250408171107-3dd17559e117
github.com/zclconf/go-cty v1.17.0
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
- go.opentelemetry.io/otel v1.44.0
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0
+ go.opentelemetry.io/otel v1.45.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.44.0
- go.opentelemetry.io/otel/metric v1.44.0
- go.opentelemetry.io/otel/sdk v1.44.0
- go.opentelemetry.io/otel/trace v1.44.0
+ go.opentelemetry.io/otel/metric v1.45.0
+ go.opentelemetry.io/otel/sdk v1.45.0
+ go.opentelemetry.io/otel/trace v1.45.0
go.yaml.in/yaml/v3 v3.0.5
- golang.org/x/crypto v0.54.0
- golang.org/x/mod v0.38.0
+ golang.org/x/crypto v0.55.0
+ golang.org/x/mod v0.40.0
golang.org/x/sync v0.22.0
golang.org/x/sys v0.47.0
golang.org/x/term v0.45.0
- golang.org/x/text v0.40.0
- google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa
- google.golang.org/grpc v1.82.1
- google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.1
- google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
- k8s.io/api v0.36.0
- k8s.io/apimachinery v0.36.0
- k8s.io/client-go v0.36.0
+ golang.org/x/text v0.41.0
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d
+ google.golang.org/grpc v1.83.2
+ google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2
+ google.golang.org/protobuf v1.36.12
+ k8s.io/api v0.36.3
+ k8s.io/apimachinery v0.36.3
+ k8s.io/client-go v0.36.3
)
require (
@@ -82,19 +82,19 @@ require (
github.com/apparentlymart/go-cidr v1.0.1 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
- github.com/aws/aws-sdk-go-v2 v1.43.0 // indirect
- github.com/aws/aws-sdk-go-v2/credentials v1.19.30 // indirect
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.31 // indirect
- github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.31 // indirect
- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.31 // indirect
- github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.32 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.31 // indirect
- github.com/aws/aws-sdk-go-v2/service/signin v1.5.0 // indirect
- github.com/aws/aws-sdk-go-v2/service/sso v1.33.0 // indirect
- github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.0 // indirect
- github.com/aws/aws-sdk-go-v2/service/sts v1.45.0 // indirect
- github.com/aws/smithy-go v1.27.4 // indirect
+ github.com/aws/aws-sdk-go-v2 v1.43.8 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.19.38 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.39 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.39 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.39 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.40 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.18 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.39 // indirect
+ github.com/aws/aws-sdk-go-v2/service/signin v1.5.8 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sso v1.33.8 // indirect
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.8 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sts v1.45.8 // indirect
+ github.com/aws/smithy-go v1.27.10 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
@@ -113,10 +113,10 @@ require (
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.8 // indirect
github.com/docker/go-connections v0.7.0 // indirect
- github.com/felixge/httpsnoop v1.0.4 // indirect
+ github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
- github.com/go-logr/logr v1.4.3 // indirect
+ github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.25.2 // indirect
github.com/go-openapi/errors v0.22.8 // indirect
@@ -154,7 +154,7 @@ require (
github.com/in-toto/attestation v1.2.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/compress v1.19.1 // indirect
+ github.com/klauspost/compress v1.19.2 // indirect
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
github.com/lestrrat-go/dsig v1.0.0 // indirect
github.com/lestrrat-go/dsig-secp256k1 v1.0.0 // indirect
@@ -205,30 +205,30 @@ require (
github.com/yashtewari/glob-intersection v0.2.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 // indirect
- go.opentelemetry.io/otel/sdk/metric v1.44.0 // indirect
- go.opentelemetry.io/proto/otlp v1.10.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.45.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.45.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0 // indirect
+ go.opentelemetry.io/otel/sdk/metric v1.45.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v4 v4.0.0-rc.4 // indirect
- golang.org/x/net v0.57.0 // indirect
+ golang.org/x/net v0.58.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/time v0.15.0 // indirect
- golang.org/x/tools v0.47.0 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
+ golang.org/x/tools v0.49.0 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260319004828-5883c5ee87b9 // indirect
- k8s.io/streaming v0.36.0 // indirect
+ k8s.io/streaming v0.36.3 // indirect
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
- sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.3 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
diff --git a/go.sum b/go.sum
index 0c5475608e97..5c05cc75afbb 100644
--- a/go.sum
+++ b/go.sum
@@ -38,8 +38,8 @@ github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29 h1:0kQAzHq8vLs7Pptv+7TxjdETLf/nIqJpIB4oC6Ba4vY=
github.com/Microsoft/go-winio v0.6.3-0.20251027160822-ad3df93bed29/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
-github.com/Microsoft/hcsshim v0.15.0-rc.1 h1:FbbwtQmiD+BVHynGkx5S65JkLyhkEiiTP8nrpmg2SZw=
-github.com/Microsoft/hcsshim v0.15.0-rc.1/go.mod h1:HWvvUPIy9HF6LotILj1G4VyS065rcLQ6tqj6tMUdOfI=
+github.com/Microsoft/hcsshim v0.15.0-rc.4 h1:aZFX4LH0S20Lgjq0wG61StIClj7im4yzrxIClkaR8Z8=
+github.com/Microsoft/hcsshim v0.15.0-rc.4/go.mod h1:BA9CBztgu4h/6Jsvo1O1M4qjWw09PoYpaEYgexPE578=
github.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67IQOfM=
github.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo=
github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
@@ -62,36 +62,36 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
-github.com/aws/aws-sdk-go-v2 v1.43.0 h1:fharf/WhbRAVZ1du0QL7roNFxZ6T/sWr+4Ni617bwSI=
-github.com/aws/aws-sdk-go-v2 v1.43.0/go.mod h1:5pKeft2eJj+gElQ38Jqg4ibCqh+/AK33/0X3hip7IjM=
-github.com/aws/aws-sdk-go-v2/config v1.32.31 h1:n4nY9O3QKoHIkL85EX+V8RcMFtOhlpTFhGArg915PXk=
-github.com/aws/aws-sdk-go-v2/config v1.32.31/go.mod h1:PN0NYDCCoOpGGsZ2+elDUidmHfQBPyYzN2GCgl8HEBs=
-github.com/aws/aws-sdk-go-v2/credentials v1.19.30 h1:TTCvvzFU6gXa4iJecNG/0F/B0oYTiazoRECr2XyLHrY=
-github.com/aws/aws-sdk-go-v2/credentials v1.19.30/go.mod h1:jKxAp2AEncnliinzpgOSZDFv6+VjvWhjw/AtbfsWT9U=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.31 h1:kfVL5wAunCJycL6MOQ6aNh6PlAYEymflcjuKmrWUA0o=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.31/go.mod h1:nWfRNDAppujCQgOUd43lKT4yeLv9z3nJ3bw1G3BgQKo=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.31 h1:Z8F3hfCY33IGpJjFAnv0wvtv1FIKj1GHmRDEYqy64tw=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.31/go.mod h1:aVyUoytEyOViR6jhq6jula0xkc5NfBE2hgeF6BvOrao=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.31 h1:hyOxUyXdh3AyjE93gBgsfziJag9ACwcs+ZpDBLzi8mw=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.31/go.mod h1:OERqI9k0draSLB8O8woxY3q25ZWTELRK4RRoLMuMZFo=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.32 h1:0MrUL35H/Y4kdFfItoR5jCgtDQ4Z/8LudAoIHRfA4hE=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.32/go.mod h1:2tNZkuWz54arj8mHVf+8Y7cKkcD8Wr/fBpENgEXpjLc=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 h1:mbRIur/BiHK6SKPjoBIXSE/hJ6g6JGRLuxQy1jGjlN4=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13/go.mod h1:ITg9em2KbJx1s0y4aqRX5OYWG6HBZ5TVR//OdpEZ2CQ=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.31 h1:w2SIhW92DZPFrSL4ksVCr8IYff5OZwIcxg8+95tzvAI=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.31/go.mod h1:wAhpCQbkov+IcvjozJbd2xRCoZybUEHNkcFunssNACg=
+github.com/aws/aws-sdk-go-v2 v1.43.8 h1:fpnrxwuwsoGIgjvgLeDU3y9w7YaHBxyF6AF3vQL8duw=
+github.com/aws/aws-sdk-go-v2 v1.43.8/go.mod h1:j7gYSq8dL95QejkFXxvQNESH4I9WGHFI6iO+vhqEi5Q=
+github.com/aws/aws-sdk-go-v2/config v1.32.39 h1:3TYUWYWawsE9KF02G3dA7vsbwoCphyGOpFFEUugRs/4=
+github.com/aws/aws-sdk-go-v2/config v1.32.39/go.mod h1:/lPP/ciQurgJa6l6mbBX+b5MB1qaLrC9dd3YHtGvrhk=
+github.com/aws/aws-sdk-go-v2/credentials v1.19.38 h1:Xf8j1+vzwPRCta9pFXjj0677BzXrRO2JbpAVNcdXnnI=
+github.com/aws/aws-sdk-go-v2/credentials v1.19.38/go.mod h1:PGYzFTznwRAJ2q0m+oX+P8SlfZQKpBAKQCokNuMl3Sg=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.39 h1:9GLrXl8PKQ3+bMniXFg3vliMWJ+204bFcIvBCwJFglc=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.39/go.mod h1:MmlE5TLgq7+QbXKKUSzqUz4h0Uu5kz2SEe6iPX+ZFHI=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.39 h1:YrEI22hVQcqMpq934ZoPQyJjGNzX4CGdrSDCjBD59sI=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.39/go.mod h1:N8qOX83LkaCeizvrfiNjwkBOXkxHt6a74CiZn8qz9F8=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.39 h1:Vo7UZzBjB6zS6feEOuBlpEgaj8iBTdiNlye+7w9ooGo=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.39/go.mod h1:JgxtAO/77e95Rs9WMWUzz99hT182gqdAh7/DHuEMA/k=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.40 h1:oofDq8Y5M82fmDrxb8gsbP0LS73MqZ388qKVgs5ETYI=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.40/go.mod h1:LSfLmbvx50+T+/DoUZRqB1qS38v7lvNUebqIpidAWYM=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.18 h1:+fiwOxNdE8bOK3SoVTln8hwP+OCyArbi2/InIr/A9AU=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.18/go.mod h1:aua4m7EZSvQra/96b8zJxWHwtHxuXQ8bx4DiM92V044=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.39 h1:inoUrqz4Lfpw1XwpUvQnBiAJ2tUzn3opZ0gduNLxo+8=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.39/go.mod h1:Yx+RrmAF+XGZTccwhQ3o4K5V8qkZBsTAcq148Y8g57k=
github.com/aws/aws-sdk-go-v2/service/kms v1.52.0 h1:QNtg+Mtj1zmepk568+UKBD5DFfqh+ESTUUqQT27JkQc=
github.com/aws/aws-sdk-go-v2/service/kms v1.52.0/go.mod h1:Y0+uxvxz6ib4KktRdK0V4X45Vcs/JyYoz8H71pO8xeI=
-github.com/aws/aws-sdk-go-v2/service/signin v1.5.0 h1:OHH5iTQvVGmfHjX/5Q+vFuA/Rf2x6/95aJ/75QCQSm4=
-github.com/aws/aws-sdk-go-v2/service/signin v1.5.0/go.mod h1:mCF3AK9PpL49oOrhniUXWAfhVBVQ/XbytoE5eccZUIs=
-github.com/aws/aws-sdk-go-v2/service/sso v1.33.0 h1:CaJyYhxBE0M/HJX/YvSaSmQlsI91VHB0lKU8LtLxL3A=
-github.com/aws/aws-sdk-go-v2/service/sso v1.33.0/go.mod h1:+e6BMRMPjBQoCw/WovYR9GLy2IU0z4Q77smOB1DraSg=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.0 h1:tC323YV77QdafeBr6LUhLDTsboyuyHLNRwAyCP44kGU=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.0/go.mod h1:SfLK1sgviHmbI+MozR9iDwDjL4cdCVZtahsjoR+z7wg=
-github.com/aws/aws-sdk-go-v2/service/sts v1.45.0 h1:Pd6PNlp4t8PTXxqzstICl52Wsy78vpjFZ7PRUj44mJc=
-github.com/aws/aws-sdk-go-v2/service/sts v1.45.0/go.mod h1:rmQ0TnHzuLPmabgjPcsywhsSOmaBDgzR4zvDxSPsGdg=
-github.com/aws/smithy-go v1.27.4 h1:JQcphmBN4f0q/sPqXqROIItRNV/hy10cgu7CsFy616M=
-github.com/aws/smithy-go v1.27.4/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
+github.com/aws/aws-sdk-go-v2/service/signin v1.5.8 h1:bghrxelVQpGurGI1X94BT68h6p+hWQnlsu8nSmiSll4=
+github.com/aws/aws-sdk-go-v2/service/signin v1.5.8/go.mod h1:gkwdIl9w+6LFKlGRLz3+Dw+cudc9dD1ViMDhHGmzOgk=
+github.com/aws/aws-sdk-go-v2/service/sso v1.33.8 h1:/DbiPZ8maO03uFnXa6yEhFdWOTA5xObmGNfaEzt9Cac=
+github.com/aws/aws-sdk-go-v2/service/sso v1.33.8/go.mod h1:mUywXl2WlN+gZD0vNeg1Hn0EMOifDQ79StJcdqXHkXo=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.8 h1:wv4pCyq/LkBYc5R4m/g5S+uGqF/DbL+bp9VXiQEnec4=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.8/go.mod h1:9AKVT0vADSCPXRuoZjziHwsbdLDFMGRExwWBQourCa8=
+github.com/aws/aws-sdk-go-v2/service/sts v1.45.8 h1:oQrmuqpBAExYPEPJp8dkj9KLmc0y42iwvAV28OwlzF0=
+github.com/aws/aws-sdk-go-v2/service/sts v1.45.8/go.mod h1:qNTXKrmzx2cC6VmM7PxHNasBMWKx3mfxgzcbVjcWVAU=
+github.com/aws/smithy-go v1.27.10 h1:bw56MIx8bhTQZSdzucEJSKWLpwX0ju7hU8cVoa75dg8=
+github.com/aws/smithy-go v1.27.10/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
@@ -118,8 +118,8 @@ github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/q
github.com/containerd/console v1.0.5/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
github.com/containerd/containerd/api v1.11.1 h1:h8nfoDW9+fNsC/9TwiAHj8B1GzXKtR4eFtkhi/X5RLU=
github.com/containerd/containerd/api v1.11.1/go.mod h1:CaQFRu+N1MtbgL6JDOJLUB1hCKESU1lD6MuTJhgtdlw=
-github.com/containerd/containerd/v2 v2.3.3 h1:MUNBVVBTBpPll7KPh5GTvkC3cfG03PQLAHVdsUoue9k=
-github.com/containerd/containerd/v2 v2.3.3/go.mod h1:rHKGm3VW6wNrINb3x8mNT+w7qYXFVElTt/8HTuxVhD4=
+github.com/containerd/containerd/v2 v2.3.4 h1:c2PJo/9UGVdiiw8SwrxuLxWGY+9b3jQ6Xp9zntneIvI=
+github.com/containerd/containerd/v2 v2.3.4/go.mod h1:a30D8fWZJ1Uzx/2WpjLbLsxBkq9He41pe8ENW+QZ3LY=
github.com/containerd/continuity v0.5.0 h1:7a85HZpCSs+1Zps0Ee3DPSuAWY+0SJM1JNM51nlEVDg=
github.com/containerd/continuity v0.5.0/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
@@ -132,8 +132,8 @@ github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/nydus-snapshotter v0.15.15 h1:kVYbFpYA4K43qxGVoc/VBwRXLAVWn4X9mdwGrR+HsLk=
github.com/containerd/nydus-snapshotter v0.15.15/go.mod h1:L96yO+4iE6qqDiqXKhxMXBoPeaE7JgzXir9yanUVuOY=
-github.com/containerd/platforms v1.0.0-rc.4 h1:M42JrUT4zfZTqtkUwkr0GzmUWbfyO5VO0Q5b3op97T4=
-github.com/containerd/platforms v1.0.0-rc.4/go.mod h1:lKlMXyLybmBedS/JJm11uDofzI8L2v0J2ZbYvNsbq1A=
+github.com/containerd/platforms v1.0.0-rc.5 h1:vXd569rDrz8LeMXzAnBsy6LADV5YtsD8oyaRarxdmSU=
+github.com/containerd/platforms v1.0.0-rc.5/go.mod h1:lKlMXyLybmBedS/JJm11uDofzI8L2v0J2ZbYvNsbq1A=
github.com/containerd/plugin v1.1.0 h1:O+7lczNJVMy8rz0YNx3xGB8tTf5qY4i5abF041Ew19U=
github.com/containerd/plugin v1.1.0/go.mod h1:qBTum+A8lJ6lO44A19Eo7y1OlcLj4OWFH1DA/vnHmcc=
github.com/containerd/stargz-snapshotter v0.18.2 h1:Ev/sxfQUjwzJQ9eqy3XzttcQ3osMIqkQgMYlcET+10M=
@@ -175,8 +175,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
-github.com/docker/cli v29.6.2+incompatible h1:/bjePvcbbFTnRrMfWJBY7AjfICdsiLVgHn6LwTVOcqw=
-github.com/docker/cli v29.6.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v29.7.2+incompatible h1:dlkwallR8XqfeVnA2ELEhdwvb4lsSwuB4IgsG8Q9cLY=
+github.com/docker/cli v29.7.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli-docs-tool v0.11.0 h1:7d8QARFb7QEobizqxmEM7fOteZEHwH/zWgHQtHZEcfE=
github.com/docker/cli-docs-tool v0.11.0/go.mod h1:ma8BKiisUo8D6W05XEYIh3oa1UbgrZhi1nowyKFJa8Q=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
@@ -195,8 +195,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
-github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
-github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
+github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/foxcpp/go-mockdns v1.2.0 h1:omK3OrHRD1IWJz1FuFBCFquhXslXoF17OvBS6JPzZF0=
@@ -210,8 +210,8 @@ github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutV
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
-github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
+github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-openapi/analysis v0.25.2 h1:I0vy4n3alz+DHTiN1PRhCb7QZxkK6g5YmswZKv2TKuw=
@@ -278,8 +278,6 @@ github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
-github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
-github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
@@ -357,8 +355,8 @@ github.com/jellydator/ttlcache/v3 v3.4.0 h1:YS4P125qQS0tNhtL6aeYkheEaB/m8HCqdMMP
github.com/jellydator/ttlcache/v3 v3.4.0/go.mod h1:Hw9EgjymziQD3yGsQdf1FqFdpp7YjFMd4Srg5EJlgD4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk=
-github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
+github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8=
+github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -395,8 +393,8 @@ github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/moby/buildkit v0.32.2 h1:Sfy7+u6dUv/2yuBc9KCoK70Re8atuV8aPZ5UOC068Vc=
-github.com/moby/buildkit v0.32.2/go.mod h1:0GB/EJ1d+4VIVqIAgy3asaoGkVXy7IrDfVy7mPhOvg8=
+github.com/moby/buildkit v0.33.0-rc1 h1:4LmbuUUoigmP31anyknURj5x5Q31do2j4H7cS1Rokso=
+github.com/moby/buildkit v0.33.0-rc1/go.mod h1:9eXQ5PpzgrTJsO95xCCPSZ3FWkDugUd65Lm69qPWITE=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8=
@@ -423,8 +421,8 @@ github.com/moby/sys/signal v0.7.1 h1:PrQxdvxcGijdo6UXXo/lU/TvHUWyPhj7UOpSo8tuvk0
github.com/moby/sys/signal v0.7.1/go.mod h1:Se1VGehYokAkrSQwL4tDzHvETwUZlnY7S5XtQ50mQp8=
github.com/moby/sys/user v0.4.1 h1:RgjRlaDKi/Xmyrz4t8lyzXT6v2ooFeO/7xtchmhVWE0=
github.com/moby/sys/user v0.4.1/go.mod h1:E9QsW5WRe1kUAf7kW8hXKwu1uhsZEAdPLYHYSDudF4Y=
-github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
-github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
+github.com/moby/sys/userns v0.2.0 h1:nEtDtp7NCV/6dutSklNe8FrENPwFdc4mXnZqC/JWgXM=
+github.com/moby/sys/userns v0.2.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -452,8 +450,8 @@ github.com/opencontainers/runtime-spec v1.3.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/
github.com/package-url/packageurl-go v0.1.1 h1:KTRE0bK3sKbFKAk3yy63DpeskU7Cvs/x/Da5l+RtzyU=
github.com/package-url/packageurl-go v0.1.1/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
-github.com/pelletier/go-toml/v2 v2.3.1 h1:MYEvvGnQjeNkRF1qUuGolNtNExTDwct51yp7olPtrEc=
-github.com/pelletier/go-toml/v2 v2.3.1/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
+github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY=
+github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -463,14 +461,14 @@ github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
-github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
+github.com/prometheus/client_golang v1.24.1 h1:JnJkREXzWxUdCuPFpIWZiPispT9xVV59uiuyR2bPlnU=
+github.com/prometheus/client_golang v1.24.1/go.mod h1:F+oSRECHg4sse5ucfYpYDeIv/hu68Zo0uoHKetWnzcE=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
-github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=
-github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=
-github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=
-github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=
+github.com/prometheus/common v0.70.1 h1:1HvjP4D5oL3t8RsPlwxA9onvvStjtIHYE5XuuwOi/PY=
+github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc=
+github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+OJI=
+github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY=
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg=
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
@@ -549,8 +547,8 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323 h1:r0p7fK56l8WPequOaR3i9LBqfPtEdXIQbUTzT55iqT4=
github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323/go.mod h1:3Iuxbr0P7D3zUzBMAZB+ois3h/et0shEz0qApgHYGpY=
-github.com/tonistiigi/fsutil v0.0.0-20260717003753-6d9dc2ebad62 h1:uppBiK+tE8tYG6fc0N8VnsC7FMZcWxnXIyaQ9GcUIU8=
-github.com/tonistiigi/fsutil v0.0.0-20260717003753-6d9dc2ebad62/go.mod h1:K5zrLch9UaSGNiek5XHZeqZUf1zPWJHqDfLIcnpquQ4=
+github.com/tonistiigi/fsutil v0.0.0-20260819142231-83cac42c1c52 h1:SGUsSbltLA7/kcCcWVaw6FtqkwvOCM9Ypq0ZLtsVbUE=
+github.com/tonistiigi/fsutil v0.0.0-20260819142231-83cac42c1c52/go.mod h1:oO0lfhK8QAY3alnpiYXcRVjyVx95XGWZE3K2M+AqfcM=
github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 h1:2f304B10LaZdB8kkVEaoXvAMVan2tl9AiK4G0odjQtE=
github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0/go.mod h1:278M4p8WsNh3n4a1eqiFcV2FGk7wE5fwUpUom9mK9lE=
github.com/tonistiigi/jaeger-ui-rest v0.0.0-20250408171107-3dd17559e117 h1:XFwyh2JZwR5aiKLXHX2C1n0v5F11dCJpyGL1W/Cpl3U=
@@ -587,42 +585,40 @@ github.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0
github.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U=
github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo=
github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM=
-go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
-go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0 h1:2yEATaop1/a1I4psnSLgWVPLWwCzkqWakgJy7xTDVy0=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0/go.mod h1:D7J12YRapIekYyPWgGPlA/23pRmpSEZC5xJC/TTLI9U=
-go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0 h1:MCcYL7J6Vt/X0kjqbMZkekCmwsurbQRbL69vkiye2lk=
-go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0/go.mod h1:3jnStNwSufK+f5ktjL4EPcwtig4rtd81NS70lqHuXl8=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 h1:8tvICD4vSTOOsNrsI4Ljf6C+6UKvpTEH5XY3JMoyPoo=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0/go.mod h1:z9+yiacE0IHRqM4qFfkbt/JYlmYXgss8GY/jXoNuPJI=
-go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU=
-go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0 h1:SUplec5dp06reu1zaXmOXdvqH398taqrDXqUl99jxSc=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0/go.mod h1:ho2g4N+ane+swq5I/VBkKWnRDY4kUINH3FuqyZqX/Ug=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0 h1:RuynHbfU8JUEw7DyONgkVYg2SVtsoF28y0LGIr69jgA=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0/go.mod h1:qZF+/lBs71APw8mlnEZcqZHMzqrYrsFiJOv83lX1OGo=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 h1:4YsVu3B8+3qtWYYrsUYgn0OG78pN0rnNPRGX4SbokQI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0/go.mod h1:+wnlSn0mD1ADVMe3v9Z/WIaiz6q6gL2J/ejaAmdmv80=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0 h1:qazEJlUOQzhCpzQpFETGby7EdqjI1wsd0W+6Gg1SCTU=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0/go.mod h1:fOD2Yefuxixkx3ahVNf0O/PERb6r4OlbxfATVnYvzCo=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0 h1:lgh3PiVrRUWMLOVSkQicxzZll5NjF1r+AtsX1XRIHw0=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0/go.mod h1:5Cnhth3m/AgOeTgE3ex12pPmiu/gGtZit03kSzx9X7s=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 h1:oECp5f+hN7nkwjU/8BxQ/q23bGPb8FIrD839owX222E=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0/go.mod h1:DqEFwLumhzMBDQv9PcWbyoDxHI/4lAk6CM4nJBH39sc=
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0 h1:aVgLpGksz0vjoe6OynycqX8daNOAxJx5ZEhJXIXOVIU=
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0/go.mod h1:kmJlX6WuTrAH1fOCSbPJFrSnUagB8c3SY3E87It3JD8=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 h1:LMuyCAyfalSjDyjdC65nK6N0zoTT63+E/u95X0JovZI=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0/go.mod h1:085m8qbm4hgc8rZWGDEa4vmyyo2c3nPxUslYUKUIU04=
+go.opentelemetry.io/otel v1.45.0 h1:pdrWmLHofpubmArBv1LgFSv1Z0Ie/ppdZzu+kUN5EeU=
+go.opentelemetry.io/otel v1.45.0/go.mod h1:XZxIqPapzEYnhNSScF5DIqXhm/rYi0FzCe2XddAwZfQ=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.45.0 h1:klTViGcsvLCd1xN3rZzfZ12NslC/OimbmR+k+A006RI=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.45.0/go.mod h1:jRsK04CWmXuY8A0O+wMpSf+t90RHZ53o5Qmxn2PQPfk=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.45.0 h1:pnxy6c/kvNBWdNNFzqpjuJLm9Hjhgk/Q0nY221rwuk0=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.45.0/go.mod h1:qw6YsFapotRwoDhXRZvljzaOvCQB7UfnafEJagpN2TA=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0 h1:QRefszxJmfPdjXUUm3j6iDzY03mTPXMjqErFqQ67vUg=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0/go.mod h1:Tiz03lTBVBrm7eWZBOidzEaYaJa8tjwGUGv6d8mlTyk=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0 h1:fG5MCxGz8+2VtrN/WgqSpJFctVz24gpxj8CxkKmc8Ww=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0/go.mod h1:BmAYTn+3ysbRe+IU2msxmf5Rx3g6DHvex+tWI3LdhYI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0 h1:QBajQ2SrwQijzHyZbQlPsuIzpl/ll8DY6wPWsajeGcI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0/go.mod h1:08ZQLjrPLQ6R4kAXvuOvODEer5Yh4CoFvll5qB2BCI8=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.44.0 h1:bl2S7Ubua0Nms+D/gAmznQTd4dxxMA93aKbcpKqiTCs=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.44.0/go.mod h1:L0hRV50XdVIODHUfWEqGRCXQvj2rV82STVo12FMFBU0=
-go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc=
-go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo=
-go.opentelemetry.io/otel/metric/x v0.66.0 h1:YkCrx1zLOChi9ZcZ6euupOcsgzbVlec7D/xoEU1+cTA=
-go.opentelemetry.io/otel/metric/x v0.66.0/go.mod h1:d1+BDj9t96do0/1LoU1ayfCv79ZgNE41qbhBvnMOBZk=
-go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58=
-go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0=
-go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI=
-go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
-go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
-go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
-go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
-go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
+go.opentelemetry.io/otel/metric v1.45.0 h1:7Eg1uH7CJ5cXv9is6tnBe1FI6rj1nwUdbFypRm3br/M=
+go.opentelemetry.io/otel/metric v1.45.0/go.mod h1:HAPbm1nd3p1PmFH7v2dR+6BjXxw+Lq4a2+pndMAm08s=
+go.opentelemetry.io/otel/metric/x v0.67.0 h1:PcicCNZFkZ4bXfSooXdo3WN7RBOVOtjVdo1wD358Uns=
+go.opentelemetry.io/otel/metric/x v0.67.0/go.mod h1:FBjCWZe6wgcqxcMtjdGiClDKXb2YxxXii0CXftE4QtI=
+go.opentelemetry.io/otel/sdk v1.45.0 h1:4VVSMgQ83dUgW2aoX5f6JgLvHwIvzcuLnF9lUdCSpCw=
+go.opentelemetry.io/otel/sdk v1.45.0/go.mod h1:Sr40LgXV7DsKMMJMKOhUWOgMWTfAaqvm2kF0g7ilwuA=
+go.opentelemetry.io/otel/sdk/metric v1.45.0 h1:oVFszMfyj1Am6s24Vtc7wBb8BKLcwepJjNEYILuiE3o=
+go.opentelemetry.io/otel/sdk/metric v1.45.0/go.mod h1:vUWUxDZvu1WVRj8JA8S0AdhsPrZoDpA2DdZauIh4mDA=
+go.opentelemetry.io/otel/trace v1.45.0 h1:l/mP6Uv7oNO7/TblbhpbgMidxhq1uO/rPsikOyVhxag=
+go.opentelemetry.io/otel/trace v1.45.0/go.mod h1:qoJJA2xNMnxRrdISU/kLtfUH2wNeQbiv+jhs/CxI8bc=
+go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk=
+go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E=
go.step.sm/crypto v0.77.7 h1:6azC+pD678Vjju8yXnMDHCZJ+HzFaEmL3sCryiezTIA=
go.step.sm/crypto v0.77.7/go.mod h1:OW/2sEHwTtDKq70PvSQ5B0JGy/CrLyDKOiVy3YvZMTQ=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -638,12 +634,12 @@ go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
go.yaml.in/yaml/v4 v4.0.0-rc.4 h1:UP4+v6fFrBIb1l934bDl//mmnoIZEDK0idg1+AIvX5U=
go.yaml.in/yaml/v4 v4.0.0-rc.4/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
-golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
-golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
-golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
-golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
-golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
-golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
+golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
+golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
+golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs=
+golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE=
+golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To=
+golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
@@ -654,28 +650,28 @@ golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
-golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
-golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
+golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
+golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
-golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q=
-golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA=
+golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI=
+golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo=
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
google.golang.org/api v0.283.0 h1:0lkp8u0MPwJVHqRL+nJlMAoZVVzbmiXmFHXMOTmSPik=
google.golang.org/api v0.283.0/go.mod h1:6Wssta4c5n9qHq5CBhmlai5h/PUa1djdDAIhYEHyvcM=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 h1:XzmzkmB14QhVhgnawEVsOn6OFsnpyxNPRY9QV01dNB0=
google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7/go.mod h1:L43LFes82YgSonw6iTXTxXUX1OlULt4AQtkik4ULL/I=
-google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8=
-google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
-google.golang.org/grpc v1.82.1 h1:NnAxzGRA0677vCa4BUkOAnO5+FfQqVl9iUXeD0IqcGE=
-google.golang.org/grpc v1.82.1/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.1 h1:/WILD1UcXj/ujCxgoL/DvRgt2CP3txG8+FwkUbb9110=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.1/go.mod h1:YNKnb2OAApgYn2oYY47Rn7alMr1zWjb2U8Q0aoGWiNc=
-google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI=
-google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
+google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d h1:FarXi840EJWSHYTN3ERkADbPWjl307+FGrA22KAVjjc=
+google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d/go.mod h1:K/+WGbmBY7aNW1HDw1fJnKYo10i0DkAX6pows00dLig=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d h1:IL4hdHzcUv2l/gcg98/Rj3FbtE6axwqslOW8SW0C+S0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
+google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU=
+google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 h1:rgSNvqscFZ1JgV/4wH5GOsZFSFkR2Eua9As3KIr2LlM=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2/go.mod h1:iMEtFwDlAhjDU9L5mY6U1XLwlIId/G3h+QcBHDIvrJ8=
+google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
+google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
@@ -688,18 +684,18 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
-k8s.io/api v0.36.0 h1:SgqDhZzHdOtMk40xVSvCXkP9ME0H05hPM3p9AB1kL80=
-k8s.io/api v0.36.0/go.mod h1:m1LVrGPNYax5NBHdO+QuAedXyuzTt4RryI/qnmNvs34=
-k8s.io/apimachinery v0.36.0 h1:jZyPzhd5Z+3h9vJLt0z9XdzW9VzNzWAUw+P1xZ9PXtQ=
-k8s.io/apimachinery v0.36.0/go.mod h1:FklypaRJt6n5wUIwWXIP6GJlIpUizTgfo1T/As+Tyxc=
-k8s.io/client-go v0.36.0 h1:pOYi7C4RHChYjMiHpZSpSbIM6ZxVbRXBy7CuiIwqA3c=
-k8s.io/client-go v0.36.0/go.mod h1:ZKKcpwF0aLYfkHFCjillCKaTK/yBkEDHTDXCFY6AS9Y=
+k8s.io/api v0.36.3 h1:NxB+05W2UGqXWFXcLO0RB5cnqnUPP5v5sVlaOH0Iz4w=
+k8s.io/api v0.36.3/go.mod h1:JzLQKqRHC5+I8RVj/lS3lCg0mg6nWI9Fo/Sk3ElxHzg=
+k8s.io/apimachinery v0.36.3 h1:PkzMRBRG8joFD8EhCuQAtNPvJlxb82FwplP26HIzvAM=
+k8s.io/apimachinery v0.36.3/go.mod h1:cTSjBWgPe/6CQyBKzY/hDIRWCQQQeK0mfLbml0UYFHE=
+k8s.io/client-go v0.36.3 h1:M4JdVzXxYcZk4fGpfDdYnxSwhLKWCFoQsHW6t+z8Hfg=
+k8s.io/client-go v0.36.3/go.mod h1:gcPwr0c87vjjG6HB6pWEqOeuYVoXSsREjzux2j6GF30=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kube-openapi v0.0.0-20260319004828-5883c5ee87b9 h1:Sztf7ESG9tAXRW/ACJZjrj5jhdOUqS2KFRQT+CTvu78=
k8s.io/kube-openapi v0.0.0-20260319004828-5883c5ee87b9/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0=
-k8s.io/streaming v0.36.0 h1:agnTxU+NFulUrtYzXUGKO3ndEa8jKwht1Kwn9nu9x+4=
-k8s.io/streaming v0.36.0/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s=
+k8s.io/streaming v0.36.3 h1:9rAaqBk0C0Pc7+/fqGekj07NV+/Xrew58p647A0JT8w=
+k8s.io/streaming v0.36.3/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s=
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 h1:kBawHLSnx/mYHmRnNUf9d4CpjREbeZuxoSGOX/J+aYM=
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk=
@@ -708,8 +704,8 @@ sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5E
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
-sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8=
-sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.3 h1:u08YRbVUi59ri4YD6cg0UqNM4Dimn0sIl+wldcx5PYw=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.3/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k=
diff --git a/tests/bake.go b/tests/bake.go
index 8e245d91b79d..279bc3c1143e 100644
--- a/tests/bake.go
+++ b/tests/bake.go
@@ -2275,7 +2275,7 @@ func testBakeMultiPlatform(t *testing.T, sb integration.Sandbox) {
if !isMobyWorker(sb) {
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -2336,7 +2336,7 @@ target "default" {
require.NoError(t, err, string(outb))
// test registry
- desc, provider, err := contentutil.ProviderFromRef(targetReg)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), targetReg)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -2428,7 +2428,7 @@ target "default" {
require.NoError(t, err, string(outb))
// test registry
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
diff --git a/tests/build.go b/tests/build.go
index 1b8c7a2504e3..28b2e34c1210 100644
--- a/tests/build.go
+++ b/tests/build.go
@@ -585,7 +585,7 @@ func testBuildRegistryExport(t *testing.T, sb integration.Sandbox) {
out, err := buildCmd(sb, withArgs(fmt.Sprintf("--output=type=image,name=%s,push=true", target), dir))
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -619,7 +619,7 @@ func testBuildRegistryExportAttestations(t *testing.T, sb integration.Sandbox) {
}
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -897,7 +897,7 @@ func testBuildAnnotations(t *testing.T, sb integration.Sandbox) {
out, err := buildCmd(sb, withArgs(annotations...), withArgs(fmt.Sprintf("--output=type=image,name=%s,push=true", target), dir))
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -992,7 +992,7 @@ func testBuildMultiPlatform(t *testing.T, sb integration.Sandbox) {
if !isMobyWorker(sb) {
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -1249,7 +1249,7 @@ func buildMetadataProvenanceMultiplatform(t *testing.T, sb integration.Sandbox,
out, err := cmd.CombinedOutput()
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -1378,7 +1378,7 @@ func testBuildMultiExporters(t *testing.T, sb integration.Sandbox) {
require.NoError(t, err, string(outb))
// test registry
- desc, provider, err := contentutil.ProviderFromRef(targetReg)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), targetReg)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -1426,7 +1426,7 @@ func testBuildLoadPush(t *testing.T, sb integration.Sandbox) {
require.NoError(t, err, string(outb))
// test registry
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
diff --git a/tests/compose.go b/tests/compose.go
index 549a573904f5..0ae75f8f1418 100644
--- a/tests/compose.go
+++ b/tests/compose.go
@@ -58,7 +58,7 @@ func testComposeBuildRegistry(t *testing.T, sb integration.Sandbox) {
out, err := cmd.CombinedOutput()
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
@@ -101,7 +101,7 @@ services:
if !isMobyWorker(sb) {
require.NoError(t, err, string(out))
- desc, provider, err := contentutil.ProviderFromRef(target)
+ desc, provider, err := contentutil.ProviderFromRef(sb.Context(), target)
require.NoError(t, err)
imgs, err := testutil.ReadImages(sb.Context(), provider, desc)
require.NoError(t, err)
diff --git a/tests/policy_build.go b/tests/policy_build.go
index 3c1fabf35c0d..ac99a6e7de2f 100644
--- a/tests/policy_build.go
+++ b/tests/policy_build.go
@@ -285,7 +285,7 @@ func testBuildPolicyImageName(t *testing.T, sb integration.Sandbox) {
baseOut, err := baseCmd.CombinedOutput()
require.NoError(t, err, string(baseOut))
- baseDesc, provider, err := contentutil.ProviderFromRef(baseRef)
+ baseDesc, provider, err := contentutil.ProviderFromRef(sb.Context(), baseRef)
require.NoError(t, err)
_, err = testutil.ReadImages(sb.Context(), provider, baseDesc)
require.NoError(t, err)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
index ba7e7270d918..2ce6d4939ea9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -3,4 +3,4 @@
package aws
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.43.0"
+const goModuleVersion = "1.43.8"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
index d66f0960aa50..ba2082411fbe 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
@@ -15,6 +15,8 @@ type RegisterServiceMetadata struct {
SigningName string
Region string
OperationName string
+
+ RequiresLegacyEndpoints bool
}
// ID returns the middleware identifier.
@@ -33,10 +35,13 @@ func (s RegisterServiceMetadata) HandleInitialize(
ctx = SetSigningName(ctx, s.SigningName)
}
if len(s.Region) > 0 {
- ctx = setRegion(ctx, s.Region)
+ ctx = SetRegion(ctx, s.Region)
}
if len(s.OperationName) > 0 {
- ctx = setOperationName(ctx, s.OperationName)
+ ctx = SetOperationName(ctx, s.OperationName)
+ }
+ if s.RequiresLegacyEndpoints {
+ ctx = SetRequiresLegacyEndpoints(ctx, true)
}
return next.HandleInitialize(ctx, in)
}
@@ -161,19 +166,19 @@ func SetServiceID(ctx context.Context, value string) context.Context {
return middleware.WithStackValue(ctx, serviceIDKey{}, value)
}
-// setRegion sets the endpoint region on the context.
+// SetRegion sets the endpoint region on the context.
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
-func setRegion(ctx context.Context, value string) context.Context {
+func SetRegion(ctx context.Context, value string) context.Context {
return middleware.WithStackValue(ctx, regionKey{}, value)
}
-// setOperationName sets the service operation on the context.
+// SetOperationName sets the service operation on the context.
//
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
// to clear all stack values.
-func setOperationName(ctx context.Context, value string) context.Context {
+func SetOperationName(ctx context.Context, value string) context.Context {
return middleware.WithStackValue(ctx, operationNameKey{}, value)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
index d99b32ceb072..0b9ddd13ba35 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
@@ -58,6 +58,10 @@ var RequiredSignedHeaders = Rules{
"X-Amz-Tagging": struct{}{},
},
},
+ InclusiveRules{
+ Patterns{"X-Amz-Checksum-"},
+ ExcludeList{Patterns{"X-Amz-Checksum-Mode"}},
+ },
Patterns{"X-Amz-Object-Lock-"},
Patterns{"X-Amz-Meta-"},
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
index 49cc31205c5c..94094ec2cdb5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
@@ -2,6 +2,7 @@ package http
import (
"context"
+ "crypto/fips140"
"crypto/tls"
"net"
"net/http"
@@ -27,6 +28,19 @@ var (
// Default to TLS 1.2 for all HTTPS requests.
DefaultHTTPTransportTLSMinVersion uint16 = tls.VersionTLS12
+
+ // DefaultHTTPTransportTLSCurvePreferencesFIPS is the elliptic curve preference
+ // list applied to the default transport when the FIPS 140-3 module is active.
+ //
+ // Go's default preferences lead with X25519, which crypto/ecdh rejects under
+ // GODEBUG=fips140=only, failing every TLS handshake the SDK attempts. Only the
+ // NIST curves are FIPS-approved, so restricting to them keeps the default
+ // client usable in FIPS deployments.
+ DefaultHTTPTransportTLSCurvePreferencesFIPS = []tls.CurveID{
+ tls.CurveP256,
+ tls.CurveP384,
+ tls.CurveP521,
+ }
)
// Timeouts for net.Dialer's network connection.
@@ -178,6 +192,16 @@ func defaultDialer() *net.Dialer {
}
}
+// defaultTLSCurvePreferences returns the curve preferences for the default
+// transport. Outside FIPS mode it returns nil so Go's own defaults apply,
+// preserving X25519 and the post-quantum X25519MLKEM768 hybrid.
+func defaultTLSCurvePreferences(fipsEnabled bool) []tls.CurveID {
+ if !fipsEnabled {
+ return nil
+ }
+ return DefaultHTTPTransportTLSCurvePreferencesFIPS
+}
+
func defaultHTTPTransport() *http.Transport {
dialer := defaultDialer()
@@ -192,7 +216,8 @@ func defaultHTTPTransport() *http.Transport {
ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout,
ForceAttemptHTTP2: true,
TLSClientConfig: &tls.Config{
- MinVersion: DefaultHTTPTransportTLSMinVersion,
+ MinVersion: DefaultHTTPTransportTLSMinVersion,
+ CurvePreferences: defaultTLSCurvePreferences(fips140.Enabled()),
},
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
index 589f82973f1d..0e63cf29106a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.32.39 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.38 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.37 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.36 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.35 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.34 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.32.33 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.32 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.32.31 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
index 0b48de0f80c6..f419b379b07e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -3,4 +3,4 @@
package config
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.32.31"
+const goModuleVersion = "1.32.39"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
index d26df488638d..0a1b231c8db0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.19.38 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.37 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.36 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.35 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.34 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.33 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.19.32 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.31 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.19.30 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
index dc291c97cd7e..429e3261e501 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
@@ -104,8 +104,6 @@ func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput
addProtocolFinalizerMiddlewares(stack, options, "GetCredentials")
retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer})
middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID)
- smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
- smithyhttp.AddCloseResponseBodyMiddleware(stack)
for _, fn := range options.APIOptions {
if err := fn(stack); err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
index f2820d20eac7..ba9858905258 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
@@ -82,12 +82,18 @@ func (d *deserializeOpGetCredential) HandleDeserialize(ctx context.Context, in s
out smithymiddleware.DeserializeOutput, metadata smithymiddleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
+
+ // Close the response body on every exit path in place of the standalone close middleware.
+ // Deferred in a closure so it observes the final err (this output is not a streaming
+ // payload, so it is always closed regardless).
+ response, _ := out.RawResponse.(*smithyhttp.Response)
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
if err != nil {
return out, metadata, err
}
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
+ if response == nil {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
index e75a38fe2501..86c678adfbe3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -3,4 +3,4 @@
package credentials
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.19.30"
+const goModuleVersion = "1.19.38"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
index 2dc09fe9bfc2..d1188d88d3f4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.18.39 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.38 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.37 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.36 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.35 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.34 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.18.33 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.32 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.18.31 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
index 38253be79b19..63168d3a22ea 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -3,4 +3,4 @@
package imds
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.18.31"
+const goModuleVersion = "1.18.39"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
index 03d1578b107c..0189638f53d0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.4.39 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.38 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.37 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.36 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.35 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.34 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.4.33 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.32 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.4.31 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
index 29af6501042c..8aedf873b716 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
@@ -3,4 +3,4 @@
package configsources
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.4.31"
+const goModuleVersion = "1.4.39"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
index ab7609799acb..ce640e3b9103 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v2.7.39 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.38 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.37 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.36 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.35 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.34 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v2.7.33 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.7.32 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v2.7.31 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
index 29f2aedc7580..6e5d8ea06e31 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
@@ -3,4 +3,4 @@
package endpoints
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "2.7.31"
+const goModuleVersion = "2.7.39"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
index fecf8ec4822f..76edfcce51d5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.4.40 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.39 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.38 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.37 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.36 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.35 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.4.34 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.33 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.4.32 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
index cd7be2fd2fcf..e2d5936cc83d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
@@ -3,4 +3,4 @@
package v4a
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.4.32"
+const goModuleVersion = "1.4.40"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
index 33bb210356a5..34af7281b906 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
@@ -1,3 +1,23 @@
+# v1.13.18 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+
+# v1.13.17 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+
+# v1.13.16 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+
+# v1.13.15 (2026-07-31.2)
+
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.13.14 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+
# v1.13.13 (2026-07-01)
* No change notes available for this release.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
index b02fbce7f2e6..217c46705495 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
@@ -3,4 +3,4 @@
package acceptencoding
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.13.13"
+const goModuleVersion = "1.13.18"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
index 52940298068a..d36a51427cc6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.13.39 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.38 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.37 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.36 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.35 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.34 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.13.33 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.32 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.13.31 (2026-07-21)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
index d180642c3493..c49c3bfa9568 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
@@ -3,4 +3,4 @@
package presignedurl
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.13.31"
+const goModuleVersion = "1.13.39"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md
index 627ee90ec356..dc970e62b3d8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.5.8 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.7 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.6 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.5 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.4 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.3 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.5.2 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.5.0 (2026-07-21)
* **Feature**: Add an option to clients to disable clock skew
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go
index 2094f01d2719..569cc4bb9a91 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_client.go
@@ -263,6 +263,10 @@ func (c *Client) invokeOperation(
finalizeClientEndpointResolverOptions(&options)
+ ctx = setLoggerContext(ctx, options, opID)
+
+ ctx = resolveServiceMetadata(ctx, options, opID)
+
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
return nil, metadata, err
}
@@ -379,9 +383,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options,
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
- if err := addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
if err := addClientRequestID(stack); err != nil {
return err
}
@@ -434,30 +435,6 @@ func resolveAuthSchemes(options *Options) {
type noSmithyDocumentSerde = smithydocument.NoSerde
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -465,8 +442,9 @@ func resolveDefaultLogger(o *Options) {
o.Logger = logging.Nop{}
}
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+func setLoggerContext(ctx context.Context, options Options, operation string) context.Context {
+ _ = operation
+ return middleware.SetLogger(ctx, options.Logger)
}
func setResolvedDefaultsMode(o *Options) {
@@ -883,12 +861,16 @@ type IdempotencyTokenProvider interface {
GetIdempotencyToken() (string, error)
}
-func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: operation,
+func resolveServiceMetadata(ctx context.Context, options Options, operation string) context.Context {
+ ctx = awsmiddleware.SetServiceID(ctx, ServiceID)
+ if options.Region != "" {
+ ctx = awsmiddleware.SetRegion(ctx, options.Region)
+ }
+ ctx = awsmiddleware.SetOperationName(ctx, operation)
+ if options.EndpointResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
}
+ return ctx
}
func addRecursionDetection(stack *middleware.Stack) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go
index 00bec7fb7eaf..de7d50f9b180 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2Token.go
@@ -7,7 +7,6 @@ import (
"github.com/aws/aws-sdk-go-v2/service/signin/types"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// CreateOAuth2Token API
@@ -117,9 +116,6 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -129,21 +125,12 @@ func (c *Client) addOperationCreateOAuth2TokenMiddlewares(stack *middleware.Stac
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpCreateOAuth2TokenValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateOAuth2Token"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go
index f66701cd3db0..5fd96524797f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Grants permission to exchange client credentials for an OAuth 2.0 access token
@@ -85,9 +84,6 @@ func (c *Client) addOperationCreateOAuth2TokenWithIAMMiddlewares(stack *middlewa
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -100,21 +96,12 @@ func (c *Client) addOperationCreateOAuth2TokenWithIAMMiddlewares(stack *middlewa
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpCreateOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateOAuth2TokenWithIAM"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go
index 749157c227af..d1a28728d55c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteConsoleAuthorizationConfiguration.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Delete console authorization configuration with automatic scope detection
@@ -73,9 +72,6 @@ func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares(
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,18 +84,9 @@ func (c *Client) addOperationDeleteConsoleAuthorizationConfigurationMiddlewares(
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteConsoleAuthorizationConfiguration"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go
index d76325ff805a..a730417ff69b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_DeleteResourcePermissionStatement.go
@@ -7,7 +7,6 @@ import (
"fmt"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Remove a permission statement from the account's SignIn resource-based policy
@@ -63,9 +62,6 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -78,12 +74,6 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
@@ -93,9 +83,6 @@ func (c *Client) addOperationDeleteResourcePermissionStatementMiddlewares(stack
if err = addOpDeleteResourcePermissionStatementValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DeleteResourcePermissionStatement"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go
index 74a927da1bf3..64060707cf1a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetConsoleAuthorizationConfiguration.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Get console authorization configuration with automatic scope detection
@@ -73,9 +72,6 @@ func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,18 +84,9 @@ func (c *Client) addOperationGetConsoleAuthorizationConfigurationMiddlewares(sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetConsoleAuthorizationConfiguration"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go
index 4ee0d496ad03..08cb6cb06e46 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetResourcePolicy.go
@@ -7,7 +7,6 @@ import (
"github.com/aws/aws-sdk-go-v2/service/signin/types"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieve the account's consolidated SignIn resource-based policy
@@ -60,9 +59,6 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -75,18 +71,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetResourcePolicy"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_IntrospectOAuth2TokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_IntrospectOAuth2TokenWithIAM.go
index 610390995d62..ebfa6563cbfb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_IntrospectOAuth2TokenWithIAM.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_IntrospectOAuth2TokenWithIAM.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Grants permission to inspect the metadata and state of an OAuth 2.0 access
@@ -135,9 +134,6 @@ func (c *Client) addOperationIntrospectOAuth2TokenWithIAMMiddlewares(stack *midd
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -150,21 +146,12 @@ func (c *Client) addOperationIntrospectOAuth2TokenWithIAMMiddlewares(stack *midd
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpIntrospectOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "IntrospectOAuth2TokenWithIAM"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go
index 2cb7c5c67ffe..a22859f4e7a3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListResourcePermissionStatements.go
@@ -8,7 +8,6 @@ import (
"github.com/aws/aws-sdk-go-v2/service/signin/types"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Retrieve all permission statements in the account's SignIn resource-based policy
@@ -71,9 +70,6 @@ func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack *
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -86,18 +82,9 @@ func (c *Client) addOperationListResourcePermissionStatementsMiddlewares(stack *
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListResourcePermissionStatements"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go
index 7f2bc68ada0a..08b5bf3faa9e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutConsoleAuthorizationConfiguration.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Enable console authorization configuration with automatic scope detection
@@ -73,9 +72,6 @@ func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,18 +84,9 @@ func (c *Client) addOperationPutConsoleAuthorizationConfigurationMiddlewares(sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutConsoleAuthorizationConfiguration"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go
index 071e1fb506e8..14e93c19a82b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_PutResourcePermissionStatement.go
@@ -7,7 +7,6 @@ import (
"fmt"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Create a permission statement in the account's SignIn resource-based policy
@@ -86,9 +85,6 @@ func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *mi
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -101,21 +97,12 @@ func (c *Client) addOperationPutResourcePermissionStatementMiddlewares(stack *mi
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addIdempotencyToken_opPutResourcePermissionStatementMiddleware(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "PutResourcePermissionStatement"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_RevokeOAuth2TokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_RevokeOAuth2TokenWithIAM.go
index 3524e1eccd34..f72427aef43d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_RevokeOAuth2TokenWithIAM.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_RevokeOAuth2TokenWithIAM.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/smithy-go/middleware"
"github.com/aws/smithy-go/ptr"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Grants permission to revoke an OAuth 2.0 refresh token and its associated
@@ -73,9 +72,6 @@ func (c *Client) addOperationRevokeOAuth2TokenWithIAMMiddlewares(stack *middlewa
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,21 +84,12 @@ func (c *Client) addOperationRevokeOAuth2TokenWithIAMMiddlewares(stack *middlewa
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpRevokeOAuth2TokenWithIAMValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RevokeOAuth2TokenWithIAM"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go
index e78be3229e4d..cc6b07d95cce 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/deserializers.go
@@ -34,15 +34,18 @@ func (m *awsRestjson1_deserializeOpCreateOAuth2Token) HandleDeserialize(ctx cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorCreateOAuth2Token(response, &metadata)
}
@@ -195,15 +198,18 @@ func (m *awsRestjson1_deserializeOpCreateOAuth2TokenWithIAM) HandleDeserialize(c
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorCreateOAuth2TokenWithIAM(response, &metadata)
}
@@ -382,15 +388,18 @@ func (m *awsRestjson1_deserializeOpDeleteConsoleAuthorizationConfiguration) Hand
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorDeleteConsoleAuthorizationConfiguration(response, &metadata)
}
@@ -568,15 +577,18 @@ func (m *awsRestjson1_deserializeOpDeleteResourcePermissionStatement) HandleDese
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourcePermissionStatement(response, &metadata)
}
@@ -668,15 +680,18 @@ func (m *awsRestjson1_deserializeOpGetConsoleAuthorizationConfiguration) HandleD
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorGetConsoleAuthorizationConfiguration(response, &metadata)
}
@@ -854,15 +869,18 @@ func (m *awsRestjson1_deserializeOpGetResourcePolicy) HandleDeserialize(ctx cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata)
}
@@ -1015,15 +1033,18 @@ func (m *awsRestjson1_deserializeOpIntrospectOAuth2TokenWithIAM) HandleDeseriali
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorIntrospectOAuth2TokenWithIAM(response, &metadata)
}
@@ -1309,15 +1330,18 @@ func (m *awsRestjson1_deserializeOpListResourcePermissionStatements) HandleDeser
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorListResourcePermissionStatements(response, &metadata)
}
@@ -1482,15 +1506,18 @@ func (m *awsRestjson1_deserializeOpPutConsoleAuthorizationConfiguration) HandleD
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorPutConsoleAuthorizationConfiguration(response, &metadata)
}
@@ -1671,15 +1698,18 @@ func (m *awsRestjson1_deserializeOpPutResourcePermissionStatement) HandleDeseria
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePermissionStatement(response, &metadata)
}
@@ -1842,15 +1872,18 @@ func (m *awsRestjson1_deserializeOpRevokeOAuth2TokenWithIAM) HandleDeserialize(c
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorRevokeOAuth2TokenWithIAM(response, &metadata)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go
index c430df151f52..2b95634c1fde 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go
@@ -3,4 +3,4 @@
package signin
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.5.0"
+const goModuleVersion = "1.5.8"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
index f9f09bb018a9..4070f4cd522a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.33.8 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.7 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.6 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.5 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.4 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.3 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.33.2 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.1 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.33.0 (2026-07-21)
* **Feature**: Add an option to clients to disable clock skew
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
index 76b3527d35db..9e6f5b2bf37b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
@@ -259,6 +259,10 @@ func (c *Client) invokeOperation(
finalizeClientEndpointResolverOptions(&options)
+ ctx = setLoggerContext(ctx, options, opID)
+
+ ctx = resolveServiceMetadata(ctx, options, opID)
+
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
return nil, metadata, err
}
@@ -375,9 +379,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options,
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
- if err := addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
if err := addClientRequestID(stack); err != nil {
return err
}
@@ -430,30 +431,6 @@ func resolveAuthSchemes(options *Options) {
type noSmithyDocumentSerde = smithydocument.NoSerde
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -461,8 +438,9 @@ func resolveDefaultLogger(o *Options) {
o.Logger = logging.Nop{}
}
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+func setLoggerContext(ctx context.Context, options Options, operation string) context.Context {
+ _ = operation
+ return middleware.SetLogger(ctx, options.Logger)
}
func setResolvedDefaultsMode(o *Options) {
@@ -867,12 +845,16 @@ func resolveMeterProvider(options *Options) {
}
}
-func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: operation,
+func resolveServiceMetadata(ctx context.Context, options Options, operation string) context.Context {
+ ctx = awsmiddleware.SetServiceID(ctx, ServiceID)
+ if options.Region != "" {
+ ctx = awsmiddleware.SetRegion(ctx, options.Region)
+ }
+ ctx = awsmiddleware.SetOperationName(ctx, operation)
+ if options.EndpointResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
}
+ return ctx
}
func addRecursionDetection(stack *middleware.Stack) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
index cefc88ad8ebc..83666293b700 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sso/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the STS short-term credentials for a given role name that is assigned
@@ -70,9 +69,6 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -82,21 +78,12 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetRoleCredentials"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
index c766f1c44e4d..0bd420d8fdf0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
@@ -7,7 +7,6 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/sso/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all roles that are assigned to the user for a given AWS account.
@@ -76,9 +75,6 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,21 +84,12 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpListAccountRolesValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccountRoles"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
index e8af94746c24..ae1fd14aefeb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
@@ -7,7 +7,6 @@ import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/sso/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all AWS accounts assigned to the user. These AWS accounts are assigned by
@@ -75,9 +74,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -87,21 +83,12 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpListAccountsValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "ListAccounts"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
index 2f38f944e149..49aa156d352d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
@@ -5,7 +5,6 @@ package sso
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes the locally stored SSO tokens from the client-side cache and sends an
@@ -69,9 +68,6 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -81,21 +77,12 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpLogoutValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "Logout"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
index bfa1758c8a76..dbc691c49e88 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
@@ -34,15 +34,18 @@ func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx con
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorGetRoleCredentials(response, &metadata)
}
@@ -195,15 +198,18 @@ func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx conte
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorListAccountRoles(response, &metadata)
}
@@ -365,15 +371,18 @@ func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.C
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorListAccounts(response, &metadata)
}
@@ -535,15 +544,18 @@ func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorLogout(response, &metadata)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
index 37c3e625a6db..752b053243eb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
@@ -3,4 +3,4 @@
package sso
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.33.0"
+const goModuleVersion = "1.33.8"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
index f4c8658d93e0..0ce6fa15265c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.38.8 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.7 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.6 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.5 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.4 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.3 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.38.2 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.1 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.38.0 (2026-07-21)
* **Feature**: Add an option to clients to disable clock skew
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
index 0ab277871b50..26c0798b6c2a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
@@ -259,6 +259,10 @@ func (c *Client) invokeOperation(
finalizeClientEndpointResolverOptions(&options)
+ ctx = setLoggerContext(ctx, options, opID)
+
+ ctx = resolveServiceMetadata(ctx, options, opID)
+
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
return nil, metadata, err
}
@@ -375,9 +379,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options,
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
- if err := addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
if err := addClientRequestID(stack); err != nil {
return err
}
@@ -430,30 +431,6 @@ func resolveAuthSchemes(options *Options) {
type noSmithyDocumentSerde = smithydocument.NoSerde
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -461,8 +438,9 @@ func resolveDefaultLogger(o *Options) {
o.Logger = logging.Nop{}
}
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+func setLoggerContext(ctx context.Context, options Options, operation string) context.Context {
+ _ = operation
+ return middleware.SetLogger(ctx, options.Logger)
}
func setResolvedDefaultsMode(o *Options) {
@@ -867,12 +845,16 @@ func resolveMeterProvider(options *Options) {
}
}
-func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: operation,
+func resolveServiceMetadata(ctx context.Context, options Options, operation string) context.Context {
+ ctx = awsmiddleware.SetServiceID(ctx, ServiceID)
+ if options.Region != "" {
+ ctx = awsmiddleware.SetRegion(ctx, options.Region)
+ }
+ ctx = awsmiddleware.SetOperationName(ctx, operation)
+ if options.EndpointResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
}
+ return ctx
}
func addRecursionDetection(stack *middleware.Stack) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
index bba750bc7074..628e10486a8a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
@@ -5,7 +5,6 @@ package ssooidc
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates and returns access and refresh tokens for clients that are
@@ -140,9 +139,6 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -152,21 +148,12 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpCreateTokenValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateToken"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
index 2c6de5a8394a..ce634d260b23 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/ssooidc/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates and returns access and refresh tokens for authorized client
@@ -184,9 +183,6 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -199,21 +195,12 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "CreateTokenWithIAM"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
index 2df6cba224a8..755ed68b7b7f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
@@ -5,7 +5,6 @@ package ssooidc
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Registers a public client with IAM Identity Center. This allows clients to
@@ -111,9 +110,6 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack,
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -123,21 +119,12 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack,
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpRegisterClientValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "RegisterClient"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
index 232ff802ebd7..7a05e9f640d5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
@@ -5,7 +5,6 @@ package ssooidc
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Initiates device authorization by requesting a pair of verification codes from
@@ -93,9 +92,6 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -105,21 +101,12 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "StartDeviceAuthorization"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
index fb9a0df51942..da4a9e2f5408 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
@@ -34,15 +34,18 @@ func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Co
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorCreateToken(response, &metadata)
}
@@ -260,15 +263,18 @@ func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx con
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorCreateTokenWithIAM(response, &metadata)
}
@@ -508,15 +514,18 @@ func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorRegisterClient(response, &metadata)
}
@@ -735,15 +744,18 @@ func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(c
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response, &metadata)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
index cbe02320ac8a..eab7b350720c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
@@ -3,4 +3,4 @@
package ssooidc
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.38.0"
+const goModuleVersion = "1.38.8"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
index 6082149d1f61..7e415c6dc6dc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
@@ -1,3 +1,40 @@
+# v1.45.8 (2026-08-25)
+
+* **Dependency Update**: Update to smithy-go v1.27.10.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.7 (2026-08-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.6 (2026-08-14)
+
+* **Dependency Update**: Update to smithy-go v1.27.8.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.5 (2026-08-10)
+
+* **Dependency Update**: Update to smithy-go v1.27.7.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.4 (2026-08-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.3 (2026-07-31.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.27.6 to fix various serde issues in HTTP binding services.
+
+# v1.45.2 (2026-07-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.45.1 (2026-07-28)
+
+* **Dependency Update**: Update to smithy-go v1.27.5.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.45.0 (2026-07-21)
* **Feature**: Add an option to clients to disable clock skew
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
index da6a5b3060cb..78dd88486e72 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
@@ -268,6 +268,10 @@ func (c *Client) invokeOperation(
finalizeClientEndpointResolverOptions(&options)
+ ctx = setLoggerContext(ctx, options, opID)
+
+ ctx = resolveServiceMetadata(ctx, options, opID)
+
if err := c.addCommonMiddlewares(stack, options, opID); err != nil {
return nil, metadata, err
}
@@ -384,9 +388,6 @@ func (c *Client) addCommonMiddlewares(stack *middleware.Stack, options Options,
if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
- if err := addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
if err := addClientRequestID(stack); err != nil {
return err
}
@@ -444,30 +445,6 @@ func resolveAuthSchemes(options *Options) {
type noSmithyDocumentSerde = smithydocument.NoSerde
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
func resolveDefaultLogger(o *Options) {
if o.Logger != nil {
return
@@ -475,8 +452,9 @@ func resolveDefaultLogger(o *Options) {
o.Logger = logging.Nop{}
}
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+func setLoggerContext(ctx context.Context, options Options, operation string) context.Context {
+ _ = operation
+ return middleware.SetLogger(ctx, options.Logger)
}
func setResolvedDefaultsMode(o *Options) {
@@ -905,12 +883,16 @@ func resolveMeterProvider(options *Options) {
}
}
-func newServiceMetadataMiddleware(region, operation string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: operation,
+func resolveServiceMetadata(ctx context.Context, options Options, operation string) context.Context {
+ ctx = awsmiddleware.SetServiceID(ctx, ServiceID)
+ if options.Region != "" {
+ ctx = awsmiddleware.SetRegion(ctx, options.Region)
+ }
+ ctx = awsmiddleware.SetOperationName(ctx, operation)
+ if options.EndpointResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
}
+ return ctx
}
func addRecursionDetection(stack *middleware.Stack) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
index d10f11a620cb..ba1798d541d8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
@@ -7,7 +7,6 @@ import (
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of temporary security credentials that you can use to access
@@ -422,9 +421,6 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -437,21 +433,12 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpAssumeRoleValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRole"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
index bd5bfdc224c6..565120003a86 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of temporary security credentials for users who have been
@@ -360,9 +359,6 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -372,21 +368,12 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithSAML"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
index 6f6ea05b5ed3..f1bd15a00e78 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of temporary security credentials for users who have been
@@ -377,9 +376,6 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -389,21 +385,12 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoleWithWebIdentity"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
index 92aee490801b..1687dc74e501 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of short term credentials you can use to perform privileged tasks
@@ -131,9 +130,6 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -146,21 +142,12 @@ func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, opti
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpAssumeRootValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "AssumeRoot"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
index e3294e3241d5..819b5d9f2f77 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
@@ -5,7 +5,6 @@ package sts
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Decodes additional information about the authorization status of a request from
@@ -91,9 +90,6 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -106,21 +102,12 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "DecodeAuthorizationMessage"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
index 4d1dbed59dcd..cf424c8625b3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
@@ -5,7 +5,6 @@ package sts
import (
"context"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns the account identifier for the specified access key ID.
@@ -82,9 +81,6 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -97,21 +93,12 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetAccessKeyInfo"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
index 8901bef2c400..d4148a1c35b5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns details about the IAM user or role whose credentials are used to call
@@ -73,9 +72,6 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -88,18 +84,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetCallerIdentity"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go
index f013cb9330d5..e0e067289085 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Exchanges a trade-in token for temporary Amazon Web Services credentials with
@@ -71,9 +70,6 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -86,21 +82,12 @@ func (c *Client) addOperationGetDelegatedAccessTokenMiddlewares(stack *middlewar
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpGetDelegatedAccessTokenValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetDelegatedAccessToken"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
index fbee53221e72..606d0cdc2679 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of temporary security credentials (consisting of an access key
@@ -295,9 +294,6 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -310,21 +306,12 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetFederationToken"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
index 6b5c8ed171d9..873090b1e91b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Returns a set of temporary credentials for an Amazon Web Services account or
@@ -144,9 +143,6 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -159,18 +155,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetSessionToken"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go
index 1c45a28e7364..4525e2e247c6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go
@@ -6,7 +6,6 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
@@ -94,9 +93,6 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
return err
}
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
if err = addComputeContentLength(stack); err != nil {
return err
}
@@ -109,21 +105,12 @@ func (c *Client) addOperationGetWebIdentityTokenMiddlewares(stack *middleware.St
if err = addRecordResponseTiming(stack, options); err != nil {
return err
}
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
if err = addCredentialSource(stack, options); err != nil {
return err
}
if err = addOpGetWebIdentityTokenValidationMiddleware(stack); err != nil {
return err
}
- if err = stack.Initialize.Add(newServiceMetadataMiddleware(options.Region, "GetWebIdentityToken"), middleware.Before); err != nil {
- return err
- }
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
index 8c1ce351616b..45e073ffdc47 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
@@ -38,15 +38,18 @@ func (m *awsAwsquery_deserializeOpAssumeRole) HandleDeserialize(ctx context.Cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorAssumeRole(response, &metadata)
}
@@ -159,15 +162,18 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response, &metadata)
}
@@ -286,15 +292,18 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(c
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response, &metadata)
}
@@ -416,15 +425,18 @@ func (m *awsAwsquery_deserializeOpAssumeRoot) HandleDeserialize(ctx context.Cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoot(response, &metadata)
}
@@ -531,15 +543,18 @@ func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize(
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response, &metadata)
}
@@ -643,15 +658,18 @@ func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx contex
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response, &metadata)
}
@@ -752,15 +770,18 @@ func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx conte
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetCallerIdentity(response, &metadata)
}
@@ -861,15 +882,18 @@ func (m *awsAwsquery_deserializeOpGetDelegatedAccessToken) HandleDeserialize(ctx
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetDelegatedAccessToken(response, &metadata)
}
@@ -979,15 +1003,18 @@ func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx cont
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetFederationToken(response, &metadata)
}
@@ -1097,15 +1124,18 @@ func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetSessionToken(response, &metadata)
}
@@ -1209,15 +1239,18 @@ func (m *awsAwsquery_deserializeOpGetWebIdentityToken) HandleDeserialize(ctx con
return out, metadata, err
}
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
response, ok := out.RawResponse.(*smithyhttp.Response)
if !ok {
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
}
+ defer func() { smithyhttp.CloseResponseBody(ctx, response, false, err) }()
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+
if response.StatusCode < 200 || response.StatusCode >= 300 {
return out, metadata, awsAwsquery_deserializeOpErrorGetWebIdentityToken(response, &metadata)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
index fcea011075b7..065b78852e14 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
@@ -3,4 +3,4 @@
package sts
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.45.0"
+const goModuleVersion = "1.45.8"
diff --git a/vendor/github.com/aws/smithy-go/AGENTS.md b/vendor/github.com/aws/smithy-go/AGENTS.md
index e2a75b8ea194..de1e3b2bbe9f 100644
--- a/vendor/github.com/aws/smithy-go/AGENTS.md
+++ b/vendor/github.com/aws/smithy-go/AGENTS.md
@@ -68,8 +68,9 @@ cd codegen && ./gradlew build
cd codegen && ./gradlew publishToMavenLocal
```
-The codegen artifact version is fixed at `0.1.0` and is not published to
-Maven Central — you **MUST** `publishToMavenLocal`.
+The codegen artifact version is published to Maven Central and bumped on each
+release. For local development against unreleased codegen changes, use
+`publishToMavenLocal` and point consumers at `mavenLocal()`.
## Runtime architecture
diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md
index e5844fa776ac..39eed5ab198e 100644
--- a/vendor/github.com/aws/smithy-go/CHANGELOG.md
+++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md
@@ -1,3 +1,63 @@
+# Release (2026-08-25)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.10
+ * **Bug Fix**: Fix a data race on the underlying writer when an event stream is closed while an event write is in flight.
+ * **Bug Fix**: Restore draining the HTTP response body in `CloseResponseBody` to avoid issues with TCP connection reuse.
+
+# Release (2026-08-21)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.9
+ * **Bug Fix**: Fix a generic event stream exception not carrying the error code and message from its payload.
+ * **Bug Fix**: Fix an event stream not being closed when its connection is lost, which would cause a caller writing to the stream to block indefinitely.
+ * **Bug Fix**: Fix deserialization of an empty list producing a nil slice instead of an empty one.
+ * **Bug Fix**: Restore draining the HTTP response body in `CloseResponseBody` to avoid issues with TCP connection reuse.
+
+# Release (2026-08-14)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.8
+ * **Bug Fix**: Restore draining the HTTP response body in `CloseResponseBody` to avoid issues with TCP connection reuse.
+
+# Release (2026-08-07)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.7
+ * **Bug Fix**: Don't serialize unset JSON documents as `nil` in structure members.
+ * **Bug Fix**: Fix a deserialization panic around collection members in recursive shape configs.
+
+# Release (2026-07-31)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.6
+ * **Bug Fix**: Fix failure to deserialize any `@httpPayload` struct with a non-string member.
+ * **Bug Fix**: Fix failure to serialize any `@httpPayload` struct with a nested struct.
+
+# Release (2026-07-27)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.27.5
+ * **Bug Fix**: Fix a performance issue in awsQuery with large response payloads.
+
# Release (2026-07-16)
## General Highlights
diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md
index c5e14564b415..ac5a0a6139f2 100644
--- a/vendor/github.com/aws/smithy-go/README.md
+++ b/vendor/github.com/aws/smithy-go/README.md
@@ -11,8 +11,8 @@ The smithy-go runtime requires a minimum version of Go 1.24.
## :warning: Client codegen is unstable
The client code generator in this repository powers the aws-sdk-go-v2.
-Arbitrary client generation, while technically possible, is in an early stage
-of development:
+Arbitrary client generation, while possible, is in an early stage of
+development:
* Generated clients are missing certain features that were originally
implemented SDK-side (e.g. retries)
@@ -32,8 +32,6 @@ This repository implements the following Smithy build plugins:
| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. |
| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go shape code generation (types only) for Smithy models. |
-**NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.**
-
## `go-codegen`
### Configuration
@@ -79,7 +77,7 @@ example created from `smithy init`:
],
"maven": {
"dependencies": [
- "software.amazon.smithy.go:smithy-go-codegen:0.1.0"
+ "software.amazon.smithy.go:smithy-go-codegen:[0.1.0,2.0)"
]
},
"plugins": {
diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go
index 65d2b6dede49..02daf054153d 100644
--- a/vendor/github.com/aws/smithy-go/go_module_metadata.go
+++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go
@@ -3,4 +3,4 @@
package smithy
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.27.4"
+const goModuleVersion = "1.27.10"
diff --git a/vendor/github.com/aws/smithy-go/schema.go b/vendor/github.com/aws/smithy-go/schema.go
index 6293d34b1e3e..8e9c209a5808 100644
--- a/vendor/github.com/aws/smithy-go/schema.go
+++ b/vendor/github.com/aws/smithy-go/schema.go
@@ -71,8 +71,9 @@ type Schema struct {
directMask uint64 // bitmask: bit i set means indexed[i] was declared directly on this schema
targetID ShapeID // for member schemas, the target's shape ID
- listMember *Schema
- mapKey, mapValue *Schema
+ // resolved on the fly and cached
+ listMember atomic.Pointer[Schema]
+ mapKey, mapValue atomic.Pointer[Schema]
ext [numExtensionSlots]unsafe.Pointer // lazily-computed codec extensions, accessed atomically
}
@@ -126,9 +127,6 @@ func (s *Schema) AddMember(name string, target *Schema, ts ...Trait) *Schema {
traits: cloneTraits(target.traits),
directMask: 0, // inherited traits are not direct
targetID: target.id,
- listMember: target.listMember,
- mapKey: target.mapKey,
- mapValue: target.mapValue,
}
// member-declared traits override and are direct
@@ -143,14 +141,6 @@ func (s *Schema) AddMember(name string, target *Schema, ts ...Trait) *Schema {
atomic.StorePointer(&s.ext[i], nil)
}
- switch name {
- case "member":
- s.listMember = m
- case "key":
- s.mapKey = m
- case "value":
- s.mapValue = m
- }
return m
}
@@ -176,17 +166,31 @@ func cloneTraits(src map[ShapeID]Trait) map[ShapeID]Trait {
// ListMember returns the "member" schema for list types.
func (s *Schema) ListMember() *Schema {
- return s.listMember
+ return s.lookup(&s.listMember, "member")
}
// MapKey returns the "key" schema for map types.
func (s *Schema) MapKey() *Schema {
- return s.mapKey
+ return s.lookup(&s.mapKey, "key")
}
// MapValue returns the "value" schema for map types.
func (s *Schema) MapValue() *Schema {
- return s.mapValue
+ return s.lookup(&s.mapValue, "value")
+}
+
+func (s *Schema) lookup(cached *atomic.Pointer[Schema], name string) *Schema {
+ if v := cached.Load(); v != nil {
+ return v
+ }
+
+ m, ok := s.members[name]
+ if !ok {
+ return nil
+ }
+
+ cached.Store(m)
+ return m
}
// MemberName returns the member component of the schema's shape ID.
diff --git a/vendor/github.com/aws/smithy-go/schema_ext.go b/vendor/github.com/aws/smithy-go/schema_ext.go
index 7503b30b806c..e98427ae3450 100644
--- a/vendor/github.com/aws/smithy-go/schema_ext.go
+++ b/vendor/github.com/aws/smithy-go/schema_ext.go
@@ -9,13 +9,14 @@ import (
// (JSON, CBOR, etc.) uses a distinct slot to cache precomputed data.
type ExtensionID int
-const numExtensionSlots = 4
+const numExtensionSlots = 5
const (
- ExtJSON ExtensionID = iota // transport/http/protocol/internal/json
- ExtCBOR // transport/http/protocol/internal/cbor
- ExtXML // transport/http/protocol/internal/xml
- ExtQuery // transport/http/protocol/internal/query
+ ExtJSON ExtensionID = iota // transport/http/protocol/internal/json
+ ExtCBOR // transport/http/protocol/internal/cbor
+ ExtXML // transport/http/protocol/internal/xml
+ ExtQuery // transport/http/protocol/internal/query
+ ExtHTTPBinding // transport/http/protocol/internal/httpbinding
)
// SchemaExtension retrieves or lazily computes the extension for the given
diff --git a/vendor/github.com/aws/smithy-go/transport/http/eventstream.go b/vendor/github.com/aws/smithy-go/transport/http/eventstream.go
index 251db8ac35b8..970ade30e20a 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/eventstream.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/eventstream.go
@@ -56,7 +56,10 @@ func NewEventStreamWriter(protocol ClientProtocol, schema *smithy.Schema, stream
}
func (w *EventStreamWriter) writeStream() {
- defer w.Close()
+ defer func() {
+ w.err.SetError(w.eventStream.Close())
+ }()
+ defer w.signalClose()
for {
select {
@@ -100,11 +103,14 @@ func (w *EventStreamWriter) Send(ctx context.Context, variant *smithy.Schema, ev
// Close signals end-of-stream and closes the underlying writer. Close is
// safe for concurrent calls.
func (w *EventStreamWriter) Close() error {
+ w.signalClose()
+ return w.err.Err()
+}
+
+func (w *EventStreamWriter) signalClose() {
w.closeOnce.Do(func() {
close(w.done)
- w.err.SetError(w.eventStream.Close())
})
- return w.err.Err()
}
// Err returns the first error encountered during writing.
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
index 914338f2e75f..a7e70b1cb50f 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
@@ -8,9 +8,35 @@ import (
"github.com/aws/smithy-go/middleware"
)
+// CloseResponseBody closes the HTTP response body. It leaves the body open only
+// for a successful response whose payload is a caller-owned stream (isStreaming
+// with a nil opErr); on error, or for a non-streaming response, it closes the
+// body — an error response body is diagnostic, not a caller-owned stream.
+func CloseResponseBody(ctx context.Context, resp *Response, isStreaming bool, opErr error) {
+ if resp == nil || resp.Body == nil {
+ return
+ }
+ if isStreaming && opErr == nil {
+ return
+ }
+
+ // Drain to EOF before closing; a body closed while unread prevents
+ // connection reuse.
+ if _, copyErr := io.Copy(io.Discard, resp.Body); copyErr != nil {
+ middleware.GetLogger(ctx).Logf(logging.Warn, "failed to discard remaining HTTP response body, this may affect connection reuse")
+ }
+
+ if closeErr := resp.Body.Close(); closeErr != nil {
+ middleware.GetLogger(ctx).Logf(logging.Warn, "failed to close HTTP response body, this may affect connection reuse")
+ }
+}
+
// AddErrorCloseResponseBodyMiddleware adds the middleware to automatically
// close the response body of an operation request if the request response
// failed.
+//
+// Deprecated: generated operation deserializers now close the response body
+// via CloseResponseBody, so this middleware is no longer used.
func AddErrorCloseResponseBodyMiddleware(stack *middleware.Stack) error {
return stack.Deserialize.Insert(&errorCloseResponseBodyMiddleware{}, "OperationDeserializer", middleware.Before)
}
@@ -42,6 +68,9 @@ func (m *errorCloseResponseBodyMiddleware) HandleDeserialize(
// AddCloseResponseBodyMiddleware adds the middleware to automatically close
// the response body of an operation request, after the response had been
// deserialized.
+//
+// Deprecated: generated operation deserializers now close the response body
+// via CloseResponseBody, so this middleware is no longer used.
func AddCloseResponseBodyMiddleware(stack *middleware.Stack) error {
return stack.Deserialize.Insert(&closeResponseBody{}, "OperationDeserializer", middleware.Before)
}
diff --git a/vendor/github.com/containerd/containerd/v2/version/version.go b/vendor/github.com/containerd/containerd/v2/version/version.go
index eb696aa2c28b..c256226281b0 100644
--- a/vendor/github.com/containerd/containerd/v2/version/version.go
+++ b/vendor/github.com/containerd/containerd/v2/version/version.go
@@ -24,7 +24,7 @@ var (
Package = "github.com/containerd/containerd/v2"
// Version holds the complete version number. Filled in at linking time.
- Version = "2.3.3+unknown"
+ Version = "2.3.4+unknown"
// Revision is filled with the VCS (e.g. git) revision being used to build
// the program at linking time.
diff --git a/vendor/github.com/containerd/platforms/platform_windows_compat.go b/vendor/github.com/containerd/platforms/platform_windows_compat.go
index ef21a29068ef..4aa162a6c7f9 100644
--- a/vendor/github.com/containerd/platforms/platform_windows_compat.go
+++ b/vendor/github.com/containerd/platforms/platform_windows_compat.go
@@ -87,19 +87,26 @@ func checkWindowsHostAndContainerCompat(host, ctr windowsOSVersion) bool {
return host.Build == ctr.Build
}
- // Find the latest LTSC version that is earlier than the host version.
- // This is the earliest version of container that the host can run.
+ // Find the floor of the compatible container range. Per the Windows stable
+ // ABI policy, every host from LTSC N up to (but not including) LTSC N+1 can
+ // run containers from LTSC N-1 up to the host build.
//
- // If the host version is an LTSC, then it supports compatibility with
- // everything from the previous LTSC up to itself, so we want supportedLTSCRelease
- // to be the previous entry.
+ // So we find the largest LTSC <= host.Build, then step one entry back to
+ // get the floor. If host.Build is past the latest LTSC in the list
+ // (e.g. a 26200 host, which is in the WS2025 generation), the floor is
+ // still the previous LTSC (20348), not the latest LTSC itself.
//
- // If no match is found, then we know that the host is LTSC2022 exactly,
- // since we already checked that it's not less than LTSC2022.
+ // If host is the very first LTSC (or no entry matches, which is impossible
+ // here since we already checked host.Build >= ltsc2022), use that LTSC as
+ // the floor.
var supportedLTSCRelease uint16 = ltsc2022
for i := len(compatLTSCReleases) - 1; i >= 0; i-- {
- if host.Build > compatLTSCReleases[i] {
- supportedLTSCRelease = compatLTSCReleases[i]
+ if host.Build >= compatLTSCReleases[i] {
+ if i == 0 {
+ supportedLTSCRelease = compatLTSCReleases[i]
+ } else {
+ supportedLTSCRelease = compatLTSCReleases[i-1]
+ }
break
}
}
diff --git a/vendor/github.com/docker/cli/cli/command/registry.go b/vendor/github.com/docker/cli/cli/command/registry.go
index e39635283afa..2e767d5b72f3 100644
--- a/vendor/github.com/docker/cli/cli/command/registry.go
+++ b/vendor/github.com/docker/cli/cli/command/registry.go
@@ -97,17 +97,22 @@ func GetDefaultAuthConfig(cfg *configfile.ConfigFile, checkCredStore bool, serve
// If defaultUsername is not empty, the username prompt includes that username
// and the user can hit enter without inputting a username to use that default
// username.
-func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword, defaultUsername, serverAddress string) (registrytypes.AuthConfig, error) {
+func PromptUserForCredentials(ctx context.Context, cli Streams, argUser, argPassword, defaultUsername, serverAddress string) (registrytypes.AuthConfig, error) {
// On Windows, force the use of the regular OS stdin stream.
//
+ // StdStreams() may wrap stdin with windowsconsole.NewAnsiReader to
+ // emulate VT input on consoles that do not support it natively, but
+ // that wrapper has historically caused interactive prompts to hang
+ // or behave incorrectly.
+ //
// See:
// - https://github.com/moby/moby/issues/14336
// - https://github.com/moby/moby/issues/14210
// - https://github.com/moby/moby/pull/17738
- //
- // TODO(thaJeztah): we need to confirm if this special handling is still needed, as we may not be doing this in other places.
+ stdIn := cli.In()
if runtime.GOOS == "windows" {
- cli.SetIn(streams.NewIn(os.Stdin))
+ // TODO(thaJeztah); change to io.Reader and skip wrapping once prompt.DisableInputEcho no longer requires a streams.In
+ stdIn = streams.NewIn(os.Stdin)
}
argUser = strings.TrimSpace(argUser)
@@ -132,7 +137,7 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword
}
var err error
- argUser, err = prompt.ReadInput(ctx, cli.In(), cli.Out(), msg)
+ argUser, err = prompt.ReadInput(ctx, stdIn, cli.Out(), msg)
if err != nil {
return registrytypes.AuthConfig{}, err
}
@@ -146,7 +151,7 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword
isEmpty := strings.TrimSpace(argPassword) == ""
if isEmpty {
- restoreInput, err := prompt.DisableInputEcho(cli.In())
+ restoreInput, err := prompt.DisableInputEcho(stdIn)
if err != nil {
return registrytypes.AuthConfig{}, err
}
@@ -166,7 +171,7 @@ func PromptUserForCredentials(ctx context.Context, cli Cli, argUser, argPassword
"To create a PAT, visit " + aec.Underline.Apply("https://app.docker.com/settings") + "\n\n")
}
- argPassword, err = prompt.ReadInput(ctx, cli.In(), cli.Out(), "Password: ")
+ argPassword, err = prompt.ReadInput(ctx, stdIn, cli.Out(), "Password: ")
if err != nil {
return registrytypes.AuthConfig{}, err
}
diff --git a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go
index e3ef8e25edf9..d4037b7a488c 100644
--- a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go
+++ b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go
@@ -104,7 +104,7 @@ func (c *fileStore) Store(authConfig types.AuthConfig) error {
// stored as hostname or as hostname including scheme (in legacy configuration
// files).
//
-// It's the equivalent to [registry.ConvertToHostname] in the daemon.
+// It's based on [registry.ConvertToHostname] from Moby daemon.
//
// [registry.ConvertToHostname]: https://pkg.go.dev/github.com/moby/moby/v2@v2.0.0-beta.7/daemon/pkg/registry#ConvertToHostname
func ConvertToHostname(maybeURL string) string {
@@ -117,7 +117,48 @@ func ConvertToHostname(maybeURL string) string {
}
return net.JoinHostPort(u.Hostname(), u.Port())
}
+
+ if hostName := hostFromURLFallback(stripped); hostName != "" {
+ return hostName
+ }
}
hostName, _, _ := strings.Cut(stripped, "/")
return hostName
}
+
+// hostFromURLFallback extracts a host from scheme URLs that net/url rejects.
+// Go rejects unbracketed IPv6 literals in URL hosts since
+// https://github.com/golang/go/commit/0c28789bd7dfc55099cac86a3212dda0d6c091f6
+func hostFromURLFallback(maybeURL string) string {
+ _, rest, ok := strings.Cut(maybeURL, "://")
+ if !ok {
+ return ""
+ }
+
+ hostName, _, _ := strings.Cut(rest, "/")
+ if hostName == "" {
+ return ""
+ }
+
+ if strings.Count(hostName, ":") > 1 && !strings.HasPrefix(hostName, "[") {
+ portStart := strings.LastIndex(hostName, ":")
+ addr, port := hostName[:portStart], hostName[portStart+1:]
+ if addr != "" && isPort(port) {
+ return net.JoinHostPort(addr, port)
+ }
+ }
+
+ return hostName
+}
+
+func isPort(port string) bool {
+ if port == "" {
+ return false
+ }
+ for _, r := range port {
+ if r < '0' || r > '9' {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/docker/cli/internal/prompt/prompt.go b/vendor/github.com/docker/cli/internal/prompt/prompt.go
index 4d47a10e6b7a..58b6bbc17587 100644
--- a/vendor/github.com/docker/cli/internal/prompt/prompt.go
+++ b/vendor/github.com/docker/cli/internal/prompt/prompt.go
@@ -88,8 +88,18 @@ func Confirm(ctx context.Context, in io.Reader, out io.Writer, message string) (
_, _ = out.Write([]byte(message))
// On Windows, force the use of the regular OS stdin stream.
+ //
+ // StdStreams() may wrap stdin with windowsconsole.NewAnsiReader to
+ // emulate VT input on consoles that do not support it natively, but
+ // that wrapper has historically caused interactive prompts to hang
+ // or behave incorrectly.
+ //
+ // See:
+ // - https://github.com/moby/moby/issues/14336
+ // - https://github.com/moby/moby/issues/14210
+ // - https://github.com/moby/moby/pull/17738
if runtime.GOOS == "windows" {
- in = streams.NewIn(os.Stdin)
+ in = os.Stdin
}
result := make(chan bool)
diff --git a/vendor/github.com/felixge/httpsnoop/capture_metrics.go b/vendor/github.com/felixge/httpsnoop/capture_metrics.go
index bec7b71b39cb..97f0a51de315 100644
--- a/vendor/github.com/felixge/httpsnoop/capture_metrics.go
+++ b/vendor/github.com/felixge/httpsnoop/capture_metrics.go
@@ -69,6 +69,16 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri
}
},
+ WriteString: func(next WriteStringFunc) WriteStringFunc {
+ return func(s string) (int, error) {
+ n, err := next(s)
+
+ m.Written += int64(n)
+ headerWritten = true
+ return n, err
+ }
+ },
+
ReadFrom: func(next ReadFromFunc) ReadFromFunc {
return func(src io.Reader) (int64, error) {
n, err := next(src)
@@ -81,6 +91,31 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri
}
)
+ // defer to ensure duration is updated even if the handler panics
+ defer func() {
+ m.Duration += time.Since(start)
+ }()
fn(Wrap(w, hooks))
- m.Duration += time.Since(start)
+}
+
+// deadliner defines two methods introduced in go 1.20. The standard library
+// seems not to provide an interface we can import, hence its definition here.
+type deadliner interface {
+ SetReadDeadline(deadline time.Time) error
+ SetWriteDeadline(deadline time.Time) error
+}
+
+// fullDuplexEnabler defines a method introduced in go 1.21. The standard
+// library seems not to provide an interface we can import, hence its definition
+// here.
+type fullDuplexEnabler interface {
+ EnableFullDuplex() error
+}
+
+// httpFlushError defines a method introduced in go 1.20. The standard
+// library seems not to provide an interface we can import, hence its definition
+// here.
+// See https://github.com/golang/go/blob/go1.20/src/net/http/responsecontroller.go#L50
+type httpFlushError interface {
+ FlushError() error
}
diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated.go b/vendor/github.com/felixge/httpsnoop/wrap_generated.go
new file mode 100644
index 000000000000..b6549ba982b0
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/wrap_generated.go
@@ -0,0 +1,16179 @@
+// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
+
+package httpsnoop
+
+import (
+ "bufio"
+ "io"
+ "net"
+ "net/http"
+ "time"
+)
+
+// HeaderFunc is part of the http.ResponseWriter interface.
+type HeaderFunc func() http.Header
+
+// WriteHeaderFunc is part of the http.ResponseWriter interface.
+type WriteHeaderFunc func(code int)
+
+// WriteFunc is part of the http.ResponseWriter interface.
+type WriteFunc func(b []byte) (int, error)
+
+// FlushFunc is part of the http.Flusher interface.
+type FlushFunc func()
+
+// FlushErrorFunc is part of the httpFlushError interface.
+type FlushErrorFunc func() error
+
+// CloseNotifyFunc is part of the http.CloseNotifier interface.
+type CloseNotifyFunc func() <-chan bool
+
+// HijackFunc is part of the http.Hijacker interface.
+type HijackFunc func() (net.Conn, *bufio.ReadWriter, error)
+
+// ReadFromFunc is part of the io.ReaderFrom interface.
+type ReadFromFunc func(src io.Reader) (int64, error)
+
+// SetReadDeadlineFunc is part of the deadliner interface.
+type SetReadDeadlineFunc func(deadline time.Time) error
+
+// SetWriteDeadlineFunc is part of the deadliner interface.
+type SetWriteDeadlineFunc func(deadline time.Time) error
+
+// EnableFullDuplexFunc is part of the fullDuplexEnabler interface.
+type EnableFullDuplexFunc func() error
+
+// PushFunc is part of the http.Pusher interface.
+type PushFunc func(target string, opts *http.PushOptions) error
+
+// WriteStringFunc is part of the io.StringWriter interface.
+type WriteStringFunc func(s string) (int, error)
+
+// Hooks defines a set of method interceptors for methods included in
+// http.ResponseWriter as well as some others. You can think of them as
+// middleware for the function calls they target. See Wrap for more details.
+//
+// For each method, the exact matching hook takes precedence. For example,
+// WriteString calls the WriteString hook when it is configured, even if a
+// Write hook is also configured. If the exact hook is not configured, most
+// methods call through to the underlying ResponseWriter directly.
+//
+// Two compatibility fallbacks preserve the behavior users had before Wrap
+// learned about newer optional interfaces:
+// - If the underlying ResponseWriter implements io.StringWriter and
+// WriteString is called, but only the Write hook is configured, WriteString
+// is routed through the Write hook with []byte(s). If neither hook is
+// configured, WriteString calls the underlying WriteString method directly.
+// - If the underlying ResponseWriter implements both http.Flusher and
+// FlushError, and FlushError is called, but only the Flush hook is
+// configured, FlushError is routed through the Flush hook while preserving
+// the error returned by the underlying FlushError method. If neither hook is
+// configured, FlushError calls the underlying FlushError method directly.
+type Hooks struct {
+ Header func(HeaderFunc) HeaderFunc
+ WriteHeader func(WriteHeaderFunc) WriteHeaderFunc
+ Write func(WriteFunc) WriteFunc
+ Flush func(FlushFunc) FlushFunc
+ FlushError func(FlushErrorFunc) FlushErrorFunc
+ CloseNotify func(CloseNotifyFunc) CloseNotifyFunc
+ Hijack func(HijackFunc) HijackFunc
+ ReadFrom func(ReadFromFunc) ReadFromFunc
+ SetReadDeadline func(SetReadDeadlineFunc) SetReadDeadlineFunc
+ SetWriteDeadline func(SetWriteDeadlineFunc) SetWriteDeadlineFunc
+ EnableFullDuplex func(EnableFullDuplexFunc) EnableFullDuplexFunc
+ Push func(PushFunc) PushFunc
+ WriteString func(WriteStringFunc) WriteStringFunc
+}
+
+// Wrap returns a wrapped version of w that provides the exact same interface
+// as w. Specifically if w implements any combination of:
+//
+// - http.Flusher
+// - httpFlushError
+// - http.CloseNotifier
+// - http.Hijacker
+// - io.ReaderFrom
+// - deadliner
+// - fullDuplexEnabler
+// - http.Pusher
+// - io.StringWriter
+//
+// The wrapped version will implement the exact same combination. If no hooks
+// are set, the wrapped version also behaves exactly as w. Hooks targeting
+// methods not supported by w are ignored. Any other hooks will intercept the
+// method they target and may modify the call's arguments and/or return values.
+// The CaptureMetrics implementation serves as a working example for how the
+// hooks can be used.
+func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {
+ state := &rwState{w: w}
+ var combo uint16
+ if hooks.Header != nil {
+ state.header = hooks.Header(w.Header)
+ }
+ if hooks.WriteHeader != nil {
+ state.writeHeader = hooks.WriteHeader(w.WriteHeader)
+ }
+ if hooks.Write != nil {
+ state.write = hooks.Write(w.Write)
+ }
+ if t0, i0 := w.(http.Flusher); i0 {
+ combo |= 1 << 8
+ if hooks.Flush != nil {
+ state.flush = hooks.Flush(t0.Flush)
+ }
+ }
+ if t1, i1 := w.(httpFlushError); i1 {
+ combo |= 1 << 7
+ if hooks.FlushError != nil {
+ state.flushError = hooks.FlushError(t1.FlushError)
+ } else if state.flush != nil {
+ state.flushError = func() (err error) { hooks.Flush(func() { err = t1.FlushError() })(); return err }
+ }
+ }
+ if t2, i2 := w.(http.CloseNotifier); i2 {
+ combo |= 1 << 6
+ if hooks.CloseNotify != nil {
+ state.closeNotify = hooks.CloseNotify(t2.CloseNotify)
+ }
+ }
+ if t3, i3 := w.(http.Hijacker); i3 {
+ combo |= 1 << 5
+ if hooks.Hijack != nil {
+ state.hijack = hooks.Hijack(t3.Hijack)
+ }
+ }
+ if t4, i4 := w.(io.ReaderFrom); i4 {
+ combo |= 1 << 4
+ if hooks.ReadFrom != nil {
+ state.readFrom = hooks.ReadFrom(t4.ReadFrom)
+ }
+ }
+ if t5, i5 := w.(deadliner); i5 {
+ combo |= 1 << 3
+ if hooks.SetReadDeadline != nil {
+ state.setReadDeadline = hooks.SetReadDeadline(t5.SetReadDeadline)
+ }
+ if hooks.SetWriteDeadline != nil {
+ state.setWriteDeadline = hooks.SetWriteDeadline(t5.SetWriteDeadline)
+ }
+ }
+ if t6, i6 := w.(fullDuplexEnabler); i6 {
+ combo |= 1 << 2
+ if hooks.EnableFullDuplex != nil {
+ state.enableFullDuplex = hooks.EnableFullDuplex(t6.EnableFullDuplex)
+ }
+ }
+ if t7, i7 := w.(http.Pusher); i7 {
+ combo |= 1 << 1
+ if hooks.Push != nil {
+ state.push = hooks.Push(t7.Push)
+ }
+ }
+ if t8, i8 := w.(io.StringWriter); i8 {
+ combo |= 1 << 0
+ if hooks.WriteString != nil {
+ state.writeString = hooks.WriteString(t8.WriteString)
+ } else if state.write != nil {
+ state.writeString = func(s string) (int, error) { return state.write([]byte(s)) }
+ }
+ }
+ switch combo {
+ case 0:
+ return (*rw0)(state)
+ case 1:
+ return (*rw1)(state)
+ case 2:
+ return (*rw2)(state)
+ case 3:
+ return (*rw3)(state)
+ case 4:
+ return (*rw4)(state)
+ case 5:
+ return (*rw5)(state)
+ case 6:
+ return (*rw6)(state)
+ case 7:
+ return (*rw7)(state)
+ case 8:
+ return (*rw8)(state)
+ case 9:
+ return (*rw9)(state)
+ case 10:
+ return (*rw10)(state)
+ case 11:
+ return (*rw11)(state)
+ case 12:
+ return (*rw12)(state)
+ case 13:
+ return (*rw13)(state)
+ case 14:
+ return (*rw14)(state)
+ case 15:
+ return (*rw15)(state)
+ case 16:
+ return (*rw16)(state)
+ case 17:
+ return (*rw17)(state)
+ case 18:
+ return (*rw18)(state)
+ case 19:
+ return (*rw19)(state)
+ case 20:
+ return (*rw20)(state)
+ case 21:
+ return (*rw21)(state)
+ case 22:
+ return (*rw22)(state)
+ case 23:
+ return (*rw23)(state)
+ case 24:
+ return (*rw24)(state)
+ case 25:
+ return (*rw25)(state)
+ case 26:
+ return (*rw26)(state)
+ case 27:
+ return (*rw27)(state)
+ case 28:
+ return (*rw28)(state)
+ case 29:
+ return (*rw29)(state)
+ case 30:
+ return (*rw30)(state)
+ case 31:
+ return (*rw31)(state)
+ case 32:
+ return (*rw32)(state)
+ case 33:
+ return (*rw33)(state)
+ case 34:
+ return (*rw34)(state)
+ case 35:
+ return (*rw35)(state)
+ case 36:
+ return (*rw36)(state)
+ case 37:
+ return (*rw37)(state)
+ case 38:
+ return (*rw38)(state)
+ case 39:
+ return (*rw39)(state)
+ case 40:
+ return (*rw40)(state)
+ case 41:
+ return (*rw41)(state)
+ case 42:
+ return (*rw42)(state)
+ case 43:
+ return (*rw43)(state)
+ case 44:
+ return (*rw44)(state)
+ case 45:
+ return (*rw45)(state)
+ case 46:
+ return (*rw46)(state)
+ case 47:
+ return (*rw47)(state)
+ case 48:
+ return (*rw48)(state)
+ case 49:
+ return (*rw49)(state)
+ case 50:
+ return (*rw50)(state)
+ case 51:
+ return (*rw51)(state)
+ case 52:
+ return (*rw52)(state)
+ case 53:
+ return (*rw53)(state)
+ case 54:
+ return (*rw54)(state)
+ case 55:
+ return (*rw55)(state)
+ case 56:
+ return (*rw56)(state)
+ case 57:
+ return (*rw57)(state)
+ case 58:
+ return (*rw58)(state)
+ case 59:
+ return (*rw59)(state)
+ case 60:
+ return (*rw60)(state)
+ case 61:
+ return (*rw61)(state)
+ case 62:
+ return (*rw62)(state)
+ case 63:
+ return (*rw63)(state)
+ case 64:
+ return (*rw64)(state)
+ case 65:
+ return (*rw65)(state)
+ case 66:
+ return (*rw66)(state)
+ case 67:
+ return (*rw67)(state)
+ case 68:
+ return (*rw68)(state)
+ case 69:
+ return (*rw69)(state)
+ case 70:
+ return (*rw70)(state)
+ case 71:
+ return (*rw71)(state)
+ case 72:
+ return (*rw72)(state)
+ case 73:
+ return (*rw73)(state)
+ case 74:
+ return (*rw74)(state)
+ case 75:
+ return (*rw75)(state)
+ case 76:
+ return (*rw76)(state)
+ case 77:
+ return (*rw77)(state)
+ case 78:
+ return (*rw78)(state)
+ case 79:
+ return (*rw79)(state)
+ case 80:
+ return (*rw80)(state)
+ case 81:
+ return (*rw81)(state)
+ case 82:
+ return (*rw82)(state)
+ case 83:
+ return (*rw83)(state)
+ case 84:
+ return (*rw84)(state)
+ case 85:
+ return (*rw85)(state)
+ case 86:
+ return (*rw86)(state)
+ case 87:
+ return (*rw87)(state)
+ case 88:
+ return (*rw88)(state)
+ case 89:
+ return (*rw89)(state)
+ case 90:
+ return (*rw90)(state)
+ case 91:
+ return (*rw91)(state)
+ case 92:
+ return (*rw92)(state)
+ case 93:
+ return (*rw93)(state)
+ case 94:
+ return (*rw94)(state)
+ case 95:
+ return (*rw95)(state)
+ case 96:
+ return (*rw96)(state)
+ case 97:
+ return (*rw97)(state)
+ case 98:
+ return (*rw98)(state)
+ case 99:
+ return (*rw99)(state)
+ case 100:
+ return (*rw100)(state)
+ case 101:
+ return (*rw101)(state)
+ case 102:
+ return (*rw102)(state)
+ case 103:
+ return (*rw103)(state)
+ case 104:
+ return (*rw104)(state)
+ case 105:
+ return (*rw105)(state)
+ case 106:
+ return (*rw106)(state)
+ case 107:
+ return (*rw107)(state)
+ case 108:
+ return (*rw108)(state)
+ case 109:
+ return (*rw109)(state)
+ case 110:
+ return (*rw110)(state)
+ case 111:
+ return (*rw111)(state)
+ case 112:
+ return (*rw112)(state)
+ case 113:
+ return (*rw113)(state)
+ case 114:
+ return (*rw114)(state)
+ case 115:
+ return (*rw115)(state)
+ case 116:
+ return (*rw116)(state)
+ case 117:
+ return (*rw117)(state)
+ case 118:
+ return (*rw118)(state)
+ case 119:
+ return (*rw119)(state)
+ case 120:
+ return (*rw120)(state)
+ case 121:
+ return (*rw121)(state)
+ case 122:
+ return (*rw122)(state)
+ case 123:
+ return (*rw123)(state)
+ case 124:
+ return (*rw124)(state)
+ case 125:
+ return (*rw125)(state)
+ case 126:
+ return (*rw126)(state)
+ case 127:
+ return (*rw127)(state)
+ case 128:
+ return (*rw128)(state)
+ case 129:
+ return (*rw129)(state)
+ case 130:
+ return (*rw130)(state)
+ case 131:
+ return (*rw131)(state)
+ case 132:
+ return (*rw132)(state)
+ case 133:
+ return (*rw133)(state)
+ case 134:
+ return (*rw134)(state)
+ case 135:
+ return (*rw135)(state)
+ case 136:
+ return (*rw136)(state)
+ case 137:
+ return (*rw137)(state)
+ case 138:
+ return (*rw138)(state)
+ case 139:
+ return (*rw139)(state)
+ case 140:
+ return (*rw140)(state)
+ case 141:
+ return (*rw141)(state)
+ case 142:
+ return (*rw142)(state)
+ case 143:
+ return (*rw143)(state)
+ case 144:
+ return (*rw144)(state)
+ case 145:
+ return (*rw145)(state)
+ case 146:
+ return (*rw146)(state)
+ case 147:
+ return (*rw147)(state)
+ case 148:
+ return (*rw148)(state)
+ case 149:
+ return (*rw149)(state)
+ case 150:
+ return (*rw150)(state)
+ case 151:
+ return (*rw151)(state)
+ case 152:
+ return (*rw152)(state)
+ case 153:
+ return (*rw153)(state)
+ case 154:
+ return (*rw154)(state)
+ case 155:
+ return (*rw155)(state)
+ case 156:
+ return (*rw156)(state)
+ case 157:
+ return (*rw157)(state)
+ case 158:
+ return (*rw158)(state)
+ case 159:
+ return (*rw159)(state)
+ case 160:
+ return (*rw160)(state)
+ case 161:
+ return (*rw161)(state)
+ case 162:
+ return (*rw162)(state)
+ case 163:
+ return (*rw163)(state)
+ case 164:
+ return (*rw164)(state)
+ case 165:
+ return (*rw165)(state)
+ case 166:
+ return (*rw166)(state)
+ case 167:
+ return (*rw167)(state)
+ case 168:
+ return (*rw168)(state)
+ case 169:
+ return (*rw169)(state)
+ case 170:
+ return (*rw170)(state)
+ case 171:
+ return (*rw171)(state)
+ case 172:
+ return (*rw172)(state)
+ case 173:
+ return (*rw173)(state)
+ case 174:
+ return (*rw174)(state)
+ case 175:
+ return (*rw175)(state)
+ case 176:
+ return (*rw176)(state)
+ case 177:
+ return (*rw177)(state)
+ case 178:
+ return (*rw178)(state)
+ case 179:
+ return (*rw179)(state)
+ case 180:
+ return (*rw180)(state)
+ case 181:
+ return (*rw181)(state)
+ case 182:
+ return (*rw182)(state)
+ case 183:
+ return (*rw183)(state)
+ case 184:
+ return (*rw184)(state)
+ case 185:
+ return (*rw185)(state)
+ case 186:
+ return (*rw186)(state)
+ case 187:
+ return (*rw187)(state)
+ case 188:
+ return (*rw188)(state)
+ case 189:
+ return (*rw189)(state)
+ case 190:
+ return (*rw190)(state)
+ case 191:
+ return (*rw191)(state)
+ case 192:
+ return (*rw192)(state)
+ case 193:
+ return (*rw193)(state)
+ case 194:
+ return (*rw194)(state)
+ case 195:
+ return (*rw195)(state)
+ case 196:
+ return (*rw196)(state)
+ case 197:
+ return (*rw197)(state)
+ case 198:
+ return (*rw198)(state)
+ case 199:
+ return (*rw199)(state)
+ case 200:
+ return (*rw200)(state)
+ case 201:
+ return (*rw201)(state)
+ case 202:
+ return (*rw202)(state)
+ case 203:
+ return (*rw203)(state)
+ case 204:
+ return (*rw204)(state)
+ case 205:
+ return (*rw205)(state)
+ case 206:
+ return (*rw206)(state)
+ case 207:
+ return (*rw207)(state)
+ case 208:
+ return (*rw208)(state)
+ case 209:
+ return (*rw209)(state)
+ case 210:
+ return (*rw210)(state)
+ case 211:
+ return (*rw211)(state)
+ case 212:
+ return (*rw212)(state)
+ case 213:
+ return (*rw213)(state)
+ case 214:
+ return (*rw214)(state)
+ case 215:
+ return (*rw215)(state)
+ case 216:
+ return (*rw216)(state)
+ case 217:
+ return (*rw217)(state)
+ case 218:
+ return (*rw218)(state)
+ case 219:
+ return (*rw219)(state)
+ case 220:
+ return (*rw220)(state)
+ case 221:
+ return (*rw221)(state)
+ case 222:
+ return (*rw222)(state)
+ case 223:
+ return (*rw223)(state)
+ case 224:
+ return (*rw224)(state)
+ case 225:
+ return (*rw225)(state)
+ case 226:
+ return (*rw226)(state)
+ case 227:
+ return (*rw227)(state)
+ case 228:
+ return (*rw228)(state)
+ case 229:
+ return (*rw229)(state)
+ case 230:
+ return (*rw230)(state)
+ case 231:
+ return (*rw231)(state)
+ case 232:
+ return (*rw232)(state)
+ case 233:
+ return (*rw233)(state)
+ case 234:
+ return (*rw234)(state)
+ case 235:
+ return (*rw235)(state)
+ case 236:
+ return (*rw236)(state)
+ case 237:
+ return (*rw237)(state)
+ case 238:
+ return (*rw238)(state)
+ case 239:
+ return (*rw239)(state)
+ case 240:
+ return (*rw240)(state)
+ case 241:
+ return (*rw241)(state)
+ case 242:
+ return (*rw242)(state)
+ case 243:
+ return (*rw243)(state)
+ case 244:
+ return (*rw244)(state)
+ case 245:
+ return (*rw245)(state)
+ case 246:
+ return (*rw246)(state)
+ case 247:
+ return (*rw247)(state)
+ case 248:
+ return (*rw248)(state)
+ case 249:
+ return (*rw249)(state)
+ case 250:
+ return (*rw250)(state)
+ case 251:
+ return (*rw251)(state)
+ case 252:
+ return (*rw252)(state)
+ case 253:
+ return (*rw253)(state)
+ case 254:
+ return (*rw254)(state)
+ case 255:
+ return (*rw255)(state)
+ case 256:
+ return (*rw256)(state)
+ case 257:
+ return (*rw257)(state)
+ case 258:
+ return (*rw258)(state)
+ case 259:
+ return (*rw259)(state)
+ case 260:
+ return (*rw260)(state)
+ case 261:
+ return (*rw261)(state)
+ case 262:
+ return (*rw262)(state)
+ case 263:
+ return (*rw263)(state)
+ case 264:
+ return (*rw264)(state)
+ case 265:
+ return (*rw265)(state)
+ case 266:
+ return (*rw266)(state)
+ case 267:
+ return (*rw267)(state)
+ case 268:
+ return (*rw268)(state)
+ case 269:
+ return (*rw269)(state)
+ case 270:
+ return (*rw270)(state)
+ case 271:
+ return (*rw271)(state)
+ case 272:
+ return (*rw272)(state)
+ case 273:
+ return (*rw273)(state)
+ case 274:
+ return (*rw274)(state)
+ case 275:
+ return (*rw275)(state)
+ case 276:
+ return (*rw276)(state)
+ case 277:
+ return (*rw277)(state)
+ case 278:
+ return (*rw278)(state)
+ case 279:
+ return (*rw279)(state)
+ case 280:
+ return (*rw280)(state)
+ case 281:
+ return (*rw281)(state)
+ case 282:
+ return (*rw282)(state)
+ case 283:
+ return (*rw283)(state)
+ case 284:
+ return (*rw284)(state)
+ case 285:
+ return (*rw285)(state)
+ case 286:
+ return (*rw286)(state)
+ case 287:
+ return (*rw287)(state)
+ case 288:
+ return (*rw288)(state)
+ case 289:
+ return (*rw289)(state)
+ case 290:
+ return (*rw290)(state)
+ case 291:
+ return (*rw291)(state)
+ case 292:
+ return (*rw292)(state)
+ case 293:
+ return (*rw293)(state)
+ case 294:
+ return (*rw294)(state)
+ case 295:
+ return (*rw295)(state)
+ case 296:
+ return (*rw296)(state)
+ case 297:
+ return (*rw297)(state)
+ case 298:
+ return (*rw298)(state)
+ case 299:
+ return (*rw299)(state)
+ case 300:
+ return (*rw300)(state)
+ case 301:
+ return (*rw301)(state)
+ case 302:
+ return (*rw302)(state)
+ case 303:
+ return (*rw303)(state)
+ case 304:
+ return (*rw304)(state)
+ case 305:
+ return (*rw305)(state)
+ case 306:
+ return (*rw306)(state)
+ case 307:
+ return (*rw307)(state)
+ case 308:
+ return (*rw308)(state)
+ case 309:
+ return (*rw309)(state)
+ case 310:
+ return (*rw310)(state)
+ case 311:
+ return (*rw311)(state)
+ case 312:
+ return (*rw312)(state)
+ case 313:
+ return (*rw313)(state)
+ case 314:
+ return (*rw314)(state)
+ case 315:
+ return (*rw315)(state)
+ case 316:
+ return (*rw316)(state)
+ case 317:
+ return (*rw317)(state)
+ case 318:
+ return (*rw318)(state)
+ case 319:
+ return (*rw319)(state)
+ case 320:
+ return (*rw320)(state)
+ case 321:
+ return (*rw321)(state)
+ case 322:
+ return (*rw322)(state)
+ case 323:
+ return (*rw323)(state)
+ case 324:
+ return (*rw324)(state)
+ case 325:
+ return (*rw325)(state)
+ case 326:
+ return (*rw326)(state)
+ case 327:
+ return (*rw327)(state)
+ case 328:
+ return (*rw328)(state)
+ case 329:
+ return (*rw329)(state)
+ case 330:
+ return (*rw330)(state)
+ case 331:
+ return (*rw331)(state)
+ case 332:
+ return (*rw332)(state)
+ case 333:
+ return (*rw333)(state)
+ case 334:
+ return (*rw334)(state)
+ case 335:
+ return (*rw335)(state)
+ case 336:
+ return (*rw336)(state)
+ case 337:
+ return (*rw337)(state)
+ case 338:
+ return (*rw338)(state)
+ case 339:
+ return (*rw339)(state)
+ case 340:
+ return (*rw340)(state)
+ case 341:
+ return (*rw341)(state)
+ case 342:
+ return (*rw342)(state)
+ case 343:
+ return (*rw343)(state)
+ case 344:
+ return (*rw344)(state)
+ case 345:
+ return (*rw345)(state)
+ case 346:
+ return (*rw346)(state)
+ case 347:
+ return (*rw347)(state)
+ case 348:
+ return (*rw348)(state)
+ case 349:
+ return (*rw349)(state)
+ case 350:
+ return (*rw350)(state)
+ case 351:
+ return (*rw351)(state)
+ case 352:
+ return (*rw352)(state)
+ case 353:
+ return (*rw353)(state)
+ case 354:
+ return (*rw354)(state)
+ case 355:
+ return (*rw355)(state)
+ case 356:
+ return (*rw356)(state)
+ case 357:
+ return (*rw357)(state)
+ case 358:
+ return (*rw358)(state)
+ case 359:
+ return (*rw359)(state)
+ case 360:
+ return (*rw360)(state)
+ case 361:
+ return (*rw361)(state)
+ case 362:
+ return (*rw362)(state)
+ case 363:
+ return (*rw363)(state)
+ case 364:
+ return (*rw364)(state)
+ case 365:
+ return (*rw365)(state)
+ case 366:
+ return (*rw366)(state)
+ case 367:
+ return (*rw367)(state)
+ case 368:
+ return (*rw368)(state)
+ case 369:
+ return (*rw369)(state)
+ case 370:
+ return (*rw370)(state)
+ case 371:
+ return (*rw371)(state)
+ case 372:
+ return (*rw372)(state)
+ case 373:
+ return (*rw373)(state)
+ case 374:
+ return (*rw374)(state)
+ case 375:
+ return (*rw375)(state)
+ case 376:
+ return (*rw376)(state)
+ case 377:
+ return (*rw377)(state)
+ case 378:
+ return (*rw378)(state)
+ case 379:
+ return (*rw379)(state)
+ case 380:
+ return (*rw380)(state)
+ case 381:
+ return (*rw381)(state)
+ case 382:
+ return (*rw382)(state)
+ case 383:
+ return (*rw383)(state)
+ case 384:
+ return (*rw384)(state)
+ case 385:
+ return (*rw385)(state)
+ case 386:
+ return (*rw386)(state)
+ case 387:
+ return (*rw387)(state)
+ case 388:
+ return (*rw388)(state)
+ case 389:
+ return (*rw389)(state)
+ case 390:
+ return (*rw390)(state)
+ case 391:
+ return (*rw391)(state)
+ case 392:
+ return (*rw392)(state)
+ case 393:
+ return (*rw393)(state)
+ case 394:
+ return (*rw394)(state)
+ case 395:
+ return (*rw395)(state)
+ case 396:
+ return (*rw396)(state)
+ case 397:
+ return (*rw397)(state)
+ case 398:
+ return (*rw398)(state)
+ case 399:
+ return (*rw399)(state)
+ case 400:
+ return (*rw400)(state)
+ case 401:
+ return (*rw401)(state)
+ case 402:
+ return (*rw402)(state)
+ case 403:
+ return (*rw403)(state)
+ case 404:
+ return (*rw404)(state)
+ case 405:
+ return (*rw405)(state)
+ case 406:
+ return (*rw406)(state)
+ case 407:
+ return (*rw407)(state)
+ case 408:
+ return (*rw408)(state)
+ case 409:
+ return (*rw409)(state)
+ case 410:
+ return (*rw410)(state)
+ case 411:
+ return (*rw411)(state)
+ case 412:
+ return (*rw412)(state)
+ case 413:
+ return (*rw413)(state)
+ case 414:
+ return (*rw414)(state)
+ case 415:
+ return (*rw415)(state)
+ case 416:
+ return (*rw416)(state)
+ case 417:
+ return (*rw417)(state)
+ case 418:
+ return (*rw418)(state)
+ case 419:
+ return (*rw419)(state)
+ case 420:
+ return (*rw420)(state)
+ case 421:
+ return (*rw421)(state)
+ case 422:
+ return (*rw422)(state)
+ case 423:
+ return (*rw423)(state)
+ case 424:
+ return (*rw424)(state)
+ case 425:
+ return (*rw425)(state)
+ case 426:
+ return (*rw426)(state)
+ case 427:
+ return (*rw427)(state)
+ case 428:
+ return (*rw428)(state)
+ case 429:
+ return (*rw429)(state)
+ case 430:
+ return (*rw430)(state)
+ case 431:
+ return (*rw431)(state)
+ case 432:
+ return (*rw432)(state)
+ case 433:
+ return (*rw433)(state)
+ case 434:
+ return (*rw434)(state)
+ case 435:
+ return (*rw435)(state)
+ case 436:
+ return (*rw436)(state)
+ case 437:
+ return (*rw437)(state)
+ case 438:
+ return (*rw438)(state)
+ case 439:
+ return (*rw439)(state)
+ case 440:
+ return (*rw440)(state)
+ case 441:
+ return (*rw441)(state)
+ case 442:
+ return (*rw442)(state)
+ case 443:
+ return (*rw443)(state)
+ case 444:
+ return (*rw444)(state)
+ case 445:
+ return (*rw445)(state)
+ case 446:
+ return (*rw446)(state)
+ case 447:
+ return (*rw447)(state)
+ case 448:
+ return (*rw448)(state)
+ case 449:
+ return (*rw449)(state)
+ case 450:
+ return (*rw450)(state)
+ case 451:
+ return (*rw451)(state)
+ case 452:
+ return (*rw452)(state)
+ case 453:
+ return (*rw453)(state)
+ case 454:
+ return (*rw454)(state)
+ case 455:
+ return (*rw455)(state)
+ case 456:
+ return (*rw456)(state)
+ case 457:
+ return (*rw457)(state)
+ case 458:
+ return (*rw458)(state)
+ case 459:
+ return (*rw459)(state)
+ case 460:
+ return (*rw460)(state)
+ case 461:
+ return (*rw461)(state)
+ case 462:
+ return (*rw462)(state)
+ case 463:
+ return (*rw463)(state)
+ case 464:
+ return (*rw464)(state)
+ case 465:
+ return (*rw465)(state)
+ case 466:
+ return (*rw466)(state)
+ case 467:
+ return (*rw467)(state)
+ case 468:
+ return (*rw468)(state)
+ case 469:
+ return (*rw469)(state)
+ case 470:
+ return (*rw470)(state)
+ case 471:
+ return (*rw471)(state)
+ case 472:
+ return (*rw472)(state)
+ case 473:
+ return (*rw473)(state)
+ case 474:
+ return (*rw474)(state)
+ case 475:
+ return (*rw475)(state)
+ case 476:
+ return (*rw476)(state)
+ case 477:
+ return (*rw477)(state)
+ case 478:
+ return (*rw478)(state)
+ case 479:
+ return (*rw479)(state)
+ case 480:
+ return (*rw480)(state)
+ case 481:
+ return (*rw481)(state)
+ case 482:
+ return (*rw482)(state)
+ case 483:
+ return (*rw483)(state)
+ case 484:
+ return (*rw484)(state)
+ case 485:
+ return (*rw485)(state)
+ case 486:
+ return (*rw486)(state)
+ case 487:
+ return (*rw487)(state)
+ case 488:
+ return (*rw488)(state)
+ case 489:
+ return (*rw489)(state)
+ case 490:
+ return (*rw490)(state)
+ case 491:
+ return (*rw491)(state)
+ case 492:
+ return (*rw492)(state)
+ case 493:
+ return (*rw493)(state)
+ case 494:
+ return (*rw494)(state)
+ case 495:
+ return (*rw495)(state)
+ case 496:
+ return (*rw496)(state)
+ case 497:
+ return (*rw497)(state)
+ case 498:
+ return (*rw498)(state)
+ case 499:
+ return (*rw499)(state)
+ case 500:
+ return (*rw500)(state)
+ case 501:
+ return (*rw501)(state)
+ case 502:
+ return (*rw502)(state)
+ case 503:
+ return (*rw503)(state)
+ case 504:
+ return (*rw504)(state)
+ case 505:
+ return (*rw505)(state)
+ case 506:
+ return (*rw506)(state)
+ case 507:
+ return (*rw507)(state)
+ case 508:
+ return (*rw508)(state)
+ case 509:
+ return (*rw509)(state)
+ case 510:
+ return (*rw510)(state)
+ case 511:
+ return (*rw511)(state)
+ }
+ panic("unreachable")
+}
+
+type rwState struct {
+ w http.ResponseWriter
+ header HeaderFunc
+ writeHeader WriteHeaderFunc
+ write WriteFunc
+ flush FlushFunc
+ flushError FlushErrorFunc
+ closeNotify CloseNotifyFunc
+ hijack HijackFunc
+ readFrom ReadFromFunc
+ setReadDeadline SetReadDeadlineFunc
+ setWriteDeadline SetWriteDeadlineFunc
+ enableFullDuplex EnableFullDuplexFunc
+ push PushFunc
+ writeString WriteStringFunc
+}
+
+func (r *rwState) doHeader() http.Header {
+ if r.header != nil {
+ return r.header()
+ }
+ return r.w.Header()
+}
+
+func (r *rwState) doWriteHeader(code int) {
+ if r.writeHeader != nil {
+ r.writeHeader(code)
+ return
+ }
+ r.w.WriteHeader(code)
+}
+
+func (r *rwState) doWrite(b []byte) (int, error) {
+ if r.write != nil {
+ return r.write(b)
+ }
+ return r.w.Write(b)
+}
+
+func (r *rwState) doFlush() {
+ if r.flush != nil {
+ r.flush()
+ return
+ }
+ r.w.(http.Flusher).Flush()
+}
+
+func (r *rwState) doFlushError() error {
+ if r.flushError != nil {
+ return r.flushError()
+ }
+ return r.w.(httpFlushError).FlushError()
+}
+
+func (r *rwState) doCloseNotify() <-chan bool {
+ if r.closeNotify != nil {
+ return r.closeNotify()
+ }
+ return r.w.(http.CloseNotifier).CloseNotify()
+}
+
+func (r *rwState) doHijack() (net.Conn, *bufio.ReadWriter, error) {
+ if r.hijack != nil {
+ return r.hijack()
+ }
+ return r.w.(http.Hijacker).Hijack()
+}
+
+func (r *rwState) doReadFrom(src io.Reader) (int64, error) {
+ if r.readFrom != nil {
+ return r.readFrom(src)
+ }
+ return r.w.(io.ReaderFrom).ReadFrom(src)
+}
+
+func (r *rwState) doSetReadDeadline(deadline time.Time) error {
+ if r.setReadDeadline != nil {
+ return r.setReadDeadline(deadline)
+ }
+ return r.w.(deadliner).SetReadDeadline(deadline)
+}
+
+func (r *rwState) doSetWriteDeadline(deadline time.Time) error {
+ if r.setWriteDeadline != nil {
+ return r.setWriteDeadline(deadline)
+ }
+ return r.w.(deadliner).SetWriteDeadline(deadline)
+}
+
+func (r *rwState) doEnableFullDuplex() error {
+ if r.enableFullDuplex != nil {
+ return r.enableFullDuplex()
+ }
+ return r.w.(fullDuplexEnabler).EnableFullDuplex()
+}
+
+func (r *rwState) doPush(target string, opts *http.PushOptions) error {
+ if r.push != nil {
+ return r.push(target, opts)
+ }
+ return r.w.(http.Pusher).Push(target, opts)
+}
+
+func (r *rwState) doWriteString(s string) (int, error) {
+ if r.writeString != nil {
+ return r.writeString(s)
+ }
+ return r.w.(io.StringWriter).WriteString(s)
+}
+
+// combination 1/512: http.ResponseWriter
+type rw0 rwState
+
+func (w *rw0) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw0) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw0) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw0) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+
+// combination 2/512: http.ResponseWriter, io.StringWriter
+type rw1 rwState
+
+func (w *rw1) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw1) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw1) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw1) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw1) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 3/512: http.ResponseWriter, http.Pusher
+type rw2 rwState
+
+func (w *rw2) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw2) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw2) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw2) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw2) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 4/512: http.ResponseWriter, http.Pusher, io.StringWriter
+type rw3 rwState
+
+func (w *rw3) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw3) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw3) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw3) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw3) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw3) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 5/512: http.ResponseWriter, fullDuplexEnabler
+type rw4 rwState
+
+func (w *rw4) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw4) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw4) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw4) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw4) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 6/512: http.ResponseWriter, fullDuplexEnabler, io.StringWriter
+type rw5 rwState
+
+func (w *rw5) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw5) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw5) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw5) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw5) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw5) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 7/512: http.ResponseWriter, fullDuplexEnabler, http.Pusher
+type rw6 rwState
+
+func (w *rw6) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw6) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw6) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw6) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw6) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw6) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 8/512: http.ResponseWriter, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw7 rwState
+
+func (w *rw7) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw7) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw7) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw7) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw7) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw7) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw7) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 9/512: http.ResponseWriter, deadliner
+type rw8 rwState
+
+func (w *rw8) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw8) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw8) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw8) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw8) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw8) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 10/512: http.ResponseWriter, deadliner, io.StringWriter
+type rw9 rwState
+
+func (w *rw9) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw9) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw9) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw9) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw9) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw9) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw9) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 11/512: http.ResponseWriter, deadliner, http.Pusher
+type rw10 rwState
+
+func (w *rw10) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw10) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw10) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw10) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw10) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw10) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw10) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 12/512: http.ResponseWriter, deadliner, http.Pusher, io.StringWriter
+type rw11 rwState
+
+func (w *rw11) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw11) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw11) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw11) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw11) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw11) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw11) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw11) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 13/512: http.ResponseWriter, deadliner, fullDuplexEnabler
+type rw12 rwState
+
+func (w *rw12) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw12) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw12) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw12) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw12) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw12) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw12) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 14/512: http.ResponseWriter, deadliner, fullDuplexEnabler, io.StringWriter
+type rw13 rwState
+
+func (w *rw13) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw13) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw13) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw13) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw13) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw13) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw13) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw13) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 15/512: http.ResponseWriter, deadliner, fullDuplexEnabler, http.Pusher
+type rw14 rwState
+
+func (w *rw14) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw14) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw14) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw14) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw14) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw14) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw14) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw14) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 16/512: http.ResponseWriter, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw15 rwState
+
+func (w *rw15) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw15) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw15) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw15) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw15) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw15) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw15) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw15) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw15) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 17/512: http.ResponseWriter, io.ReaderFrom
+type rw16 rwState
+
+func (w *rw16) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw16) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw16) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw16) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw16) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 18/512: http.ResponseWriter, io.ReaderFrom, io.StringWriter
+type rw17 rwState
+
+func (w *rw17) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw17) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw17) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw17) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw17) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw17) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 19/512: http.ResponseWriter, io.ReaderFrom, http.Pusher
+type rw18 rwState
+
+func (w *rw18) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw18) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw18) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw18) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw18) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw18) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 20/512: http.ResponseWriter, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw19 rwState
+
+func (w *rw19) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw19) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw19) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw19) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw19) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw19) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw19) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 21/512: http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler
+type rw20 rwState
+
+func (w *rw20) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw20) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw20) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw20) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw20) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw20) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 22/512: http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw21 rwState
+
+func (w *rw21) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw21) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw21) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw21) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw21) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw21) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw21) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 23/512: http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw22 rwState
+
+func (w *rw22) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw22) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw22) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw22) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw22) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw22) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw22) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 24/512: http.ResponseWriter, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw23 rwState
+
+func (w *rw23) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw23) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw23) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw23) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw23) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw23) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw23) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw23) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 25/512: http.ResponseWriter, io.ReaderFrom, deadliner
+type rw24 rwState
+
+func (w *rw24) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw24) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw24) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw24) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw24) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw24) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw24) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 26/512: http.ResponseWriter, io.ReaderFrom, deadliner, io.StringWriter
+type rw25 rwState
+
+func (w *rw25) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw25) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw25) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw25) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw25) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw25) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw25) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw25) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 27/512: http.ResponseWriter, io.ReaderFrom, deadliner, http.Pusher
+type rw26 rwState
+
+func (w *rw26) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw26) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw26) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw26) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw26) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw26) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw26) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw26) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 28/512: http.ResponseWriter, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw27 rwState
+
+func (w *rw27) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw27) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw27) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw27) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw27) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw27) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw27) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw27) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw27) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 29/512: http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw28 rwState
+
+func (w *rw28) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw28) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw28) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw28) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw28) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw28) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw28) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw28) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 30/512: http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw29 rwState
+
+func (w *rw29) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw29) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw29) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw29) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw29) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw29) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw29) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw29) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw29) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 31/512: http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw30 rwState
+
+func (w *rw30) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw30) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw30) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw30) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw30) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw30) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw30) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw30) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw30) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 32/512: http.ResponseWriter, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw31 rwState
+
+func (w *rw31) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw31) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw31) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw31) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw31) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw31) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw31) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw31) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw31) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw31) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 33/512: http.ResponseWriter, http.Hijacker
+type rw32 rwState
+
+func (w *rw32) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw32) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw32) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw32) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw32) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 34/512: http.ResponseWriter, http.Hijacker, io.StringWriter
+type rw33 rwState
+
+func (w *rw33) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw33) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw33) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw33) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw33) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw33) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 35/512: http.ResponseWriter, http.Hijacker, http.Pusher
+type rw34 rwState
+
+func (w *rw34) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw34) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw34) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw34) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw34) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw34) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 36/512: http.ResponseWriter, http.Hijacker, http.Pusher, io.StringWriter
+type rw35 rwState
+
+func (w *rw35) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw35) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw35) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw35) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw35) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw35) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw35) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 37/512: http.ResponseWriter, http.Hijacker, fullDuplexEnabler
+type rw36 rwState
+
+func (w *rw36) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw36) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw36) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw36) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw36) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw36) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 38/512: http.ResponseWriter, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw37 rwState
+
+func (w *rw37) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw37) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw37) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw37) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw37) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw37) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw37) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 39/512: http.ResponseWriter, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw38 rwState
+
+func (w *rw38) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw38) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw38) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw38) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw38) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw38) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw38) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 40/512: http.ResponseWriter, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw39 rwState
+
+func (w *rw39) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw39) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw39) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw39) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw39) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw39) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw39) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw39) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 41/512: http.ResponseWriter, http.Hijacker, deadliner
+type rw40 rwState
+
+func (w *rw40) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw40) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw40) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw40) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw40) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw40) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw40) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 42/512: http.ResponseWriter, http.Hijacker, deadliner, io.StringWriter
+type rw41 rwState
+
+func (w *rw41) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw41) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw41) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw41) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw41) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw41) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw41) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw41) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 43/512: http.ResponseWriter, http.Hijacker, deadliner, http.Pusher
+type rw42 rwState
+
+func (w *rw42) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw42) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw42) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw42) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw42) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw42) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw42) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw42) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 44/512: http.ResponseWriter, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw43 rwState
+
+func (w *rw43) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw43) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw43) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw43) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw43) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw43) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw43) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw43) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw43) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 45/512: http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler
+type rw44 rwState
+
+func (w *rw44) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw44) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw44) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw44) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw44) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw44) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw44) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw44) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 46/512: http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw45 rwState
+
+func (w *rw45) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw45) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw45) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw45) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw45) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw45) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw45) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw45) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw45) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 47/512: http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw46 rwState
+
+func (w *rw46) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw46) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw46) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw46) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw46) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw46) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw46) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw46) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw46) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 48/512: http.ResponseWriter, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw47 rwState
+
+func (w *rw47) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw47) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw47) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw47) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw47) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw47) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw47) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw47) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw47) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw47) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 49/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom
+type rw48 rwState
+
+func (w *rw48) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw48) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw48) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw48) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw48) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw48) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 50/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw49 rwState
+
+func (w *rw49) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw49) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw49) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw49) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw49) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw49) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw49) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 51/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw50 rwState
+
+func (w *rw50) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw50) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw50) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw50) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw50) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw50) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw50) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 52/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw51 rwState
+
+func (w *rw51) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw51) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw51) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw51) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw51) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw51) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw51) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw51) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 53/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw52 rwState
+
+func (w *rw52) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw52) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw52) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw52) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw52) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw52) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw52) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 54/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw53 rwState
+
+func (w *rw53) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw53) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw53) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw53) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw53) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw53) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw53) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw53) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 55/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw54 rwState
+
+func (w *rw54) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw54) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw54) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw54) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw54) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw54) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw54) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw54) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 56/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw55 rwState
+
+func (w *rw55) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw55) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw55) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw55) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw55) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw55) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw55) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw55) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw55) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 57/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner
+type rw56 rwState
+
+func (w *rw56) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw56) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw56) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw56) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw56) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw56) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw56) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw56) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 58/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw57 rwState
+
+func (w *rw57) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw57) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw57) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw57) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw57) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw57) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw57) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw57) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw57) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 59/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw58 rwState
+
+func (w *rw58) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw58) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw58) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw58) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw58) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw58) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw58) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw58) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw58) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 60/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw59 rwState
+
+func (w *rw59) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw59) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw59) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw59) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw59) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw59) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw59) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw59) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw59) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw59) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 61/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw60 rwState
+
+func (w *rw60) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw60) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw60) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw60) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw60) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw60) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw60) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw60) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw60) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 62/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw61 rwState
+
+func (w *rw61) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw61) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw61) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw61) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw61) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw61) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw61) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw61) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw61) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw61) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 63/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw62 rwState
+
+func (w *rw62) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw62) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw62) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw62) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw62) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw62) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw62) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw62) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw62) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw62) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 64/512: http.ResponseWriter, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw63 rwState
+
+func (w *rw63) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw63) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw63) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw63) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw63) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw63) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw63) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw63) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw63) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw63) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw63) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 65/512: http.ResponseWriter, http.CloseNotifier
+type rw64 rwState
+
+func (w *rw64) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw64) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw64) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw64) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw64) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+
+// combination 66/512: http.ResponseWriter, http.CloseNotifier, io.StringWriter
+type rw65 rwState
+
+func (w *rw65) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw65) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw65) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw65) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw65) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw65) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 67/512: http.ResponseWriter, http.CloseNotifier, http.Pusher
+type rw66 rwState
+
+func (w *rw66) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw66) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw66) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw66) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw66) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw66) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 68/512: http.ResponseWriter, http.CloseNotifier, http.Pusher, io.StringWriter
+type rw67 rwState
+
+func (w *rw67) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw67) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw67) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw67) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw67) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw67) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw67) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 69/512: http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler
+type rw68 rwState
+
+func (w *rw68) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw68) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw68) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw68) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw68) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw68) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 70/512: http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler, io.StringWriter
+type rw69 rwState
+
+func (w *rw69) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw69) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw69) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw69) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw69) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw69) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw69) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 71/512: http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler, http.Pusher
+type rw70 rwState
+
+func (w *rw70) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw70) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw70) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw70) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw70) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw70) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw70) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 72/512: http.ResponseWriter, http.CloseNotifier, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw71 rwState
+
+func (w *rw71) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw71) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw71) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw71) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw71) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw71) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw71) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw71) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 73/512: http.ResponseWriter, http.CloseNotifier, deadliner
+type rw72 rwState
+
+func (w *rw72) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw72) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw72) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw72) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw72) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw72) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw72) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 74/512: http.ResponseWriter, http.CloseNotifier, deadliner, io.StringWriter
+type rw73 rwState
+
+func (w *rw73) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw73) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw73) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw73) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw73) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw73) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw73) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw73) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 75/512: http.ResponseWriter, http.CloseNotifier, deadliner, http.Pusher
+type rw74 rwState
+
+func (w *rw74) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw74) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw74) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw74) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw74) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw74) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw74) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw74) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 76/512: http.ResponseWriter, http.CloseNotifier, deadliner, http.Pusher, io.StringWriter
+type rw75 rwState
+
+func (w *rw75) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw75) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw75) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw75) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw75) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw75) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw75) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw75) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw75) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 77/512: http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler
+type rw76 rwState
+
+func (w *rw76) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw76) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw76) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw76) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw76) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw76) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw76) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw76) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 78/512: http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler, io.StringWriter
+type rw77 rwState
+
+func (w *rw77) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw77) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw77) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw77) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw77) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw77) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw77) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw77) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw77) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 79/512: http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher
+type rw78 rwState
+
+func (w *rw78) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw78) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw78) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw78) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw78) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw78) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw78) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw78) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw78) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 80/512: http.ResponseWriter, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw79 rwState
+
+func (w *rw79) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw79) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw79) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw79) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw79) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw79) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw79) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw79) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw79) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw79) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 81/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom
+type rw80 rwState
+
+func (w *rw80) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw80) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw80) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw80) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw80) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw80) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 82/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, io.StringWriter
+type rw81 rwState
+
+func (w *rw81) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw81) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw81) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw81) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw81) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw81) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw81) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 83/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, http.Pusher
+type rw82 rwState
+
+func (w *rw82) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw82) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw82) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw82) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw82) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw82) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw82) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 84/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw83 rwState
+
+func (w *rw83) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw83) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw83) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw83) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw83) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw83) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw83) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw83) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 85/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler
+type rw84 rwState
+
+func (w *rw84) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw84) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw84) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw84) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw84) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw84) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw84) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 86/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw85 rwState
+
+func (w *rw85) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw85) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw85) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw85) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw85) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw85) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw85) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw85) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 87/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw86 rwState
+
+func (w *rw86) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw86) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw86) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw86) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw86) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw86) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw86) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw86) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 88/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw87 rwState
+
+func (w *rw87) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw87) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw87) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw87) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw87) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw87) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw87) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw87) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw87) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 89/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner
+type rw88 rwState
+
+func (w *rw88) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw88) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw88) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw88) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw88) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw88) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw88) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw88) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 90/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, io.StringWriter
+type rw89 rwState
+
+func (w *rw89) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw89) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw89) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw89) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw89) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw89) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw89) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw89) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw89) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 91/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher
+type rw90 rwState
+
+func (w *rw90) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw90) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw90) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw90) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw90) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw90) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw90) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw90) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw90) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 92/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw91 rwState
+
+func (w *rw91) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw91) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw91) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw91) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw91) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw91) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw91) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw91) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw91) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw91) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 93/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw92 rwState
+
+func (w *rw92) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw92) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw92) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw92) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw92) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw92) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw92) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw92) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw92) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 94/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw93 rwState
+
+func (w *rw93) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw93) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw93) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw93) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw93) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw93) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw93) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw93) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw93) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw93) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 95/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw94 rwState
+
+func (w *rw94) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw94) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw94) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw94) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw94) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw94) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw94) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw94) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw94) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw94) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 96/512: http.ResponseWriter, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw95 rwState
+
+func (w *rw95) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw95) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw95) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw95) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw95) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw95) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw95) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw95) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw95) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw95) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw95) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 97/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker
+type rw96 rwState
+
+func (w *rw96) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw96) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw96) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw96) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw96) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw96) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 98/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.StringWriter
+type rw97 rwState
+
+func (w *rw97) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw97) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw97) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw97) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw97) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw97) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw97) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 99/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, http.Pusher
+type rw98 rwState
+
+func (w *rw98) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw98) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw98) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw98) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw98) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw98) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw98) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 100/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, http.Pusher, io.StringWriter
+type rw99 rwState
+
+func (w *rw99) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw99) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw99) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw99) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw99) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw99) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw99) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw99) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 101/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler
+type rw100 rwState
+
+func (w *rw100) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw100) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw100) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw100) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw100) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw100) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw100) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 102/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw101 rwState
+
+func (w *rw101) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw101) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw101) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw101) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw101) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw101) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw101) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw101) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 103/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw102 rwState
+
+func (w *rw102) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw102) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw102) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw102) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw102) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw102) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw102) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw102) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 104/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw103 rwState
+
+func (w *rw103) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw103) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw103) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw103) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw103) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw103) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw103) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw103) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw103) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 105/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner
+type rw104 rwState
+
+func (w *rw104) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw104) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw104) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw104) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw104) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw104) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw104) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw104) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 106/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, io.StringWriter
+type rw105 rwState
+
+func (w *rw105) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw105) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw105) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw105) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw105) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw105) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw105) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw105) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw105) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 107/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher
+type rw106 rwState
+
+func (w *rw106) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw106) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw106) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw106) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw106) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw106) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw106) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw106) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw106) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 108/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw107 rwState
+
+func (w *rw107) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw107) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw107) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw107) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw107) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw107) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw107) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw107) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw107) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw107) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 109/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler
+type rw108 rwState
+
+func (w *rw108) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw108) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw108) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw108) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw108) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw108) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw108) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw108) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw108) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 110/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw109 rwState
+
+func (w *rw109) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw109) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw109) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw109) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw109) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw109) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw109) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw109) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw109) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw109) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 111/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw110 rwState
+
+func (w *rw110) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw110) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw110) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw110) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw110) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw110) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw110) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw110) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw110) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw110) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 112/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw111 rwState
+
+func (w *rw111) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw111) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw111) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw111) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw111) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw111) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw111) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw111) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw111) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw111) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw111) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 113/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom
+type rw112 rwState
+
+func (w *rw112) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw112) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw112) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw112) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw112) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw112) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw112) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 114/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw113 rwState
+
+func (w *rw113) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw113) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw113) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw113) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw113) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw113) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw113) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw113) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 115/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw114 rwState
+
+func (w *rw114) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw114) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw114) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw114) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw114) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw114) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw114) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw114) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 116/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw115 rwState
+
+func (w *rw115) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw115) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw115) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw115) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw115) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw115) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw115) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw115) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw115) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 117/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw116 rwState
+
+func (w *rw116) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw116) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw116) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw116) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw116) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw116) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw116) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw116) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 118/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw117 rwState
+
+func (w *rw117) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw117) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw117) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw117) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw117) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw117) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw117) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw117) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw117) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 119/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw118 rwState
+
+func (w *rw118) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw118) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw118) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw118) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw118) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw118) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw118) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw118) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw118) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 120/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw119 rwState
+
+func (w *rw119) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw119) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw119) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw119) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw119) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw119) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw119) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw119) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw119) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw119) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 121/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner
+type rw120 rwState
+
+func (w *rw120) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw120) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw120) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw120) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw120) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw120) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw120) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw120) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw120) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 122/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw121 rwState
+
+func (w *rw121) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw121) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw121) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw121) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw121) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw121) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw121) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw121) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw121) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw121) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 123/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw122 rwState
+
+func (w *rw122) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw122) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw122) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw122) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw122) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw122) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw122) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw122) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw122) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw122) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 124/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw123 rwState
+
+func (w *rw123) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw123) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw123) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw123) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw123) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw123) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw123) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw123) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw123) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw123) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw123) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 125/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw124 rwState
+
+func (w *rw124) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw124) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw124) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw124) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw124) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw124) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw124) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw124) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw124) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw124) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 126/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw125 rwState
+
+func (w *rw125) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw125) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw125) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw125) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw125) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw125) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw125) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw125) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw125) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw125) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw125) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 127/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw126 rwState
+
+func (w *rw126) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw126) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw126) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw126) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw126) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw126) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw126) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw126) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw126) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw126) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw126) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 128/512: http.ResponseWriter, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw127 rwState
+
+func (w *rw127) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw127) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw127) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw127) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw127) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw127) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw127) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw127) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw127) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw127) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw127) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw127) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 129/512: http.ResponseWriter, httpFlushError
+type rw128 rwState
+
+func (w *rw128) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw128) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw128) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw128) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw128) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+
+// combination 130/512: http.ResponseWriter, httpFlushError, io.StringWriter
+type rw129 rwState
+
+func (w *rw129) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw129) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw129) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw129) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw129) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw129) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 131/512: http.ResponseWriter, httpFlushError, http.Pusher
+type rw130 rwState
+
+func (w *rw130) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw130) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw130) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw130) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw130) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw130) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 132/512: http.ResponseWriter, httpFlushError, http.Pusher, io.StringWriter
+type rw131 rwState
+
+func (w *rw131) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw131) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw131) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw131) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw131) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw131) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw131) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 133/512: http.ResponseWriter, httpFlushError, fullDuplexEnabler
+type rw132 rwState
+
+func (w *rw132) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw132) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw132) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw132) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw132) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw132) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 134/512: http.ResponseWriter, httpFlushError, fullDuplexEnabler, io.StringWriter
+type rw133 rwState
+
+func (w *rw133) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw133) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw133) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw133) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw133) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw133) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw133) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 135/512: http.ResponseWriter, httpFlushError, fullDuplexEnabler, http.Pusher
+type rw134 rwState
+
+func (w *rw134) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw134) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw134) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw134) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw134) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw134) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw134) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 136/512: http.ResponseWriter, httpFlushError, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw135 rwState
+
+func (w *rw135) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw135) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw135) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw135) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw135) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw135) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw135) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw135) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 137/512: http.ResponseWriter, httpFlushError, deadliner
+type rw136 rwState
+
+func (w *rw136) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw136) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw136) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw136) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw136) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw136) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw136) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 138/512: http.ResponseWriter, httpFlushError, deadliner, io.StringWriter
+type rw137 rwState
+
+func (w *rw137) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw137) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw137) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw137) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw137) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw137) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw137) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw137) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 139/512: http.ResponseWriter, httpFlushError, deadliner, http.Pusher
+type rw138 rwState
+
+func (w *rw138) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw138) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw138) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw138) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw138) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw138) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw138) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw138) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 140/512: http.ResponseWriter, httpFlushError, deadliner, http.Pusher, io.StringWriter
+type rw139 rwState
+
+func (w *rw139) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw139) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw139) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw139) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw139) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw139) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw139) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw139) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw139) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 141/512: http.ResponseWriter, httpFlushError, deadliner, fullDuplexEnabler
+type rw140 rwState
+
+func (w *rw140) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw140) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw140) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw140) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw140) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw140) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw140) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw140) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 142/512: http.ResponseWriter, httpFlushError, deadliner, fullDuplexEnabler, io.StringWriter
+type rw141 rwState
+
+func (w *rw141) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw141) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw141) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw141) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw141) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw141) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw141) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw141) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw141) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 143/512: http.ResponseWriter, httpFlushError, deadliner, fullDuplexEnabler, http.Pusher
+type rw142 rwState
+
+func (w *rw142) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw142) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw142) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw142) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw142) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw142) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw142) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw142) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw142) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 144/512: http.ResponseWriter, httpFlushError, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw143 rwState
+
+func (w *rw143) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw143) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw143) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw143) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw143) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw143) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw143) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw143) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw143) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw143) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 145/512: http.ResponseWriter, httpFlushError, io.ReaderFrom
+type rw144 rwState
+
+func (w *rw144) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw144) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw144) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw144) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw144) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw144) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 146/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, io.StringWriter
+type rw145 rwState
+
+func (w *rw145) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw145) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw145) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw145) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw145) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw145) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw145) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 147/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, http.Pusher
+type rw146 rwState
+
+func (w *rw146) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw146) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw146) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw146) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw146) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw146) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw146) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 148/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw147 rwState
+
+func (w *rw147) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw147) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw147) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw147) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw147) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw147) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw147) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw147) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 149/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, fullDuplexEnabler
+type rw148 rwState
+
+func (w *rw148) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw148) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw148) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw148) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw148) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw148) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw148) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 150/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw149 rwState
+
+func (w *rw149) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw149) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw149) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw149) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw149) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw149) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw149) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw149) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 151/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw150 rwState
+
+func (w *rw150) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw150) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw150) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw150) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw150) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw150) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw150) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw150) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 152/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw151 rwState
+
+func (w *rw151) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw151) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw151) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw151) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw151) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw151) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw151) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw151) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw151) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 153/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner
+type rw152 rwState
+
+func (w *rw152) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw152) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw152) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw152) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw152) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw152) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw152) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw152) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 154/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, io.StringWriter
+type rw153 rwState
+
+func (w *rw153) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw153) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw153) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw153) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw153) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw153) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw153) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw153) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw153) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 155/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, http.Pusher
+type rw154 rwState
+
+func (w *rw154) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw154) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw154) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw154) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw154) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw154) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw154) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw154) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw154) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 156/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw155 rwState
+
+func (w *rw155) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw155) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw155) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw155) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw155) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw155) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw155) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw155) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw155) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw155) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 157/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw156 rwState
+
+func (w *rw156) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw156) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw156) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw156) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw156) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw156) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw156) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw156) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw156) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 158/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw157 rwState
+
+func (w *rw157) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw157) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw157) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw157) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw157) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw157) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw157) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw157) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw157) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw157) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 159/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw158 rwState
+
+func (w *rw158) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw158) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw158) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw158) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw158) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw158) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw158) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw158) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw158) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw158) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 160/512: http.ResponseWriter, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw159 rwState
+
+func (w *rw159) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw159) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw159) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw159) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw159) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw159) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw159) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw159) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw159) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw159) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw159) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 161/512: http.ResponseWriter, httpFlushError, http.Hijacker
+type rw160 rwState
+
+func (w *rw160) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw160) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw160) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw160) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw160) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw160) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 162/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.StringWriter
+type rw161 rwState
+
+func (w *rw161) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw161) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw161) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw161) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw161) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw161) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw161) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 163/512: http.ResponseWriter, httpFlushError, http.Hijacker, http.Pusher
+type rw162 rwState
+
+func (w *rw162) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw162) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw162) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw162) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw162) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw162) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw162) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 164/512: http.ResponseWriter, httpFlushError, http.Hijacker, http.Pusher, io.StringWriter
+type rw163 rwState
+
+func (w *rw163) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw163) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw163) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw163) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw163) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw163) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw163) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw163) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 165/512: http.ResponseWriter, httpFlushError, http.Hijacker, fullDuplexEnabler
+type rw164 rwState
+
+func (w *rw164) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw164) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw164) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw164) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw164) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw164) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw164) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 166/512: http.ResponseWriter, httpFlushError, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw165 rwState
+
+func (w *rw165) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw165) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw165) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw165) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw165) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw165) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw165) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw165) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 167/512: http.ResponseWriter, httpFlushError, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw166 rwState
+
+func (w *rw166) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw166) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw166) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw166) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw166) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw166) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw166) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw166) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 168/512: http.ResponseWriter, httpFlushError, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw167 rwState
+
+func (w *rw167) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw167) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw167) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw167) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw167) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw167) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw167) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw167) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw167) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 169/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner
+type rw168 rwState
+
+func (w *rw168) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw168) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw168) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw168) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw168) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw168) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw168) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw168) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 170/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, io.StringWriter
+type rw169 rwState
+
+func (w *rw169) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw169) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw169) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw169) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw169) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw169) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw169) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw169) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw169) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 171/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, http.Pusher
+type rw170 rwState
+
+func (w *rw170) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw170) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw170) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw170) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw170) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw170) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw170) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw170) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw170) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 172/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw171 rwState
+
+func (w *rw171) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw171) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw171) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw171) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw171) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw171) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw171) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw171) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw171) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw171) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 173/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler
+type rw172 rwState
+
+func (w *rw172) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw172) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw172) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw172) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw172) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw172) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw172) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw172) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw172) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 174/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw173 rwState
+
+func (w *rw173) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw173) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw173) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw173) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw173) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw173) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw173) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw173) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw173) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw173) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 175/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw174 rwState
+
+func (w *rw174) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw174) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw174) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw174) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw174) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw174) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw174) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw174) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw174) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw174) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 176/512: http.ResponseWriter, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw175 rwState
+
+func (w *rw175) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw175) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw175) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw175) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw175) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw175) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw175) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw175) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw175) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw175) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw175) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 177/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom
+type rw176 rwState
+
+func (w *rw176) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw176) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw176) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw176) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw176) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw176) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw176) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 178/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw177 rwState
+
+func (w *rw177) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw177) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw177) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw177) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw177) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw177) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw177) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw177) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 179/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw178 rwState
+
+func (w *rw178) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw178) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw178) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw178) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw178) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw178) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw178) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw178) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 180/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw179 rwState
+
+func (w *rw179) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw179) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw179) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw179) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw179) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw179) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw179) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw179) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw179) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 181/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw180 rwState
+
+func (w *rw180) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw180) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw180) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw180) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw180) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw180) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw180) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw180) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 182/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw181 rwState
+
+func (w *rw181) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw181) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw181) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw181) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw181) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw181) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw181) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw181) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw181) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 183/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw182 rwState
+
+func (w *rw182) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw182) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw182) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw182) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw182) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw182) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw182) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw182) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw182) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 184/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw183 rwState
+
+func (w *rw183) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw183) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw183) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw183) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw183) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw183) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw183) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw183) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw183) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw183) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 185/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner
+type rw184 rwState
+
+func (w *rw184) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw184) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw184) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw184) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw184) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw184) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw184) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw184) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw184) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 186/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw185 rwState
+
+func (w *rw185) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw185) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw185) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw185) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw185) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw185) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw185) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw185) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw185) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw185) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 187/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw186 rwState
+
+func (w *rw186) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw186) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw186) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw186) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw186) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw186) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw186) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw186) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw186) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw186) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 188/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw187 rwState
+
+func (w *rw187) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw187) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw187) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw187) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw187) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw187) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw187) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw187) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw187) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw187) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw187) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 189/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw188 rwState
+
+func (w *rw188) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw188) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw188) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw188) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw188) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw188) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw188) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw188) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw188) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw188) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 190/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw189 rwState
+
+func (w *rw189) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw189) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw189) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw189) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw189) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw189) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw189) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw189) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw189) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw189) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw189) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 191/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw190 rwState
+
+func (w *rw190) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw190) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw190) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw190) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw190) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw190) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw190) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw190) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw190) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw190) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw190) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 192/512: http.ResponseWriter, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw191 rwState
+
+func (w *rw191) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw191) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw191) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw191) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw191) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw191) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw191) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw191) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw191) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw191) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw191) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw191) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 193/512: http.ResponseWriter, httpFlushError, http.CloseNotifier
+type rw192 rwState
+
+func (w *rw192) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw192) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw192) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw192) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw192) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw192) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+
+// combination 194/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.StringWriter
+type rw193 rwState
+
+func (w *rw193) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw193) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw193) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw193) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw193) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw193) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw193) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 195/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Pusher
+type rw194 rwState
+
+func (w *rw194) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw194) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw194) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw194) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw194) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw194) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw194) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 196/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Pusher, io.StringWriter
+type rw195 rwState
+
+func (w *rw195) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw195) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw195) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw195) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw195) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw195) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw195) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw195) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 197/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, fullDuplexEnabler
+type rw196 rwState
+
+func (w *rw196) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw196) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw196) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw196) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw196) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw196) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw196) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 198/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, fullDuplexEnabler, io.StringWriter
+type rw197 rwState
+
+func (w *rw197) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw197) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw197) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw197) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw197) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw197) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw197) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw197) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 199/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, fullDuplexEnabler, http.Pusher
+type rw198 rwState
+
+func (w *rw198) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw198) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw198) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw198) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw198) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw198) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw198) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw198) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 200/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw199 rwState
+
+func (w *rw199) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw199) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw199) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw199) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw199) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw199) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw199) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw199) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw199) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 201/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner
+type rw200 rwState
+
+func (w *rw200) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw200) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw200) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw200) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw200) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw200) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw200) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw200) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 202/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, io.StringWriter
+type rw201 rwState
+
+func (w *rw201) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw201) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw201) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw201) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw201) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw201) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw201) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw201) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw201) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 203/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, http.Pusher
+type rw202 rwState
+
+func (w *rw202) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw202) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw202) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw202) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw202) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw202) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw202) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw202) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw202) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 204/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, http.Pusher, io.StringWriter
+type rw203 rwState
+
+func (w *rw203) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw203) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw203) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw203) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw203) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw203) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw203) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw203) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw203) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw203) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 205/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler
+type rw204 rwState
+
+func (w *rw204) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw204) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw204) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw204) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw204) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw204) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw204) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw204) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw204) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 206/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, io.StringWriter
+type rw205 rwState
+
+func (w *rw205) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw205) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw205) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw205) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw205) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw205) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw205) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw205) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw205) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw205) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 207/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher
+type rw206 rwState
+
+func (w *rw206) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw206) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw206) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw206) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw206) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw206) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw206) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw206) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw206) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw206) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 208/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw207 rwState
+
+func (w *rw207) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw207) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw207) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw207) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw207) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw207) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw207) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw207) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw207) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw207) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw207) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 209/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom
+type rw208 rwState
+
+func (w *rw208) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw208) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw208) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw208) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw208) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw208) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw208) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 210/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, io.StringWriter
+type rw209 rwState
+
+func (w *rw209) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw209) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw209) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw209) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw209) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw209) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw209) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw209) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 211/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, http.Pusher
+type rw210 rwState
+
+func (w *rw210) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw210) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw210) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw210) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw210) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw210) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw210) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw210) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 212/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw211 rwState
+
+func (w *rw211) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw211) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw211) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw211) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw211) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw211) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw211) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw211) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw211) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 213/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler
+type rw212 rwState
+
+func (w *rw212) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw212) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw212) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw212) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw212) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw212) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw212) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw212) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 214/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw213 rwState
+
+func (w *rw213) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw213) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw213) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw213) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw213) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw213) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw213) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw213) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw213) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 215/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw214 rwState
+
+func (w *rw214) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw214) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw214) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw214) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw214) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw214) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw214) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw214) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw214) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 216/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw215 rwState
+
+func (w *rw215) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw215) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw215) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw215) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw215) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw215) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw215) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw215) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw215) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw215) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 217/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner
+type rw216 rwState
+
+func (w *rw216) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw216) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw216) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw216) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw216) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw216) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw216) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw216) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw216) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 218/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, io.StringWriter
+type rw217 rwState
+
+func (w *rw217) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw217) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw217) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw217) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw217) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw217) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw217) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw217) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw217) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw217) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 219/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher
+type rw218 rwState
+
+func (w *rw218) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw218) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw218) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw218) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw218) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw218) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw218) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw218) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw218) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw218) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 220/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw219 rwState
+
+func (w *rw219) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw219) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw219) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw219) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw219) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw219) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw219) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw219) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw219) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw219) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw219) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 221/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw220 rwState
+
+func (w *rw220) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw220) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw220) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw220) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw220) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw220) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw220) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw220) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw220) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw220) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 222/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw221 rwState
+
+func (w *rw221) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw221) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw221) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw221) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw221) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw221) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw221) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw221) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw221) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw221) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw221) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 223/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw222 rwState
+
+func (w *rw222) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw222) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw222) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw222) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw222) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw222) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw222) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw222) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw222) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw222) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw222) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 224/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw223 rwState
+
+func (w *rw223) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw223) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw223) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw223) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw223) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw223) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw223) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw223) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw223) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw223) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw223) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw223) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 225/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker
+type rw224 rwState
+
+func (w *rw224) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw224) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw224) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw224) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw224) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw224) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw224) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 226/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.StringWriter
+type rw225 rwState
+
+func (w *rw225) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw225) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw225) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw225) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw225) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw225) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw225) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw225) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 227/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, http.Pusher
+type rw226 rwState
+
+func (w *rw226) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw226) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw226) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw226) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw226) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw226) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw226) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw226) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 228/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, http.Pusher, io.StringWriter
+type rw227 rwState
+
+func (w *rw227) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw227) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw227) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw227) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw227) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw227) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw227) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw227) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw227) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 229/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler
+type rw228 rwState
+
+func (w *rw228) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw228) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw228) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw228) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw228) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw228) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw228) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw228) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 230/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw229 rwState
+
+func (w *rw229) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw229) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw229) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw229) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw229) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw229) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw229) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw229) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw229) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 231/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw230 rwState
+
+func (w *rw230) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw230) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw230) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw230) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw230) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw230) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw230) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw230) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw230) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 232/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw231 rwState
+
+func (w *rw231) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw231) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw231) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw231) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw231) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw231) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw231) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw231) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw231) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw231) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 233/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner
+type rw232 rwState
+
+func (w *rw232) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw232) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw232) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw232) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw232) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw232) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw232) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw232) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw232) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 234/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, io.StringWriter
+type rw233 rwState
+
+func (w *rw233) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw233) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw233) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw233) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw233) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw233) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw233) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw233) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw233) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw233) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 235/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher
+type rw234 rwState
+
+func (w *rw234) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw234) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw234) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw234) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw234) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw234) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw234) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw234) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw234) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw234) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 236/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw235 rwState
+
+func (w *rw235) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw235) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw235) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw235) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw235) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw235) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw235) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw235) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw235) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw235) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw235) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 237/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler
+type rw236 rwState
+
+func (w *rw236) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw236) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw236) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw236) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw236) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw236) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw236) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw236) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw236) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw236) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 238/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw237 rwState
+
+func (w *rw237) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw237) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw237) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw237) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw237) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw237) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw237) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw237) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw237) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw237) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw237) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 239/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw238 rwState
+
+func (w *rw238) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw238) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw238) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw238) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw238) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw238) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw238) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw238) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw238) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw238) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw238) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 240/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw239 rwState
+
+func (w *rw239) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw239) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw239) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw239) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw239) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw239) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw239) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw239) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw239) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw239) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw239) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw239) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 241/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom
+type rw240 rwState
+
+func (w *rw240) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw240) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw240) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw240) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw240) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw240) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw240) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw240) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 242/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw241 rwState
+
+func (w *rw241) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw241) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw241) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw241) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw241) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw241) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw241) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw241) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw241) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 243/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw242 rwState
+
+func (w *rw242) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw242) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw242) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw242) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw242) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw242) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw242) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw242) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw242) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 244/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw243 rwState
+
+func (w *rw243) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw243) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw243) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw243) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw243) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw243) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw243) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw243) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw243) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw243) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 245/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw244 rwState
+
+func (w *rw244) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw244) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw244) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw244) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw244) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw244) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw244) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw244) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw244) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 246/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw245 rwState
+
+func (w *rw245) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw245) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw245) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw245) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw245) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw245) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw245) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw245) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw245) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw245) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 247/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw246 rwState
+
+func (w *rw246) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw246) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw246) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw246) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw246) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw246) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw246) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw246) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw246) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw246) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 248/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw247 rwState
+
+func (w *rw247) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw247) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw247) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw247) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw247) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw247) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw247) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw247) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw247) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw247) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw247) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 249/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner
+type rw248 rwState
+
+func (w *rw248) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw248) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw248) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw248) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw248) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw248) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw248) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw248) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw248) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw248) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 250/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw249 rwState
+
+func (w *rw249) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw249) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw249) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw249) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw249) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw249) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw249) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw249) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw249) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw249) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw249) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 251/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw250 rwState
+
+func (w *rw250) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw250) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw250) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw250) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw250) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw250) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw250) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw250) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw250) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw250) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw250) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 252/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw251 rwState
+
+func (w *rw251) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw251) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw251) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw251) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw251) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw251) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw251) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw251) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw251) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw251) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw251) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw251) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 253/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw252 rwState
+
+func (w *rw252) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw252) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw252) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw252) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw252) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw252) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw252) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw252) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw252) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw252) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw252) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 254/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw253 rwState
+
+func (w *rw253) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw253) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw253) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw253) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw253) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw253) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw253) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw253) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw253) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw253) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw253) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw253) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 255/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw254 rwState
+
+func (w *rw254) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw254) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw254) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw254) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw254) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw254) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw254) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw254) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw254) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw254) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw254) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw254) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 256/512: http.ResponseWriter, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw255 rwState
+
+func (w *rw255) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw255) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw255) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw255) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw255) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw255) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw255) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw255) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw255) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw255) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw255) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw255) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw255) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 257/512: http.ResponseWriter, http.Flusher
+type rw256 rwState
+
+func (w *rw256) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw256) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw256) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw256) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw256) Flush() {
+ (*rwState)(w).doFlush()
+}
+
+// combination 258/512: http.ResponseWriter, http.Flusher, io.StringWriter
+type rw257 rwState
+
+func (w *rw257) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw257) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw257) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw257) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw257) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw257) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 259/512: http.ResponseWriter, http.Flusher, http.Pusher
+type rw258 rwState
+
+func (w *rw258) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw258) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw258) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw258) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw258) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw258) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 260/512: http.ResponseWriter, http.Flusher, http.Pusher, io.StringWriter
+type rw259 rwState
+
+func (w *rw259) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw259) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw259) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw259) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw259) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw259) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw259) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 261/512: http.ResponseWriter, http.Flusher, fullDuplexEnabler
+type rw260 rwState
+
+func (w *rw260) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw260) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw260) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw260) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw260) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw260) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 262/512: http.ResponseWriter, http.Flusher, fullDuplexEnabler, io.StringWriter
+type rw261 rwState
+
+func (w *rw261) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw261) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw261) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw261) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw261) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw261) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw261) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 263/512: http.ResponseWriter, http.Flusher, fullDuplexEnabler, http.Pusher
+type rw262 rwState
+
+func (w *rw262) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw262) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw262) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw262) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw262) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw262) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw262) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 264/512: http.ResponseWriter, http.Flusher, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw263 rwState
+
+func (w *rw263) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw263) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw263) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw263) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw263) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw263) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw263) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw263) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 265/512: http.ResponseWriter, http.Flusher, deadliner
+type rw264 rwState
+
+func (w *rw264) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw264) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw264) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw264) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw264) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw264) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw264) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 266/512: http.ResponseWriter, http.Flusher, deadliner, io.StringWriter
+type rw265 rwState
+
+func (w *rw265) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw265) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw265) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw265) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw265) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw265) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw265) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw265) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 267/512: http.ResponseWriter, http.Flusher, deadliner, http.Pusher
+type rw266 rwState
+
+func (w *rw266) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw266) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw266) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw266) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw266) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw266) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw266) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw266) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 268/512: http.ResponseWriter, http.Flusher, deadliner, http.Pusher, io.StringWriter
+type rw267 rwState
+
+func (w *rw267) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw267) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw267) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw267) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw267) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw267) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw267) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw267) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw267) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 269/512: http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler
+type rw268 rwState
+
+func (w *rw268) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw268) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw268) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw268) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw268) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw268) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw268) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw268) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 270/512: http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler, io.StringWriter
+type rw269 rwState
+
+func (w *rw269) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw269) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw269) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw269) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw269) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw269) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw269) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw269) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw269) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 271/512: http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler, http.Pusher
+type rw270 rwState
+
+func (w *rw270) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw270) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw270) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw270) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw270) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw270) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw270) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw270) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw270) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 272/512: http.ResponseWriter, http.Flusher, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw271 rwState
+
+func (w *rw271) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw271) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw271) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw271) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw271) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw271) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw271) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw271) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw271) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw271) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 273/512: http.ResponseWriter, http.Flusher, io.ReaderFrom
+type rw272 rwState
+
+func (w *rw272) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw272) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw272) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw272) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw272) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw272) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 274/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, io.StringWriter
+type rw273 rwState
+
+func (w *rw273) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw273) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw273) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw273) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw273) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw273) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw273) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 275/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, http.Pusher
+type rw274 rwState
+
+func (w *rw274) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw274) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw274) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw274) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw274) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw274) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw274) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 276/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw275 rwState
+
+func (w *rw275) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw275) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw275) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw275) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw275) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw275) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw275) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw275) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 277/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler
+type rw276 rwState
+
+func (w *rw276) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw276) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw276) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw276) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw276) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw276) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw276) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 278/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw277 rwState
+
+func (w *rw277) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw277) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw277) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw277) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw277) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw277) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw277) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw277) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 279/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw278 rwState
+
+func (w *rw278) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw278) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw278) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw278) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw278) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw278) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw278) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw278) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 280/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw279 rwState
+
+func (w *rw279) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw279) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw279) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw279) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw279) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw279) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw279) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw279) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw279) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 281/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner
+type rw280 rwState
+
+func (w *rw280) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw280) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw280) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw280) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw280) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw280) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw280) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw280) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 282/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, io.StringWriter
+type rw281 rwState
+
+func (w *rw281) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw281) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw281) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw281) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw281) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw281) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw281) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw281) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw281) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 283/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, http.Pusher
+type rw282 rwState
+
+func (w *rw282) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw282) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw282) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw282) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw282) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw282) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw282) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw282) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw282) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 284/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw283 rwState
+
+func (w *rw283) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw283) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw283) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw283) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw283) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw283) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw283) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw283) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw283) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw283) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 285/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw284 rwState
+
+func (w *rw284) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw284) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw284) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw284) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw284) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw284) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw284) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw284) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw284) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 286/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw285 rwState
+
+func (w *rw285) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw285) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw285) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw285) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw285) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw285) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw285) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw285) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw285) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw285) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 287/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw286 rwState
+
+func (w *rw286) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw286) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw286) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw286) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw286) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw286) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw286) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw286) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw286) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw286) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 288/512: http.ResponseWriter, http.Flusher, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw287 rwState
+
+func (w *rw287) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw287) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw287) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw287) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw287) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw287) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw287) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw287) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw287) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw287) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw287) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 289/512: http.ResponseWriter, http.Flusher, http.Hijacker
+type rw288 rwState
+
+func (w *rw288) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw288) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw288) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw288) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw288) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw288) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 290/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.StringWriter
+type rw289 rwState
+
+func (w *rw289) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw289) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw289) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw289) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw289) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw289) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw289) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 291/512: http.ResponseWriter, http.Flusher, http.Hijacker, http.Pusher
+type rw290 rwState
+
+func (w *rw290) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw290) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw290) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw290) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw290) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw290) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw290) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 292/512: http.ResponseWriter, http.Flusher, http.Hijacker, http.Pusher, io.StringWriter
+type rw291 rwState
+
+func (w *rw291) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw291) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw291) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw291) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw291) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw291) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw291) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw291) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 293/512: http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler
+type rw292 rwState
+
+func (w *rw292) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw292) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw292) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw292) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw292) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw292) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw292) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 294/512: http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw293 rwState
+
+func (w *rw293) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw293) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw293) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw293) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw293) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw293) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw293) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw293) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 295/512: http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw294 rwState
+
+func (w *rw294) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw294) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw294) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw294) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw294) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw294) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw294) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw294) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 296/512: http.ResponseWriter, http.Flusher, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw295 rwState
+
+func (w *rw295) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw295) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw295) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw295) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw295) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw295) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw295) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw295) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw295) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 297/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner
+type rw296 rwState
+
+func (w *rw296) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw296) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw296) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw296) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw296) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw296) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw296) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw296) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 298/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, io.StringWriter
+type rw297 rwState
+
+func (w *rw297) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw297) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw297) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw297) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw297) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw297) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw297) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw297) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw297) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 299/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, http.Pusher
+type rw298 rwState
+
+func (w *rw298) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw298) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw298) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw298) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw298) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw298) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw298) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw298) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw298) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 300/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw299 rwState
+
+func (w *rw299) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw299) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw299) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw299) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw299) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw299) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw299) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw299) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw299) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw299) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 301/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler
+type rw300 rwState
+
+func (w *rw300) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw300) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw300) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw300) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw300) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw300) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw300) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw300) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw300) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 302/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw301 rwState
+
+func (w *rw301) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw301) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw301) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw301) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw301) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw301) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw301) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw301) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw301) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw301) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 303/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw302 rwState
+
+func (w *rw302) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw302) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw302) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw302) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw302) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw302) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw302) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw302) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw302) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw302) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 304/512: http.ResponseWriter, http.Flusher, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw303 rwState
+
+func (w *rw303) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw303) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw303) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw303) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw303) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw303) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw303) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw303) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw303) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw303) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw303) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 305/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom
+type rw304 rwState
+
+func (w *rw304) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw304) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw304) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw304) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw304) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw304) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw304) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 306/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw305 rwState
+
+func (w *rw305) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw305) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw305) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw305) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw305) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw305) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw305) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw305) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 307/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw306 rwState
+
+func (w *rw306) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw306) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw306) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw306) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw306) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw306) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw306) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw306) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 308/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw307 rwState
+
+func (w *rw307) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw307) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw307) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw307) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw307) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw307) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw307) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw307) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw307) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 309/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw308 rwState
+
+func (w *rw308) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw308) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw308) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw308) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw308) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw308) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw308) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw308) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 310/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw309 rwState
+
+func (w *rw309) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw309) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw309) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw309) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw309) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw309) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw309) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw309) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw309) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 311/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw310 rwState
+
+func (w *rw310) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw310) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw310) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw310) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw310) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw310) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw310) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw310) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw310) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 312/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw311 rwState
+
+func (w *rw311) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw311) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw311) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw311) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw311) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw311) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw311) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw311) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw311) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw311) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 313/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner
+type rw312 rwState
+
+func (w *rw312) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw312) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw312) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw312) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw312) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw312) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw312) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw312) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw312) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 314/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw313 rwState
+
+func (w *rw313) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw313) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw313) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw313) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw313) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw313) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw313) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw313) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw313) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw313) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 315/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw314 rwState
+
+func (w *rw314) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw314) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw314) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw314) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw314) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw314) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw314) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw314) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw314) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw314) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 316/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw315 rwState
+
+func (w *rw315) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw315) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw315) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw315) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw315) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw315) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw315) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw315) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw315) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw315) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw315) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 317/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw316 rwState
+
+func (w *rw316) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw316) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw316) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw316) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw316) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw316) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw316) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw316) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw316) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw316) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 318/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw317 rwState
+
+func (w *rw317) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw317) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw317) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw317) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw317) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw317) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw317) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw317) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw317) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw317) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw317) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 319/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw318 rwState
+
+func (w *rw318) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw318) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw318) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw318) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw318) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw318) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw318) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw318) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw318) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw318) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw318) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 320/512: http.ResponseWriter, http.Flusher, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw319 rwState
+
+func (w *rw319) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw319) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw319) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw319) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw319) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw319) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw319) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw319) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw319) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw319) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw319) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw319) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 321/512: http.ResponseWriter, http.Flusher, http.CloseNotifier
+type rw320 rwState
+
+func (w *rw320) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw320) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw320) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw320) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw320) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw320) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+
+// combination 322/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.StringWriter
+type rw321 rwState
+
+func (w *rw321) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw321) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw321) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw321) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw321) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw321) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw321) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 323/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Pusher
+type rw322 rwState
+
+func (w *rw322) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw322) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw322) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw322) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw322) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw322) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw322) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 324/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Pusher, io.StringWriter
+type rw323 rwState
+
+func (w *rw323) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw323) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw323) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw323) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw323) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw323) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw323) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw323) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 325/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler
+type rw324 rwState
+
+func (w *rw324) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw324) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw324) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw324) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw324) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw324) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw324) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 326/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler, io.StringWriter
+type rw325 rwState
+
+func (w *rw325) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw325) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw325) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw325) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw325) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw325) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw325) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw325) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 327/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler, http.Pusher
+type rw326 rwState
+
+func (w *rw326) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw326) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw326) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw326) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw326) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw326) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw326) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw326) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 328/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw327 rwState
+
+func (w *rw327) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw327) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw327) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw327) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw327) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw327) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw327) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw327) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw327) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 329/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner
+type rw328 rwState
+
+func (w *rw328) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw328) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw328) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw328) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw328) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw328) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw328) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw328) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 330/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, io.StringWriter
+type rw329 rwState
+
+func (w *rw329) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw329) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw329) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw329) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw329) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw329) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw329) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw329) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw329) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 331/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, http.Pusher
+type rw330 rwState
+
+func (w *rw330) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw330) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw330) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw330) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw330) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw330) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw330) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw330) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw330) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 332/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, http.Pusher, io.StringWriter
+type rw331 rwState
+
+func (w *rw331) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw331) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw331) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw331) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw331) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw331) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw331) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw331) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw331) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw331) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 333/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler
+type rw332 rwState
+
+func (w *rw332) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw332) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw332) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw332) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw332) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw332) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw332) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw332) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw332) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 334/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler, io.StringWriter
+type rw333 rwState
+
+func (w *rw333) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw333) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw333) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw333) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw333) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw333) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw333) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw333) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw333) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw333) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 335/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher
+type rw334 rwState
+
+func (w *rw334) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw334) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw334) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw334) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw334) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw334) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw334) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw334) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw334) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw334) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 336/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw335 rwState
+
+func (w *rw335) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw335) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw335) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw335) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw335) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw335) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw335) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw335) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw335) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw335) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw335) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 337/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom
+type rw336 rwState
+
+func (w *rw336) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw336) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw336) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw336) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw336) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw336) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw336) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 338/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, io.StringWriter
+type rw337 rwState
+
+func (w *rw337) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw337) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw337) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw337) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw337) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw337) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw337) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw337) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 339/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, http.Pusher
+type rw338 rwState
+
+func (w *rw338) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw338) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw338) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw338) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw338) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw338) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw338) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw338) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 340/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw339 rwState
+
+func (w *rw339) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw339) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw339) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw339) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw339) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw339) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw339) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw339) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw339) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 341/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler
+type rw340 rwState
+
+func (w *rw340) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw340) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw340) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw340) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw340) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw340) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw340) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw340) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 342/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw341 rwState
+
+func (w *rw341) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw341) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw341) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw341) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw341) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw341) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw341) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw341) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw341) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 343/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw342 rwState
+
+func (w *rw342) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw342) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw342) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw342) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw342) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw342) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw342) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw342) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw342) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 344/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw343 rwState
+
+func (w *rw343) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw343) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw343) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw343) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw343) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw343) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw343) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw343) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw343) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw343) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 345/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner
+type rw344 rwState
+
+func (w *rw344) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw344) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw344) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw344) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw344) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw344) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw344) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw344) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw344) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 346/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, io.StringWriter
+type rw345 rwState
+
+func (w *rw345) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw345) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw345) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw345) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw345) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw345) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw345) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw345) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw345) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw345) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 347/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher
+type rw346 rwState
+
+func (w *rw346) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw346) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw346) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw346) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw346) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw346) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw346) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw346) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw346) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw346) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 348/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw347 rwState
+
+func (w *rw347) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw347) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw347) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw347) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw347) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw347) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw347) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw347) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw347) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw347) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw347) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 349/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw348 rwState
+
+func (w *rw348) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw348) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw348) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw348) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw348) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw348) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw348) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw348) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw348) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw348) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 350/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw349 rwState
+
+func (w *rw349) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw349) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw349) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw349) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw349) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw349) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw349) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw349) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw349) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw349) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw349) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 351/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw350 rwState
+
+func (w *rw350) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw350) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw350) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw350) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw350) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw350) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw350) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw350) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw350) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw350) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw350) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 352/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw351 rwState
+
+func (w *rw351) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw351) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw351) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw351) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw351) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw351) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw351) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw351) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw351) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw351) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw351) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw351) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 353/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker
+type rw352 rwState
+
+func (w *rw352) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw352) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw352) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw352) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw352) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw352) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw352) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 354/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.StringWriter
+type rw353 rwState
+
+func (w *rw353) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw353) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw353) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw353) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw353) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw353) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw353) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw353) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 355/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, http.Pusher
+type rw354 rwState
+
+func (w *rw354) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw354) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw354) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw354) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw354) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw354) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw354) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw354) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 356/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, http.Pusher, io.StringWriter
+type rw355 rwState
+
+func (w *rw355) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw355) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw355) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw355) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw355) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw355) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw355) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw355) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw355) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 357/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler
+type rw356 rwState
+
+func (w *rw356) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw356) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw356) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw356) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw356) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw356) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw356) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw356) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 358/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw357 rwState
+
+func (w *rw357) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw357) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw357) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw357) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw357) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw357) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw357) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw357) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw357) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 359/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw358 rwState
+
+func (w *rw358) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw358) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw358) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw358) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw358) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw358) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw358) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw358) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw358) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 360/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw359 rwState
+
+func (w *rw359) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw359) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw359) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw359) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw359) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw359) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw359) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw359) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw359) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw359) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 361/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner
+type rw360 rwState
+
+func (w *rw360) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw360) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw360) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw360) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw360) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw360) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw360) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw360) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw360) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 362/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, io.StringWriter
+type rw361 rwState
+
+func (w *rw361) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw361) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw361) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw361) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw361) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw361) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw361) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw361) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw361) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw361) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 363/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher
+type rw362 rwState
+
+func (w *rw362) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw362) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw362) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw362) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw362) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw362) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw362) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw362) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw362) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw362) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 364/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw363 rwState
+
+func (w *rw363) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw363) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw363) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw363) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw363) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw363) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw363) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw363) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw363) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw363) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw363) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 365/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler
+type rw364 rwState
+
+func (w *rw364) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw364) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw364) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw364) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw364) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw364) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw364) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw364) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw364) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw364) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 366/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw365 rwState
+
+func (w *rw365) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw365) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw365) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw365) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw365) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw365) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw365) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw365) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw365) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw365) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw365) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 367/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw366 rwState
+
+func (w *rw366) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw366) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw366) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw366) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw366) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw366) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw366) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw366) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw366) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw366) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw366) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 368/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw367 rwState
+
+func (w *rw367) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw367) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw367) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw367) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw367) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw367) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw367) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw367) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw367) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw367) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw367) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw367) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 369/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom
+type rw368 rwState
+
+func (w *rw368) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw368) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw368) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw368) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw368) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw368) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw368) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw368) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 370/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw369 rwState
+
+func (w *rw369) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw369) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw369) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw369) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw369) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw369) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw369) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw369) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw369) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 371/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw370 rwState
+
+func (w *rw370) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw370) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw370) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw370) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw370) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw370) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw370) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw370) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw370) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 372/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw371 rwState
+
+func (w *rw371) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw371) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw371) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw371) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw371) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw371) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw371) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw371) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw371) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw371) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 373/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw372 rwState
+
+func (w *rw372) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw372) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw372) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw372) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw372) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw372) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw372) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw372) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw372) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 374/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw373 rwState
+
+func (w *rw373) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw373) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw373) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw373) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw373) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw373) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw373) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw373) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw373) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw373) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 375/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw374 rwState
+
+func (w *rw374) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw374) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw374) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw374) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw374) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw374) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw374) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw374) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw374) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw374) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 376/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw375 rwState
+
+func (w *rw375) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw375) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw375) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw375) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw375) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw375) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw375) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw375) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw375) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw375) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw375) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 377/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner
+type rw376 rwState
+
+func (w *rw376) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw376) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw376) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw376) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw376) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw376) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw376) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw376) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw376) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw376) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 378/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw377 rwState
+
+func (w *rw377) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw377) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw377) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw377) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw377) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw377) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw377) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw377) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw377) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw377) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw377) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 379/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw378 rwState
+
+func (w *rw378) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw378) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw378) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw378) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw378) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw378) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw378) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw378) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw378) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw378) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw378) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 380/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw379 rwState
+
+func (w *rw379) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw379) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw379) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw379) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw379) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw379) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw379) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw379) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw379) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw379) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw379) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw379) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 381/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw380 rwState
+
+func (w *rw380) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw380) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw380) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw380) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw380) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw380) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw380) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw380) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw380) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw380) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw380) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 382/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw381 rwState
+
+func (w *rw381) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw381) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw381) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw381) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw381) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw381) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw381) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw381) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw381) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw381) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw381) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw381) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 383/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw382 rwState
+
+func (w *rw382) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw382) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw382) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw382) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw382) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw382) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw382) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw382) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw382) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw382) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw382) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw382) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 384/512: http.ResponseWriter, http.Flusher, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw383 rwState
+
+func (w *rw383) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw383) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw383) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw383) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw383) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw383) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw383) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw383) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw383) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw383) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw383) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw383) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw383) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 385/512: http.ResponseWriter, http.Flusher, httpFlushError
+type rw384 rwState
+
+func (w *rw384) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw384) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw384) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw384) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw384) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw384) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+
+// combination 386/512: http.ResponseWriter, http.Flusher, httpFlushError, io.StringWriter
+type rw385 rwState
+
+func (w *rw385) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw385) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw385) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw385) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw385) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw385) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw385) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 387/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Pusher
+type rw386 rwState
+
+func (w *rw386) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw386) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw386) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw386) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw386) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw386) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw386) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 388/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Pusher, io.StringWriter
+type rw387 rwState
+
+func (w *rw387) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw387) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw387) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw387) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw387) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw387) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw387) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw387) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 389/512: http.ResponseWriter, http.Flusher, httpFlushError, fullDuplexEnabler
+type rw388 rwState
+
+func (w *rw388) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw388) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw388) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw388) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw388) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw388) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw388) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 390/512: http.ResponseWriter, http.Flusher, httpFlushError, fullDuplexEnabler, io.StringWriter
+type rw389 rwState
+
+func (w *rw389) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw389) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw389) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw389) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw389) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw389) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw389) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw389) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 391/512: http.ResponseWriter, http.Flusher, httpFlushError, fullDuplexEnabler, http.Pusher
+type rw390 rwState
+
+func (w *rw390) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw390) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw390) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw390) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw390) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw390) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw390) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw390) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 392/512: http.ResponseWriter, http.Flusher, httpFlushError, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw391 rwState
+
+func (w *rw391) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw391) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw391) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw391) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw391) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw391) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw391) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw391) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw391) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 393/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner
+type rw392 rwState
+
+func (w *rw392) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw392) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw392) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw392) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw392) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw392) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw392) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw392) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 394/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, io.StringWriter
+type rw393 rwState
+
+func (w *rw393) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw393) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw393) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw393) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw393) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw393) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw393) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw393) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw393) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 395/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, http.Pusher
+type rw394 rwState
+
+func (w *rw394) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw394) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw394) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw394) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw394) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw394) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw394) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw394) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw394) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 396/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, http.Pusher, io.StringWriter
+type rw395 rwState
+
+func (w *rw395) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw395) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw395) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw395) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw395) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw395) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw395) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw395) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw395) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw395) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 397/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, fullDuplexEnabler
+type rw396 rwState
+
+func (w *rw396) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw396) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw396) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw396) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw396) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw396) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw396) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw396) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw396) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 398/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, fullDuplexEnabler, io.StringWriter
+type rw397 rwState
+
+func (w *rw397) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw397) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw397) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw397) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw397) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw397) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw397) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw397) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw397) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw397) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 399/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, fullDuplexEnabler, http.Pusher
+type rw398 rwState
+
+func (w *rw398) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw398) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw398) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw398) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw398) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw398) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw398) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw398) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw398) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw398) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 400/512: http.ResponseWriter, http.Flusher, httpFlushError, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw399 rwState
+
+func (w *rw399) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw399) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw399) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw399) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw399) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw399) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw399) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw399) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw399) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw399) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw399) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 401/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom
+type rw400 rwState
+
+func (w *rw400) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw400) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw400) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw400) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw400) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw400) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw400) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 402/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, io.StringWriter
+type rw401 rwState
+
+func (w *rw401) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw401) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw401) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw401) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw401) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw401) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw401) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw401) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 403/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, http.Pusher
+type rw402 rwState
+
+func (w *rw402) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw402) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw402) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw402) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw402) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw402) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw402) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw402) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 404/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw403 rwState
+
+func (w *rw403) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw403) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw403) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw403) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw403) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw403) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw403) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw403) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw403) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 405/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, fullDuplexEnabler
+type rw404 rwState
+
+func (w *rw404) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw404) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw404) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw404) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw404) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw404) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw404) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw404) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 406/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw405 rwState
+
+func (w *rw405) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw405) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw405) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw405) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw405) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw405) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw405) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw405) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw405) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 407/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw406 rwState
+
+func (w *rw406) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw406) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw406) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw406) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw406) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw406) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw406) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw406) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw406) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 408/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw407 rwState
+
+func (w *rw407) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw407) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw407) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw407) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw407) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw407) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw407) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw407) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw407) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw407) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 409/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner
+type rw408 rwState
+
+func (w *rw408) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw408) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw408) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw408) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw408) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw408) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw408) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw408) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw408) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 410/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, io.StringWriter
+type rw409 rwState
+
+func (w *rw409) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw409) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw409) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw409) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw409) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw409) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw409) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw409) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw409) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw409) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 411/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, http.Pusher
+type rw410 rwState
+
+func (w *rw410) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw410) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw410) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw410) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw410) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw410) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw410) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw410) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw410) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw410) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 412/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw411 rwState
+
+func (w *rw411) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw411) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw411) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw411) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw411) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw411) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw411) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw411) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw411) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw411) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw411) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 413/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw412 rwState
+
+func (w *rw412) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw412) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw412) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw412) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw412) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw412) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw412) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw412) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw412) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw412) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 414/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw413 rwState
+
+func (w *rw413) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw413) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw413) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw413) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw413) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw413) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw413) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw413) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw413) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw413) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw413) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 415/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw414 rwState
+
+func (w *rw414) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw414) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw414) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw414) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw414) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw414) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw414) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw414) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw414) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw414) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw414) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 416/512: http.ResponseWriter, http.Flusher, httpFlushError, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw415 rwState
+
+func (w *rw415) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw415) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw415) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw415) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw415) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw415) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw415) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw415) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw415) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw415) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw415) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw415) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 417/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker
+type rw416 rwState
+
+func (w *rw416) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw416) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw416) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw416) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw416) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw416) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw416) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 418/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.StringWriter
+type rw417 rwState
+
+func (w *rw417) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw417) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw417) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw417) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw417) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw417) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw417) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw417) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 419/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, http.Pusher
+type rw418 rwState
+
+func (w *rw418) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw418) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw418) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw418) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw418) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw418) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw418) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw418) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 420/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, http.Pusher, io.StringWriter
+type rw419 rwState
+
+func (w *rw419) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw419) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw419) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw419) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw419) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw419) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw419) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw419) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw419) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 421/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, fullDuplexEnabler
+type rw420 rwState
+
+func (w *rw420) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw420) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw420) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw420) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw420) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw420) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw420) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw420) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 422/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw421 rwState
+
+func (w *rw421) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw421) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw421) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw421) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw421) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw421) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw421) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw421) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw421) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 423/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw422 rwState
+
+func (w *rw422) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw422) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw422) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw422) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw422) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw422) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw422) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw422) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw422) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 424/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw423 rwState
+
+func (w *rw423) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw423) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw423) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw423) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw423) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw423) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw423) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw423) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw423) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw423) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 425/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner
+type rw424 rwState
+
+func (w *rw424) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw424) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw424) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw424) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw424) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw424) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw424) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw424) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw424) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 426/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, io.StringWriter
+type rw425 rwState
+
+func (w *rw425) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw425) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw425) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw425) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw425) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw425) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw425) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw425) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw425) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw425) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 427/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, http.Pusher
+type rw426 rwState
+
+func (w *rw426) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw426) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw426) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw426) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw426) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw426) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw426) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw426) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw426) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw426) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 428/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw427 rwState
+
+func (w *rw427) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw427) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw427) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw427) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw427) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw427) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw427) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw427) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw427) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw427) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw427) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 429/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler
+type rw428 rwState
+
+func (w *rw428) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw428) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw428) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw428) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw428) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw428) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw428) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw428) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw428) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw428) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 430/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw429 rwState
+
+func (w *rw429) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw429) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw429) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw429) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw429) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw429) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw429) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw429) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw429) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw429) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw429) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 431/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw430 rwState
+
+func (w *rw430) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw430) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw430) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw430) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw430) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw430) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw430) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw430) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw430) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw430) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw430) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 432/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw431 rwState
+
+func (w *rw431) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw431) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw431) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw431) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw431) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw431) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw431) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw431) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw431) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw431) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw431) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw431) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 433/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom
+type rw432 rwState
+
+func (w *rw432) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw432) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw432) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw432) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw432) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw432) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw432) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw432) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 434/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw433 rwState
+
+func (w *rw433) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw433) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw433) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw433) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw433) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw433) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw433) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw433) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw433) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 435/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw434 rwState
+
+func (w *rw434) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw434) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw434) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw434) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw434) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw434) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw434) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw434) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw434) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 436/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw435 rwState
+
+func (w *rw435) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw435) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw435) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw435) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw435) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw435) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw435) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw435) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw435) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw435) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 437/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw436 rwState
+
+func (w *rw436) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw436) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw436) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw436) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw436) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw436) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw436) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw436) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw436) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 438/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw437 rwState
+
+func (w *rw437) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw437) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw437) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw437) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw437) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw437) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw437) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw437) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw437) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw437) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 439/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw438 rwState
+
+func (w *rw438) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw438) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw438) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw438) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw438) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw438) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw438) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw438) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw438) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw438) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 440/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw439 rwState
+
+func (w *rw439) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw439) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw439) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw439) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw439) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw439) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw439) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw439) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw439) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw439) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw439) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 441/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner
+type rw440 rwState
+
+func (w *rw440) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw440) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw440) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw440) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw440) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw440) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw440) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw440) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw440) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw440) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 442/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw441 rwState
+
+func (w *rw441) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw441) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw441) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw441) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw441) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw441) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw441) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw441) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw441) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw441) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw441) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 443/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw442 rwState
+
+func (w *rw442) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw442) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw442) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw442) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw442) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw442) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw442) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw442) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw442) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw442) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw442) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 444/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw443 rwState
+
+func (w *rw443) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw443) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw443) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw443) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw443) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw443) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw443) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw443) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw443) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw443) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw443) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw443) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 445/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw444 rwState
+
+func (w *rw444) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw444) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw444) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw444) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw444) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw444) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw444) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw444) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw444) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw444) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw444) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 446/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw445 rwState
+
+func (w *rw445) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw445) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw445) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw445) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw445) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw445) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw445) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw445) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw445) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw445) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw445) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw445) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 447/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw446 rwState
+
+func (w *rw446) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw446) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw446) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw446) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw446) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw446) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw446) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw446) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw446) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw446) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw446) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw446) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 448/512: http.ResponseWriter, http.Flusher, httpFlushError, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw447 rwState
+
+func (w *rw447) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw447) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw447) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw447) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw447) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw447) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw447) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw447) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw447) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw447) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw447) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw447) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw447) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 449/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier
+type rw448 rwState
+
+func (w *rw448) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw448) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw448) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw448) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw448) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw448) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw448) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+
+// combination 450/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.StringWriter
+type rw449 rwState
+
+func (w *rw449) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw449) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw449) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw449) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw449) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw449) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw449) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw449) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 451/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Pusher
+type rw450 rwState
+
+func (w *rw450) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw450) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw450) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw450) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw450) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw450) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw450) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw450) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 452/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Pusher, io.StringWriter
+type rw451 rwState
+
+func (w *rw451) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw451) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw451) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw451) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw451) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw451) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw451) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw451) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw451) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 453/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, fullDuplexEnabler
+type rw452 rwState
+
+func (w *rw452) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw452) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw452) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw452) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw452) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw452) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw452) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw452) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 454/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, fullDuplexEnabler, io.StringWriter
+type rw453 rwState
+
+func (w *rw453) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw453) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw453) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw453) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw453) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw453) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw453) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw453) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw453) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 455/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, fullDuplexEnabler, http.Pusher
+type rw454 rwState
+
+func (w *rw454) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw454) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw454) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw454) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw454) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw454) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw454) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw454) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw454) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 456/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw455 rwState
+
+func (w *rw455) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw455) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw455) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw455) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw455) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw455) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw455) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw455) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw455) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw455) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 457/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner
+type rw456 rwState
+
+func (w *rw456) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw456) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw456) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw456) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw456) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw456) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw456) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw456) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw456) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 458/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, io.StringWriter
+type rw457 rwState
+
+func (w *rw457) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw457) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw457) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw457) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw457) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw457) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw457) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw457) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw457) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw457) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 459/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, http.Pusher
+type rw458 rwState
+
+func (w *rw458) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw458) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw458) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw458) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw458) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw458) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw458) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw458) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw458) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw458) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 460/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, http.Pusher, io.StringWriter
+type rw459 rwState
+
+func (w *rw459) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw459) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw459) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw459) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw459) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw459) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw459) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw459) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw459) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw459) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw459) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 461/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler
+type rw460 rwState
+
+func (w *rw460) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw460) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw460) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw460) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw460) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw460) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw460) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw460) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw460) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw460) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 462/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, io.StringWriter
+type rw461 rwState
+
+func (w *rw461) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw461) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw461) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw461) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw461) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw461) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw461) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw461) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw461) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw461) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw461) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 463/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher
+type rw462 rwState
+
+func (w *rw462) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw462) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw462) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw462) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw462) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw462) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw462) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw462) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw462) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw462) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw462) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 464/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw463 rwState
+
+func (w *rw463) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw463) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw463) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw463) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw463) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw463) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw463) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw463) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw463) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw463) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw463) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw463) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 465/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom
+type rw464 rwState
+
+func (w *rw464) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw464) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw464) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw464) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw464) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw464) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw464) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw464) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 466/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, io.StringWriter
+type rw465 rwState
+
+func (w *rw465) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw465) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw465) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw465) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw465) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw465) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw465) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw465) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw465) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 467/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, http.Pusher
+type rw466 rwState
+
+func (w *rw466) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw466) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw466) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw466) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw466) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw466) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw466) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw466) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw466) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 468/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw467 rwState
+
+func (w *rw467) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw467) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw467) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw467) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw467) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw467) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw467) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw467) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw467) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw467) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 469/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler
+type rw468 rwState
+
+func (w *rw468) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw468) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw468) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw468) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw468) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw468) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw468) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw468) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw468) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 470/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw469 rwState
+
+func (w *rw469) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw469) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw469) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw469) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw469) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw469) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw469) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw469) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw469) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw469) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 471/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw470 rwState
+
+func (w *rw470) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw470) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw470) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw470) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw470) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw470) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw470) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw470) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw470) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw470) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 472/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw471 rwState
+
+func (w *rw471) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw471) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw471) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw471) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw471) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw471) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw471) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw471) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw471) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw471) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw471) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 473/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner
+type rw472 rwState
+
+func (w *rw472) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw472) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw472) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw472) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw472) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw472) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw472) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw472) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw472) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw472) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 474/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, io.StringWriter
+type rw473 rwState
+
+func (w *rw473) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw473) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw473) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw473) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw473) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw473) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw473) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw473) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw473) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw473) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw473) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 475/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher
+type rw474 rwState
+
+func (w *rw474) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw474) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw474) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw474) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw474) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw474) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw474) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw474) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw474) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw474) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw474) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 476/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw475 rwState
+
+func (w *rw475) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw475) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw475) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw475) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw475) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw475) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw475) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw475) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw475) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw475) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw475) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw475) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 477/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw476 rwState
+
+func (w *rw476) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw476) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw476) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw476) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw476) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw476) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw476) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw476) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw476) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw476) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw476) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 478/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw477 rwState
+
+func (w *rw477) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw477) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw477) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw477) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw477) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw477) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw477) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw477) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw477) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw477) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw477) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw477) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 479/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw478 rwState
+
+func (w *rw478) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw478) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw478) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw478) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw478) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw478) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw478) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw478) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw478) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw478) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw478) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw478) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 480/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw479 rwState
+
+func (w *rw479) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw479) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw479) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw479) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw479) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw479) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw479) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw479) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw479) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw479) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw479) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw479) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw479) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 481/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker
+type rw480 rwState
+
+func (w *rw480) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw480) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw480) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw480) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw480) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw480) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw480) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw480) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+
+// combination 482/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.StringWriter
+type rw481 rwState
+
+func (w *rw481) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw481) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw481) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw481) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw481) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw481) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw481) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw481) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw481) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 483/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, http.Pusher
+type rw482 rwState
+
+func (w *rw482) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw482) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw482) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw482) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw482) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw482) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw482) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw482) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw482) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 484/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, http.Pusher, io.StringWriter
+type rw483 rwState
+
+func (w *rw483) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw483) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw483) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw483) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw483) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw483) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw483) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw483) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw483) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw483) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 485/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler
+type rw484 rwState
+
+func (w *rw484) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw484) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw484) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw484) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw484) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw484) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw484) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw484) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw484) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 486/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, io.StringWriter
+type rw485 rwState
+
+func (w *rw485) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw485) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw485) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw485) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw485) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw485) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw485) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw485) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw485) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw485) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 487/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher
+type rw486 rwState
+
+func (w *rw486) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw486) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw486) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw486) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw486) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw486) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw486) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw486) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw486) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw486) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 488/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw487 rwState
+
+func (w *rw487) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw487) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw487) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw487) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw487) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw487) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw487) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw487) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw487) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw487) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw487) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 489/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner
+type rw488 rwState
+
+func (w *rw488) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw488) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw488) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw488) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw488) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw488) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw488) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw488) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw488) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw488) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 490/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, io.StringWriter
+type rw489 rwState
+
+func (w *rw489) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw489) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw489) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw489) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw489) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw489) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw489) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw489) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw489) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw489) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw489) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 491/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher
+type rw490 rwState
+
+func (w *rw490) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw490) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw490) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw490) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw490) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw490) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw490) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw490) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw490) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw490) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw490) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 492/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, http.Pusher, io.StringWriter
+type rw491 rwState
+
+func (w *rw491) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw491) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw491) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw491) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw491) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw491) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw491) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw491) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw491) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw491) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw491) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw491) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 493/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler
+type rw492 rwState
+
+func (w *rw492) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw492) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw492) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw492) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw492) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw492) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw492) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw492) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw492) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw492) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw492) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 494/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, io.StringWriter
+type rw493 rwState
+
+func (w *rw493) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw493) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw493) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw493) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw493) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw493) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw493) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw493) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw493) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw493) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw493) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw493) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 495/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher
+type rw494 rwState
+
+func (w *rw494) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw494) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw494) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw494) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw494) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw494) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw494) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw494) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw494) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw494) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw494) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw494) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 496/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw495 rwState
+
+func (w *rw495) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw495) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw495) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw495) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw495) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw495) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw495) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw495) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw495) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw495) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw495) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw495) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw495) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 497/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom
+type rw496 rwState
+
+func (w *rw496) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw496) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw496) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw496) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw496) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw496) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw496) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw496) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw496) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+
+// combination 498/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, io.StringWriter
+type rw497 rwState
+
+func (w *rw497) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw497) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw497) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw497) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw497) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw497) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw497) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw497) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw497) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw497) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 499/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher
+type rw498 rwState
+
+func (w *rw498) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw498) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw498) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw498) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw498) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw498) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw498) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw498) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw498) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw498) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 500/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, http.Pusher, io.StringWriter
+type rw499 rwState
+
+func (w *rw499) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw499) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw499) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw499) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw499) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw499) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw499) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw499) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw499) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw499) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw499) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 501/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler
+type rw500 rwState
+
+func (w *rw500) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw500) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw500) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw500) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw500) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw500) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw500) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw500) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw500) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw500) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 502/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, io.StringWriter
+type rw501 rwState
+
+func (w *rw501) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw501) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw501) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw501) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw501) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw501) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw501) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw501) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw501) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw501) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw501) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 503/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher
+type rw502 rwState
+
+func (w *rw502) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw502) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw502) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw502) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw502) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw502) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw502) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw502) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw502) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw502) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw502) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 504/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw503 rwState
+
+func (w *rw503) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw503) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw503) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw503) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw503) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw503) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw503) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw503) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw503) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw503) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw503) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw503) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 505/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner
+type rw504 rwState
+
+func (w *rw504) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw504) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw504) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw504) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw504) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw504) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw504) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw504) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw504) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw504) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw504) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+
+// combination 506/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, io.StringWriter
+type rw505 rwState
+
+func (w *rw505) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw505) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw505) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw505) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw505) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw505) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw505) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw505) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw505) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw505) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw505) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw505) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 507/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher
+type rw506 rwState
+
+func (w *rw506) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw506) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw506) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw506) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw506) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw506) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw506) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw506) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw506) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw506) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw506) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw506) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 508/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, http.Pusher, io.StringWriter
+type rw507 rwState
+
+func (w *rw507) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw507) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw507) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw507) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw507) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw507) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw507) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw507) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw507) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw507) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw507) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw507) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw507) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 509/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler
+type rw508 rwState
+
+func (w *rw508) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw508) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw508) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw508) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw508) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw508) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw508) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw508) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw508) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw508) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw508) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw508) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+
+// combination 510/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, io.StringWriter
+type rw509 rwState
+
+func (w *rw509) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw509) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw509) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw509) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw509) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw509) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw509) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw509) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw509) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw509) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw509) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw509) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw509) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+// combination 511/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher
+type rw510 rwState
+
+func (w *rw510) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw510) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw510) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw510) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw510) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw510) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw510) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw510) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw510) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw510) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw510) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw510) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw510) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+
+// combination 512/512: http.ResponseWriter, http.Flusher, httpFlushError, http.CloseNotifier, http.Hijacker, io.ReaderFrom, deadliner, fullDuplexEnabler, http.Pusher, io.StringWriter
+type rw511 rwState
+
+func (w *rw511) Unwrap() http.ResponseWriter { return w.w }
+func (w *rw511) Header() http.Header {
+ return (*rwState)(w).doHeader()
+}
+func (w *rw511) WriteHeader(code int) {
+ (*rwState)(w).doWriteHeader(code)
+}
+func (w *rw511) Write(b []byte) (int, error) {
+ return (*rwState)(w).doWrite(b)
+}
+func (w *rw511) Flush() {
+ (*rwState)(w).doFlush()
+}
+func (w *rw511) FlushError() error {
+ return (*rwState)(w).doFlushError()
+}
+func (w *rw511) CloseNotify() <-chan bool {
+ return (*rwState)(w).doCloseNotify()
+}
+func (w *rw511) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ return (*rwState)(w).doHijack()
+}
+func (w *rw511) ReadFrom(src io.Reader) (int64, error) {
+ return (*rwState)(w).doReadFrom(src)
+}
+func (w *rw511) SetReadDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetReadDeadline(deadline)
+}
+func (w *rw511) SetWriteDeadline(deadline time.Time) error {
+ return (*rwState)(w).doSetWriteDeadline(deadline)
+}
+func (w *rw511) EnableFullDuplex() error {
+ return (*rwState)(w).doEnableFullDuplex()
+}
+func (w *rw511) Push(target string, opts *http.PushOptions) error {
+ return (*rwState)(w).doPush(target, opts)
+}
+func (w *rw511) WriteString(s string) (int, error) {
+ return (*rwState)(w).doWriteString(s)
+}
+
+type Unwrapper interface {
+ Unwrap() http.ResponseWriter
+}
+
+// Unwrap returns the underlying http.ResponseWriter from within zero or more
+// layers of httpsnoop wrappers.
+func Unwrap(w http.ResponseWriter) http.ResponseWriter {
+ if rw, ok := w.(Unwrapper); ok {
+ // recurse until rw.Unwrap() returns a non-Unwrapper
+ return Unwrap(rw.Unwrap())
+ }
+ return w
+}
diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
deleted file mode 100644
index 101cedde6744..000000000000
--- a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
+++ /dev/null
@@ -1,436 +0,0 @@
-// +build go1.8
-// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
-
-package httpsnoop
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
-)
-
-// HeaderFunc is part of the http.ResponseWriter interface.
-type HeaderFunc func() http.Header
-
-// WriteHeaderFunc is part of the http.ResponseWriter interface.
-type WriteHeaderFunc func(code int)
-
-// WriteFunc is part of the http.ResponseWriter interface.
-type WriteFunc func(b []byte) (int, error)
-
-// FlushFunc is part of the http.Flusher interface.
-type FlushFunc func()
-
-// CloseNotifyFunc is part of the http.CloseNotifier interface.
-type CloseNotifyFunc func() <-chan bool
-
-// HijackFunc is part of the http.Hijacker interface.
-type HijackFunc func() (net.Conn, *bufio.ReadWriter, error)
-
-// ReadFromFunc is part of the io.ReaderFrom interface.
-type ReadFromFunc func(src io.Reader) (int64, error)
-
-// PushFunc is part of the http.Pusher interface.
-type PushFunc func(target string, opts *http.PushOptions) error
-
-// Hooks defines a set of method interceptors for methods included in
-// http.ResponseWriter as well as some others. You can think of them as
-// middleware for the function calls they target. See Wrap for more details.
-type Hooks struct {
- Header func(HeaderFunc) HeaderFunc
- WriteHeader func(WriteHeaderFunc) WriteHeaderFunc
- Write func(WriteFunc) WriteFunc
- Flush func(FlushFunc) FlushFunc
- CloseNotify func(CloseNotifyFunc) CloseNotifyFunc
- Hijack func(HijackFunc) HijackFunc
- ReadFrom func(ReadFromFunc) ReadFromFunc
- Push func(PushFunc) PushFunc
-}
-
-// Wrap returns a wrapped version of w that provides the exact same interface
-// as w. Specifically if w implements any combination of:
-//
-// - http.Flusher
-// - http.CloseNotifier
-// - http.Hijacker
-// - io.ReaderFrom
-// - http.Pusher
-//
-// The wrapped version will implement the exact same combination. If no hooks
-// are set, the wrapped version also behaves exactly as w. Hooks targeting
-// methods not supported by w are ignored. Any other hooks will intercept the
-// method they target and may modify the call's arguments and/or return values.
-// The CaptureMetrics implementation serves as a working example for how the
-// hooks can be used.
-func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {
- rw := &rw{w: w, h: hooks}
- _, i0 := w.(http.Flusher)
- _, i1 := w.(http.CloseNotifier)
- _, i2 := w.(http.Hijacker)
- _, i3 := w.(io.ReaderFrom)
- _, i4 := w.(http.Pusher)
- switch {
- // combination 1/32
- case !i0 && !i1 && !i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- }{rw, rw}
- // combination 2/32
- case !i0 && !i1 && !i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Pusher
- }{rw, rw, rw}
- // combination 3/32
- case !i0 && !i1 && !i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- io.ReaderFrom
- }{rw, rw, rw}
- // combination 4/32
- case !i0 && !i1 && !i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw}
- // combination 5/32
- case !i0 && !i1 && i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- }{rw, rw, rw}
- // combination 6/32
- case !i0 && !i1 && i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- http.Pusher
- }{rw, rw, rw, rw}
- // combination 7/32
- case !i0 && !i1 && i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 8/32
- case !i0 && !i1 && i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 9/32
- case !i0 && i1 && !i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- }{rw, rw, rw}
- // combination 10/32
- case !i0 && i1 && !i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Pusher
- }{rw, rw, rw, rw}
- // combination 11/32
- case !i0 && i1 && !i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 12/32
- case !i0 && i1 && !i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 13/32
- case !i0 && i1 && i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- }{rw, rw, rw, rw}
- // combination 14/32
- case !i0 && i1 && i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 15/32
- case !i0 && i1 && i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 16/32
- case !i0 && i1 && i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw, rw}
- // combination 17/32
- case i0 && !i1 && !i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- }{rw, rw, rw}
- // combination 18/32
- case i0 && !i1 && !i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Pusher
- }{rw, rw, rw, rw}
- // combination 19/32
- case i0 && !i1 && !i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 20/32
- case i0 && !i1 && !i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 21/32
- case i0 && !i1 && i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- }{rw, rw, rw, rw}
- // combination 22/32
- case i0 && !i1 && i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 23/32
- case i0 && !i1 && i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 24/32
- case i0 && !i1 && i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw, rw}
- // combination 25/32
- case i0 && i1 && !i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- }{rw, rw, rw, rw}
- // combination 26/32
- case i0 && i1 && !i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Pusher
- }{rw, rw, rw, rw, rw}
- // combination 27/32
- case i0 && i1 && !i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 28/32
- case i0 && i1 && !i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw, rw}
- // combination 29/32
- case i0 && i1 && i2 && !i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- }{rw, rw, rw, rw, rw}
- // combination 30/32
- case i0 && i1 && i2 && !i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- http.Pusher
- }{rw, rw, rw, rw, rw, rw}
- // combination 31/32
- case i0 && i1 && i2 && i3 && !i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw, rw}
- // combination 32/32
- case i0 && i1 && i2 && i3 && i4:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- http.Pusher
- }{rw, rw, rw, rw, rw, rw, rw}
- }
- panic("unreachable")
-}
-
-type rw struct {
- w http.ResponseWriter
- h Hooks
-}
-
-func (w *rw) Unwrap() http.ResponseWriter {
- return w.w
-}
-
-func (w *rw) Header() http.Header {
- f := w.w.(http.ResponseWriter).Header
- if w.h.Header != nil {
- f = w.h.Header(f)
- }
- return f()
-}
-
-func (w *rw) WriteHeader(code int) {
- f := w.w.(http.ResponseWriter).WriteHeader
- if w.h.WriteHeader != nil {
- f = w.h.WriteHeader(f)
- }
- f(code)
-}
-
-func (w *rw) Write(b []byte) (int, error) {
- f := w.w.(http.ResponseWriter).Write
- if w.h.Write != nil {
- f = w.h.Write(f)
- }
- return f(b)
-}
-
-func (w *rw) Flush() {
- f := w.w.(http.Flusher).Flush
- if w.h.Flush != nil {
- f = w.h.Flush(f)
- }
- f()
-}
-
-func (w *rw) CloseNotify() <-chan bool {
- f := w.w.(http.CloseNotifier).CloseNotify
- if w.h.CloseNotify != nil {
- f = w.h.CloseNotify(f)
- }
- return f()
-}
-
-func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- f := w.w.(http.Hijacker).Hijack
- if w.h.Hijack != nil {
- f = w.h.Hijack(f)
- }
- return f()
-}
-
-func (w *rw) ReadFrom(src io.Reader) (int64, error) {
- f := w.w.(io.ReaderFrom).ReadFrom
- if w.h.ReadFrom != nil {
- f = w.h.ReadFrom(f)
- }
- return f(src)
-}
-
-func (w *rw) Push(target string, opts *http.PushOptions) error {
- f := w.w.(http.Pusher).Push
- if w.h.Push != nil {
- f = w.h.Push(f)
- }
- return f(target, opts)
-}
-
-type Unwrapper interface {
- Unwrap() http.ResponseWriter
-}
-
-// Unwrap returns the underlying http.ResponseWriter from within zero or more
-// layers of httpsnoop wrappers.
-func Unwrap(w http.ResponseWriter) http.ResponseWriter {
- if rw, ok := w.(Unwrapper); ok {
- // recurse until rw.Unwrap() returns a non-Unwrapper
- return Unwrap(rw.Unwrap())
- } else {
- return w
- }
-}
diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
deleted file mode 100644
index e0951df15278..000000000000
--- a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// +build !go1.8
-// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
-
-package httpsnoop
-
-import (
- "bufio"
- "io"
- "net"
- "net/http"
-)
-
-// HeaderFunc is part of the http.ResponseWriter interface.
-type HeaderFunc func() http.Header
-
-// WriteHeaderFunc is part of the http.ResponseWriter interface.
-type WriteHeaderFunc func(code int)
-
-// WriteFunc is part of the http.ResponseWriter interface.
-type WriteFunc func(b []byte) (int, error)
-
-// FlushFunc is part of the http.Flusher interface.
-type FlushFunc func()
-
-// CloseNotifyFunc is part of the http.CloseNotifier interface.
-type CloseNotifyFunc func() <-chan bool
-
-// HijackFunc is part of the http.Hijacker interface.
-type HijackFunc func() (net.Conn, *bufio.ReadWriter, error)
-
-// ReadFromFunc is part of the io.ReaderFrom interface.
-type ReadFromFunc func(src io.Reader) (int64, error)
-
-// Hooks defines a set of method interceptors for methods included in
-// http.ResponseWriter as well as some others. You can think of them as
-// middleware for the function calls they target. See Wrap for more details.
-type Hooks struct {
- Header func(HeaderFunc) HeaderFunc
- WriteHeader func(WriteHeaderFunc) WriteHeaderFunc
- Write func(WriteFunc) WriteFunc
- Flush func(FlushFunc) FlushFunc
- CloseNotify func(CloseNotifyFunc) CloseNotifyFunc
- Hijack func(HijackFunc) HijackFunc
- ReadFrom func(ReadFromFunc) ReadFromFunc
-}
-
-// Wrap returns a wrapped version of w that provides the exact same interface
-// as w. Specifically if w implements any combination of:
-//
-// - http.Flusher
-// - http.CloseNotifier
-// - http.Hijacker
-// - io.ReaderFrom
-//
-// The wrapped version will implement the exact same combination. If no hooks
-// are set, the wrapped version also behaves exactly as w. Hooks targeting
-// methods not supported by w are ignored. Any other hooks will intercept the
-// method they target and may modify the call's arguments and/or return values.
-// The CaptureMetrics implementation serves as a working example for how the
-// hooks can be used.
-func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {
- rw := &rw{w: w, h: hooks}
- _, i0 := w.(http.Flusher)
- _, i1 := w.(http.CloseNotifier)
- _, i2 := w.(http.Hijacker)
- _, i3 := w.(io.ReaderFrom)
- switch {
- // combination 1/16
- case !i0 && !i1 && !i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- }{rw, rw}
- // combination 2/16
- case !i0 && !i1 && !i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- io.ReaderFrom
- }{rw, rw, rw}
- // combination 3/16
- case !i0 && !i1 && i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- }{rw, rw, rw}
- // combination 4/16
- case !i0 && !i1 && i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 5/16
- case !i0 && i1 && !i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- }{rw, rw, rw}
- // combination 6/16
- case !i0 && i1 && !i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 7/16
- case !i0 && i1 && i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- }{rw, rw, rw, rw}
- // combination 8/16
- case !i0 && i1 && i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 9/16
- case i0 && !i1 && !i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- }{rw, rw, rw}
- // combination 10/16
- case i0 && !i1 && !i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- io.ReaderFrom
- }{rw, rw, rw, rw}
- // combination 11/16
- case i0 && !i1 && i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- }{rw, rw, rw, rw}
- // combination 12/16
- case i0 && !i1 && i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 13/16
- case i0 && i1 && !i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- }{rw, rw, rw, rw}
- // combination 14/16
- case i0 && i1 && !i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- io.ReaderFrom
- }{rw, rw, rw, rw, rw}
- // combination 15/16
- case i0 && i1 && i2 && !i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- }{rw, rw, rw, rw, rw}
- // combination 16/16
- case i0 && i1 && i2 && i3:
- return struct {
- Unwrapper
- http.ResponseWriter
- http.Flusher
- http.CloseNotifier
- http.Hijacker
- io.ReaderFrom
- }{rw, rw, rw, rw, rw, rw}
- }
- panic("unreachable")
-}
-
-type rw struct {
- w http.ResponseWriter
- h Hooks
-}
-
-func (w *rw) Unwrap() http.ResponseWriter {
- return w.w
-}
-
-func (w *rw) Header() http.Header {
- f := w.w.(http.ResponseWriter).Header
- if w.h.Header != nil {
- f = w.h.Header(f)
- }
- return f()
-}
-
-func (w *rw) WriteHeader(code int) {
- f := w.w.(http.ResponseWriter).WriteHeader
- if w.h.WriteHeader != nil {
- f = w.h.WriteHeader(f)
- }
- f(code)
-}
-
-func (w *rw) Write(b []byte) (int, error) {
- f := w.w.(http.ResponseWriter).Write
- if w.h.Write != nil {
- f = w.h.Write(f)
- }
- return f(b)
-}
-
-func (w *rw) Flush() {
- f := w.w.(http.Flusher).Flush
- if w.h.Flush != nil {
- f = w.h.Flush(f)
- }
- f()
-}
-
-func (w *rw) CloseNotify() <-chan bool {
- f := w.w.(http.CloseNotifier).CloseNotify
- if w.h.CloseNotify != nil {
- f = w.h.CloseNotify(f)
- }
- return f()
-}
-
-func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {
- f := w.w.(http.Hijacker).Hijack
- if w.h.Hijack != nil {
- f = w.h.Hijack(f)
- }
- return f()
-}
-
-func (w *rw) ReadFrom(src io.Reader) (int64, error) {
- f := w.w.(io.ReaderFrom).ReadFrom
- if w.h.ReadFrom != nil {
- f = w.h.ReadFrom(f)
- }
- return f(src)
-}
-
-type Unwrapper interface {
- Unwrap() http.ResponseWriter
-}
-
-// Unwrap returns the underlying http.ResponseWriter from within zero or more
-// layers of httpsnoop wrappers.
-func Unwrap(w http.ResponseWriter) http.ResponseWriter {
- if rw, ok := w.(Unwrapper); ok {
- // recurse until rw.Unwrap() returns a non-Unwrapper
- return Unwrap(rw.Unwrap())
- } else {
- return w
- }
-}
diff --git a/vendor/github.com/go-logr/logr/context_noslog.go b/vendor/github.com/go-logr/logr/context_noslog.go
index f012f9a18e8b..0a3d1a125e02 100644
--- a/vendor/github.com/go-logr/logr/context_noslog.go
+++ b/vendor/github.com/go-logr/logr/context_noslog.go
@@ -1,5 +1,4 @@
//go:build !go1.21
-// +build !go1.21
/*
Copyright 2019 The logr Authors.
diff --git a/vendor/github.com/go-logr/logr/context_slog.go b/vendor/github.com/go-logr/logr/context_slog.go
index 065ef0b82803..c69eb01ba1b7 100644
--- a/vendor/github.com/go-logr/logr/context_slog.go
+++ b/vendor/github.com/go-logr/logr/context_slog.go
@@ -1,5 +1,4 @@
//go:build go1.21
-// +build go1.21
/*
Copyright 2019 The logr Authors.
diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go
index b22c57d7137b..7f4996e9e48a 100644
--- a/vendor/github.com/go-logr/logr/funcr/funcr.go
+++ b/vendor/github.com/go-logr/logr/funcr/funcr.go
@@ -426,7 +426,7 @@ func (f Formatter) colon() byte {
}
func (f Formatter) pretty(value any) string {
- return f.prettyWithFlags(value, 0, 0)
+ return f.prettyWithFlags(value, 0, 0, 0, nil)
}
const (
@@ -434,7 +434,13 @@ const (
)
// TODO: This is not fast. Most of the overhead goes here.
-func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
+// value: The value to render
+// flags: Bitmask of flags (see above)
+// depth: The current depth of nested structs, slices, arrays, and maps
+// ptrDepth: The current depth of including pointer dereferences
+// ptrMap: A map of pointers already seen, to avoid infinite recursion (usually
+// nil unless ptrDepth is large)
+func (f Formatter) prettyWithFlags(value any, flags uint32, depth int, ptrDepth int, ptrMap map[uintptr]bool) string {
if depth > f.opts.MaxLogDepth {
return `""`
}
@@ -504,7 +510,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
// arbitrary keys might need escaping
buf.WriteString(prettyString(k))
buf.WriteByte(f.colon())
- buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1))
+ buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1, ptrDepth+1, ptrMap))
}
if flags&flagRawStruct == 0 {
buf.WriteByte('}')
@@ -576,7 +582,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
}
printComma = true // if we got here, we are rendering a field
if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" {
- buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1))
+ buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1, ptrDepth+1, ptrMap))
continue
}
if name == "" {
@@ -585,7 +591,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
// field names can't contain characters which need escaping
buf.WriteString(f.quoted(name, false))
buf.WriteByte(f.colon())
- buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1))
+ buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1, ptrDepth+1, ptrMap))
}
if flags&flagRawStruct == 0 {
buf.WriteByte('}')
@@ -612,7 +618,7 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
buf.WriteByte(f.comma())
}
e := v.Index(i)
- buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1))
+ buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1, ptrDepth+1, ptrMap))
}
buf.WriteByte(']')
return buf.String()
@@ -637,7 +643,8 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
keystr = prettyString(keystr)
} else {
// prettyWithFlags will produce already-escaped values
- keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1)
+ // key depth is unrelated to overall depth
+ keystr = f.prettyWithFlags(it.Key().Interface(), 0, 0, ptrDepth, ptrMap)
if t.Key().Kind() != reflect.String {
// JSON only does string keys. Unlike Go's standard JSON, we'll
// convert just about anything to a string.
@@ -646,16 +653,34 @@ func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
}
buf.WriteString(keystr)
buf.WriteByte(f.colon())
- buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1))
+ buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1, ptrDepth+1, ptrMap))
i++
}
buf.WriteByte('}')
return buf.String()
- case reflect.Ptr, reflect.Interface:
+ case reflect.Pointer, reflect.Interface:
if v.IsNil() {
return "null"
}
- return f.prettyWithFlags(v.Elem().Interface(), 0, depth)
+ // Special case: recursive pointers. For normal use we do not want to
+ // count pointer dereferences as depth, but if we see the same pointer
+ // again we have a recursion and need to stop. After a large number of
+ // pointer dereferences we will start tracking pointers to avoid the
+ // perf hit of doing it in the normal path.
+ //
+ // This should not happen accidentally (e.g. json decoding should never
+ // do this) but we can handle it gracefully.
+ if ptrMap != nil && ptrMap[uintptr(v.Pointer())] {
+ depth = f.opts.MaxLogDepth + 1 // force a depth error
+ }
+ const maxDepthFactor = 4 // arbitrary, but we want it large enough to not false-alert
+ if ptrDepth > f.opts.MaxLogDepth*maxDepthFactor && ptrMap == nil {
+ ptrMap = map[uintptr]bool{}
+ }
+ if ptrMap != nil {
+ ptrMap[(uintptr)(v.Pointer())] = true
+ }
+ return f.prettyWithFlags(v.Elem().Interface(), 0, depth, ptrDepth+1, ptrMap)
}
return fmt.Sprintf(`""`, t.Kind().String())
}
@@ -697,7 +722,7 @@ func isEmpty(v reflect.Value) bool {
return v.Float() == 0
case reflect.Complex64, reflect.Complex128:
return v.Complex() == 0
- case reflect.Interface, reflect.Ptr:
+ case reflect.Interface, reflect.Pointer:
return v.IsNil()
}
return false
diff --git a/vendor/github.com/go-logr/logr/funcr/slogsink.go b/vendor/github.com/go-logr/logr/funcr/slogsink.go
index 7bd84761e2d0..8b519c91e133 100644
--- a/vendor/github.com/go-logr/logr/funcr/slogsink.go
+++ b/vendor/github.com/go-logr/logr/funcr/slogsink.go
@@ -1,5 +1,4 @@
//go:build go1.21
-// +build go1.21
/*
Copyright 2023 The logr Authors.
@@ -33,7 +32,7 @@ const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink
func (l fnlogger) Handle(_ context.Context, record slog.Record) error {
kvList := make([]any, 0, 2*record.NumAttrs())
record.Attrs(func(attr slog.Attr) bool {
- kvList = attrToKVs(attr, kvList)
+ kvList = attrToKVs(attr, kvList, l.opts.MaxLogDepth)
return true
})
@@ -49,7 +48,7 @@ func (l fnlogger) Handle(_ context.Context, record slog.Record) error {
func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink {
kvList := make([]any, 0, 2*len(attrs))
for _, attr := range attrs {
- kvList = attrToKVs(attr, kvList)
+ kvList = attrToKVs(attr, kvList, l.opts.MaxLogDepth)
}
l.AddValues(kvList)
return &l
@@ -61,14 +60,25 @@ func (l fnlogger) WithGroup(name string) logr.SlogSink {
}
// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups
-// and other details of slog.
-func attrToKVs(attr slog.Attr, kvList []any) []any {
+// and other details of slog. maxDepth bounds recursion into nested groups so a
+// deeply-nested slog.Group cannot exhaust the stack; it is decremented per group
+// level and starts at the Formatter's MaxLogDepth (past which the formatter would
+// truncate the rendering anyway).
+func attrToKVs(attr slog.Attr, kvList []any, maxDepth int) []any {
attrVal := attr.Value.Resolve()
if attrVal.Kind() == slog.KindGroup {
+ if maxDepth <= 0 {
+ // Nesting is too deep to build without risking a stack overflow.
+ // Stop here; the formatter truncates below MaxLogDepth regardless.
+ if attr.Key != "" {
+ kvList = append(kvList, attr.Key, "")
+ }
+ return kvList
+ }
groupVal := attrVal.Group()
grpKVs := make([]any, 0, 2*len(groupVal))
for _, attr := range groupVal {
- grpKVs = attrToKVs(attr, grpKVs)
+ grpKVs = attrToKVs(attr, grpKVs, maxDepth-1)
}
if attr.Key == "" {
// slog says we have to inline these
diff --git a/vendor/github.com/go-logr/logr/sloghandler.go b/vendor/github.com/go-logr/logr/sloghandler.go
index 82d1ba494819..befaf5510fa9 100644
--- a/vendor/github.com/go-logr/logr/sloghandler.go
+++ b/vendor/github.com/go-logr/logr/sloghandler.go
@@ -1,5 +1,4 @@
//go:build go1.21
-// +build go1.21
/*
Copyright 2023 The logr Authors.
diff --git a/vendor/github.com/go-logr/logr/slogr.go b/vendor/github.com/go-logr/logr/slogr.go
index 28a83d02439e..bfe80eb8d68e 100644
--- a/vendor/github.com/go-logr/logr/slogr.go
+++ b/vendor/github.com/go-logr/logr/slogr.go
@@ -1,5 +1,4 @@
//go:build go1.21
-// +build go1.21
/*
Copyright 2023 The logr Authors.
diff --git a/vendor/github.com/go-logr/logr/slogsink.go b/vendor/github.com/go-logr/logr/slogsink.go
index 4060fcbc2b0b..ab76ea99fe6a 100644
--- a/vendor/github.com/go-logr/logr/slogsink.go
+++ b/vendor/github.com/go-logr/logr/slogsink.go
@@ -1,5 +1,4 @@
//go:build go1.21
-// +build go1.21
/*
Copyright 2023 The logr Authors.
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go
index 2d6ef64be15b..7035d656d991 100644
--- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go
@@ -1,222 +1,49 @@
//go:build amd64 && !appengine && !noasm && gc
-// This file contains the specialisation of Decoder.Decompress4X
-// and Decoder.Decompress1X that use an asm implementation of thir main loops.
+// amd64 stubs and dispatch for the asm loops used by decompress_asm.go.
package huff0
import (
- "errors"
- "fmt"
-
"github.com/klauspost/compress/internal/cpuinfo"
)
-// decompress4x_main_loop_x86 is an x86 assembler implementation
+// decompress4x_main_loop_amd64 is an x86 assembler implementation
// of Decompress4X when tablelog > 8.
//
//go:noescape
func decompress4x_main_loop_amd64(ctx *decompress4xContext)
-// decompress4x_8b_loop_x86 is an x86 assembler implementation
+// decompress4x_8b_main_loop_amd64 is an x86 assembler implementation
// of Decompress4X when tablelog <= 8 which decodes 4 entries
// per loop.
//
//go:noescape
func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)
-// fallback8BitSize is the size where using Go version is faster.
-const fallback8BitSize = 800
-
-type decompress4xContext struct {
- pbr *[4]bitReaderShifted
- peekBits uint8
- out *byte
- dstEvery int
- tbl *dEntrySingle
- decoded int
- limit *byte
-}
-
-// Decompress4X will decompress a 4X encoded stream.
-// The length of the supplied input must match the end of a block exactly.
-// The *capacity* of the dst slice must match the destination size of
-// the uncompressed data exactly.
-func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
- if len(d.dt.single) == 0 {
- return nil, errors.New("no table loaded")
- }
- if len(src) < 6+(4*1) {
- return nil, errors.New("input too small")
- }
-
- use8BitTables := d.actualTableLog <= 8
- if cap(dst) < fallback8BitSize && use8BitTables {
- return d.decompress4X8bit(dst, src)
- }
-
- var br [4]bitReaderShifted
- // Decode "jump table"
- start := 6
- for i := range 3 {
- length := int(src[i*2]) | (int(src[i*2+1]) << 8)
- if start+length >= len(src) {
- return nil, errors.New("truncated input (or invalid offset)")
- }
- err := br[i].init(src[start : start+length])
- if err != nil {
- return nil, err
- }
- start += length
- }
- err := br[3].init(src[start:])
- if err != nil {
- return nil, err
- }
-
- // destination, offset to match first output
- dstSize := cap(dst)
- dst = dst[:dstSize]
- out := dst
- dstEvery := (dstSize + 3) / 4
-
- const tlSize = 1 << tableLogMax
- const tlMask = tlSize - 1
- single := d.dt.single[:tlSize]
-
- var decoded int
-
- if len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) {
- ctx := decompress4xContext{
- pbr: &br,
- peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()
- out: &out[0],
- dstEvery: dstEvery,
- tbl: &single[0],
- limit: &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last.
- }
- if use8BitTables {
- decompress4x_8b_main_loop_amd64(&ctx)
- } else {
- decompress4x_main_loop_amd64(&ctx)
- }
-
- decoded = ctx.decoded
- out = out[decoded/4:]
- }
-
- // Decode remaining.
- remainBytes := dstEvery - (decoded / 4)
- for i := range br {
- offset := dstEvery * i
- endsAt := min(offset+remainBytes, len(out))
- br := &br[i]
- bitsLeft := br.remaining()
- for bitsLeft > 0 {
- br.fill()
- if offset >= endsAt {
- return nil, errors.New("corruption detected: stream overrun 4")
- }
-
- // Read value and increment offset.
- val := br.peekBitsFast(d.actualTableLog)
- v := single[val&tlMask].entry
- nBits := uint8(v)
- br.advance(nBits)
- bitsLeft -= uint(nBits)
- out[offset] = uint8(v >> 8)
- offset++
- }
- if offset != endsAt {
- return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt)
- }
- decoded += offset - dstEvery*i
- err = br.close()
- if err != nil {
- return nil, err
- }
- }
- if dstSize != decoded {
- return nil, errors.New("corruption detected: short output block")
- }
- return dst, nil
-}
-
-// decompress4x_main_loop_x86 is an x86 assembler implementation
+// decompress1x_main_loop_amd64 is an x86 assembler implementation
// of Decompress1X when tablelog > 8.
//
//go:noescape
func decompress1x_main_loop_amd64(ctx *decompress1xContext)
-// decompress4x_main_loop_x86 is an x86 with BMI2 assembler implementation
+// decompress1x_main_loop_bmi2 is an x86 with BMI2 assembler implementation
// of Decompress1X when tablelog > 8.
//
//go:noescape
func decompress1x_main_loop_bmi2(ctx *decompress1xContext)
-type decompress1xContext struct {
- pbr *bitReaderShifted
- peekBits uint8
- out *byte
- outCap int
- tbl *dEntrySingle
- decoded int
+func decompress4x_main_loop_asm(ctx *decompress4xContext) {
+ decompress4x_main_loop_amd64(ctx)
}
-// Error reported by asm implementations
-const error_max_decoded_size_exeeded = -1
-
-// Decompress1X will decompress a 1X encoded stream.
-// The cap of the output buffer will be the maximum decompressed size.
-// The length of the supplied input must match the end of a block exactly.
-func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {
- if len(d.dt.single) == 0 {
- return nil, errors.New("no table loaded")
- }
- var br bitReaderShifted
- err := br.init(src)
- if err != nil {
- return dst, err
- }
- maxDecodedSize := cap(dst)
- dst = dst[:maxDecodedSize]
-
- const tlSize = 1 << tableLogMax
- const tlMask = tlSize - 1
-
- if maxDecodedSize >= 4 {
- ctx := decompress1xContext{
- pbr: &br,
- out: &dst[0],
- outCap: maxDecodedSize,
- peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()
- tbl: &d.dt.single[0],
- }
-
- if cpuinfo.HasBMI2() {
- decompress1x_main_loop_bmi2(&ctx)
- } else {
- decompress1x_main_loop_amd64(&ctx)
- }
- if ctx.decoded == error_max_decoded_size_exeeded {
- return nil, ErrMaxDecodedSizeExceeded
- }
-
- dst = dst[:ctx.decoded]
- }
+func decompress4x_8b_main_loop_asm(ctx *decompress4xContext) {
+ decompress4x_8b_main_loop_amd64(ctx)
+}
- // br < 8, so uint8 is fine
- bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead
- for bitsLeft > 0 {
- br.fill()
- if len(dst) >= maxDecodedSize {
- br.close()
- return nil, ErrMaxDecodedSizeExceeded
- }
- v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask]
- nBits := uint8(v.entry)
- br.advance(nBits)
- bitsLeft -= nBits
- dst = append(dst, uint8(v.entry>>8))
+func decompress1x_main_loop_asm(ctx *decompress1xContext) {
+ if cpuinfo.HasBMI2() {
+ decompress1x_main_loop_bmi2(ctx)
+ } else {
+ decompress1x_main_loop_amd64(ctx)
}
- return dst, br.close()
}
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s
index c4c7ab2d1fe3..c5d4a710a093 100644
--- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s
@@ -1,6 +1,6 @@
-// Code generated by command: go run gen.go -out ../decompress_amd64.s -pkg=huff0. DO NOT EDIT.
+// Code generated by command: go run gen.go -out ../decompress.s -arch amd64,arm64 -pkg=huff0. DO NOT EDIT.
-//go:build amd64 && !appengine && !noasm && gc
+//go:build !appengine && !noasm && gc
// func decompress4x_main_loop_amd64(ctx *decompress4xContext)
TEXT ·decompress4x_main_loop_amd64(SB), $0-8
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go
new file mode 100644
index 000000000000..8ba3c810e60a
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go
@@ -0,0 +1,37 @@
+//go:build arm64 && !appengine && !noasm && gc
+
+// arm64 stubs and dispatch for the asm loops used by decompress_asm.go.
+// The asm (decompress_arm64.s) is generated by the avo arm64 lowering
+// printer from the same source as the amd64 asm; see _generate/gen.go.
+package huff0
+
+// decompress4x_main_loop_arm64 is an arm64 assembler implementation
+// of Decompress4X when tablelog > 8.
+//
+//go:noescape
+func decompress4x_main_loop_arm64(ctx *decompress4xContext)
+
+// decompress4x_8b_main_loop_arm64 is an arm64 assembler implementation
+// of Decompress4X when tablelog <= 8 which decodes 4 entries
+// per loop.
+//
+//go:noescape
+func decompress4x_8b_main_loop_arm64(ctx *decompress4xContext)
+
+// decompress1x_main_loop_arm64 is an arm64 assembler implementation
+// of Decompress1X when tablelog > 8.
+//
+//go:noescape
+func decompress1x_main_loop_arm64(ctx *decompress1xContext)
+
+func decompress4x_main_loop_asm(ctx *decompress4xContext) {
+ decompress4x_main_loop_arm64(ctx)
+}
+
+func decompress4x_8b_main_loop_asm(ctx *decompress4xContext) {
+ decompress4x_8b_main_loop_arm64(ctx)
+}
+
+func decompress1x_main_loop_asm(ctx *decompress1xContext) {
+ decompress1x_main_loop_arm64(ctx)
+}
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s
new file mode 100644
index 000000000000..e16012721a1c
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s
@@ -0,0 +1,851 @@
+// Code generated by command: go run gen.go -out ../decompress.s -arch amd64,arm64 -pkg=huff0. DO NOT EDIT.
+// EXPERIMENTAL arm64 output lowered from an amd64 avo program.
+
+//go:build arm64 && !appengine && !noasm && gc
+
+// func decompress4x_main_loop_amd64(ctx *decompress4xContext)
+TEXT ·decompress4x_main_loop_arm64(SB), $0-8
+ // Preload values
+ MOVD ctx+0(FP), R0
+ MOVBU 8(R0), R6
+ MOVD 16(R0), R3
+ MOVD 48(R0), R5
+ MOVD 24(R0), R7
+ MOVD 32(R0), R8
+ MOVD (R0), R9
+
+ // Main loop
+main_loop:
+ MOVD $0, R2
+ CMP R5, R3
+ CSET GE, R16
+ BFI $0, R16, $8, R2
+
+ // br0.fillFast32()
+ MOVD 32(R9), R10
+ MOVBU 40(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill0
+ MOVD 24(R9), R0
+ SUB $0x20, R11, R11
+ SUB $0x04, R0, R0
+ MOVD (R9), R12
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R12, R0, R15
+ MOVWU (R15), R12
+ MOVD R11, R1
+ LSL R1, R12, R12
+ MOVD R0, 24(R9)
+ ORR R12, R10, R10
+
+ // exhausted += (br0.off < 4)
+ CMP $0x04, R0
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill0:
+ // val0 := br0.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br0.peekTopBits(peekBits)
+ MOVD R6, R1
+ MOVD R10, R12
+ LSR R1, R12, R12
+
+ // v1 := table[val1&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v1.entry))
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // these two writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ MOVH R0, (R3)
+
+ // update the bitreader structure
+ MOVD R10, 32(R9)
+ MOVB R11, 40(R9)
+
+ // br1.fillFast32()
+ MOVD 80(R9), R10
+ MOVBU 88(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill1
+ MOVD 72(R9), R0
+ SUB $0x20, R11, R11
+ SUB $0x04, R0, R0
+ MOVD 48(R9), R12
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R12, R0, R15
+ MOVWU (R15), R12
+ MOVD R11, R1
+ LSL R1, R12, R12
+ MOVD R0, 72(R9)
+ ORR R12, R10, R10
+
+ // exhausted += (br1.off < 4)
+ CMP $0x04, R0
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill1:
+ // val0 := br1.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br1.peekTopBits(peekBits)
+ MOVD R6, R1
+ MOVD R10, R12
+ LSR R1, R12, R12
+
+ // v1 := table[val1&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v1.entry))
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // these two writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ ADD R7, R3, R15
+ MOVH R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 80(R9)
+ MOVB R11, 88(R9)
+
+ // br2.fillFast32()
+ MOVD 128(R9), R10
+ MOVBU 136(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill2
+ MOVD 120(R9), R0
+ SUB $0x20, R11, R11
+ SUB $0x04, R0, R0
+ MOVD 96(R9), R12
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R12, R0, R15
+ MOVWU (R15), R12
+ MOVD R11, R1
+ LSL R1, R12, R12
+ MOVD R0, 120(R9)
+ ORR R12, R10, R10
+
+ // exhausted += (br2.off < 4)
+ CMP $0x04, R0
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill2:
+ // val0 := br2.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br2.peekTopBits(peekBits)
+ MOVD R6, R1
+ MOVD R10, R12
+ LSR R1, R12, R12
+
+ // v1 := table[val1&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v1.entry))
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // these two writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ ADD R7<<1, R3, R15
+ MOVH R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 128(R9)
+ MOVB R11, 136(R9)
+
+ // br3.fillFast32()
+ MOVD 176(R9), R10
+ MOVBU 184(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill3
+ MOVD 168(R9), R0
+ SUB $0x20, R11, R11
+ SUB $0x04, R0, R0
+ MOVD 144(R9), R12
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R12, R0, R15
+ MOVWU (R15), R12
+ MOVD R11, R1
+ LSL R1, R12, R12
+ MOVD R0, 168(R9)
+ ORR R12, R10, R10
+
+ // exhausted += (br3.off < 4)
+ CMP $0x04, R0
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill3:
+ // val0 := br3.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br3.peekTopBits(peekBits)
+ MOVD R6, R1
+ MOVD R10, R12
+ LSR R1, R12, R12
+
+ // v1 := table[val1&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v1.entry))
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // these two writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ ADD R7<<1, R7, R1
+ ADD R1, R3, R15
+ MOVH R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 176(R9)
+ MOVB R11, 184(R9)
+ ADD $0x02, R3, R3
+ AND $0xff, R2, R15
+ AND $0xff, R2, R16
+ TST R16, R15
+ BEQ main_loop
+ MOVD ctx+0(FP), R0
+ MOVD 16(R0), R16
+ SUB R16, R3, R3
+ LSL $0x02, R3, R3
+ MOVD R3, 40(R0)
+ RET
+
+// func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)
+TEXT ·decompress4x_8b_main_loop_arm64(SB), $0-8
+ // Preload values
+ MOVD ctx+0(FP), R1
+ MOVBU 8(R1), R6
+ MOVD 16(R1), R3
+ MOVD 48(R1), R5
+ MOVD 24(R1), R7
+ MOVD 32(R1), R8
+ MOVD (R1), R9
+
+ // Main loop
+main_loop:
+ MOVD $0, R2
+ CMP R5, R3
+ CSET GE, R16
+ BFI $0, R16, $8, R2
+
+ // br0.fillFast32()
+ MOVD 32(R9), R10
+ MOVBU 40(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill0
+ MOVD 24(R9), R12
+ SUB $0x20, R11, R11
+ SUB $0x04, R12, R12
+ MOVD (R9), R13
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R13, R12, R15
+ MOVWU (R15), R13
+ MOVD R11, R1
+ LSL R1, R13, R13
+ MOVD R12, 24(R9)
+ ORR R13, R10, R10
+
+ // exhausted += (br0.off < 4)
+ CMP $0x04, R12
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill0:
+ // val0 := br0.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br0.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v1 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v1.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // val2 := br0.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v2 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v2.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val3 := br0.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v3 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br0.advance(uint8(v3.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // these four writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ // out[id * dstEvery + 3] = uint8(v2.entry >> 8)
+ // out[id * dstEvery + 4] = uint8(v3.entry >> 8)
+ MOVW R0, (R3)
+
+ // update the bitreader structure
+ MOVD R10, 32(R9)
+ MOVB R11, 40(R9)
+
+ // br1.fillFast32()
+ MOVD 80(R9), R10
+ MOVBU 88(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill1
+ MOVD 72(R9), R12
+ SUB $0x20, R11, R11
+ SUB $0x04, R12, R12
+ MOVD 48(R9), R13
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R13, R12, R15
+ MOVWU (R15), R13
+ MOVD R11, R1
+ LSL R1, R13, R13
+ MOVD R12, 72(R9)
+ ORR R13, R10, R10
+
+ // exhausted += (br1.off < 4)
+ CMP $0x04, R12
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill1:
+ // val0 := br1.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br1.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v1 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v1.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // val2 := br1.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v2 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v2.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val3 := br1.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v3 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br1.advance(uint8(v3.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // these four writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ // out[id * dstEvery + 3] = uint8(v2.entry >> 8)
+ // out[id * dstEvery + 4] = uint8(v3.entry >> 8)
+ ADD R7, R3, R15
+ MOVW R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 80(R9)
+ MOVB R11, 88(R9)
+
+ // br2.fillFast32()
+ MOVD 128(R9), R10
+ MOVBU 136(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill2
+ MOVD 120(R9), R12
+ SUB $0x20, R11, R11
+ SUB $0x04, R12, R12
+ MOVD 96(R9), R13
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R13, R12, R15
+ MOVWU (R15), R13
+ MOVD R11, R1
+ LSL R1, R13, R13
+ MOVD R12, 120(R9)
+ ORR R13, R10, R10
+
+ // exhausted += (br2.off < 4)
+ CMP $0x04, R12
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill2:
+ // val0 := br2.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br2.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v1 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v1.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // val2 := br2.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v2 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v2.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val3 := br2.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v3 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br2.advance(uint8(v3.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // these four writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ // out[id * dstEvery + 3] = uint8(v2.entry >> 8)
+ // out[id * dstEvery + 4] = uint8(v3.entry >> 8)
+ ADD R7<<1, R3, R15
+ MOVW R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 128(R9)
+ MOVB R11, 136(R9)
+
+ // br3.fillFast32()
+ MOVD 176(R9), R10
+ MOVBU 184(R9), R11
+ CMP $0x20, R11
+ BLS skip_fill3
+ MOVD 168(R9), R12
+ SUB $0x20, R11, R11
+ SUB $0x04, R12, R12
+ MOVD 144(R9), R13
+
+ // b.value |= uint64(low) << (b.bitsRead & 63)
+ ADD R13, R12, R15
+ MOVWU (R15), R13
+ MOVD R11, R1
+ LSL R1, R13, R13
+ MOVD R12, 168(R9)
+ ORR R13, R10, R10
+
+ // exhausted += (br3.off < 4)
+ CMP $0x04, R12
+ CSINC HS, R2, R2, R16
+ BFI $0, R16, $8, R2
+
+skip_fill3:
+ // val0 := br3.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v0 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v0.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val1 := br3.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v1 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v1.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // val2 := br3.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v2 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v2.entry)
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+
+ // val3 := br3.peekTopBits(peekBits)
+ MOVD R10, R12
+ MOVD R6, R1
+ LSR R1, R12, R12
+
+ // v3 := table[val0&mask]
+ ADD R12<<1, R8, R15
+ MOVHU (R15), R1
+
+ // br3.advance(uint8(v3.entry)
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ LSL R1, R10, R10
+ ADD R1, R11, R15
+ BFI $0, R15, $8, R11
+ REVW R0, R0
+
+ // these four writes get coalesced
+ // out[id * dstEvery + 0] = uint8(v0.entry >> 8)
+ // out[id * dstEvery + 1] = uint8(v1.entry >> 8)
+ // out[id * dstEvery + 3] = uint8(v2.entry >> 8)
+ // out[id * dstEvery + 4] = uint8(v3.entry >> 8)
+ ADD R7<<1, R7, R1
+ ADD R1, R3, R15
+ MOVW R0, (R15)
+
+ // update the bitreader structure
+ MOVD R10, 176(R9)
+ MOVB R11, 184(R9)
+ ADD $0x04, R3, R3
+ AND $0xff, R2, R15
+ AND $0xff, R2, R16
+ TST R16, R15
+ BEQ main_loop
+ MOVD ctx+0(FP), R0
+ MOVD 16(R0), R16
+ SUB R16, R3, R3
+ LSL $0x02, R3, R3
+ MOVD R3, 40(R0)
+ RET
+
+// func decompress1x_main_loop_amd64(ctx *decompress1xContext)
+TEXT ·decompress1x_main_loop_arm64(SB), $0-8
+ MOVD ctx+0(FP), R1
+ MOVD 16(R1), R2
+ MOVD 24(R1), R3
+ CMP $0x04, R3
+ BLO error_max_decoded_size_exceeded
+ ADD R3, R2, R3
+ MOVD (R1), R5
+ MOVD (R5), R7
+ MOVD 24(R5), R8
+ MOVD 32(R5), R9
+ MOVBU 40(R5), R10
+ MOVD 32(R1), R5
+ MOVBU 8(R1), R6
+ JMP loop_condition
+
+main_loop:
+ // Check if we have room for 4 bytes in the output buffer
+ ADD $4, R2, R1
+ CMP R3, R1
+ BGE error_max_decoded_size_exceeded
+
+ // Decode 4 values
+ CMP $0x20, R10
+ BLT bitReader_fillFast_1_end
+ SUB $0x20, R10, R10
+ SUB $0x04, R8, R8
+ ADD R8, R7, R15
+ MOVWU (R15), R11
+ MOVD R10, R1
+ LSL R1, R11, R11
+ ORR R11, R9, R9
+
+bitReader_fillFast_1_end:
+ MOVD R6, R1
+ MOVD R9, R11
+ LSR R1, R11, R11
+ ADD R11<<1, R5, R15
+ MOVHU (R15), R1
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ MOVBU R1, R1
+ ADD R1, R10, R10
+ LSL R1, R9, R9
+ MOVD R6, R1
+ MOVD R9, R11
+ LSR R1, R11, R11
+ ADD R11<<1, R5, R15
+ MOVHU (R15), R1
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ MOVBU R1, R1
+ ADD R1, R10, R10
+ LSL R1, R9, R9
+ REVW R0, R0
+ CMP $0x20, R10
+ BLT bitReader_fillFast_2_end
+ SUB $0x20, R10, R10
+ SUB $0x04, R8, R8
+ ADD R8, R7, R15
+ MOVWU (R15), R11
+ MOVD R10, R1
+ LSL R1, R11, R11
+ ORR R11, R9, R9
+
+bitReader_fillFast_2_end:
+ MOVD R6, R1
+ MOVD R9, R11
+ LSR R1, R11, R11
+ ADD R11<<1, R5, R15
+ MOVHU (R15), R1
+ UBFX $8, R1, $8, R16
+ BFI $8, R16, $8, R0
+ MOVBU R1, R1
+ ADD R1, R10, R10
+ LSL R1, R9, R9
+ MOVD R6, R1
+ MOVD R9, R11
+ LSR R1, R11, R11
+ ADD R11<<1, R5, R15
+ MOVHU (R15), R1
+ UBFX $8, R1, $8, R16
+ BFI $0, R16, $8, R0
+ MOVBU R1, R1
+ ADD R1, R10, R10
+ LSL R1, R9, R9
+ REVW R0, R0
+
+ // Store the decoded values
+ MOVW R0, (R2)
+ ADD $0x04, R2, R2
+
+loop_condition:
+ CMP $0x08, R8
+ BGE main_loop
+
+ // Update ctx structure
+ MOVD ctx+0(FP), R0
+ MOVD 16(R0), R16
+ SUB R16, R2, R2
+ MOVD R2, 40(R0)
+ MOVD (R0), R0
+ MOVD R8, 24(R0)
+ MOVD R9, 32(R0)
+ MOVB R10, 40(R0)
+ RET
+
+ // Report error
+error_max_decoded_size_exceeded:
+ MOVD ctx+0(FP), R0
+ MOVD $-1, R1
+ MOVD R1, 40(R0)
+ RET
+
+// skipped decompress1x_main_loop_bmi2 (generic twin preferred on arm64)
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_asm.go b/vendor/github.com/klauspost/compress/huff0/decompress_asm.go
new file mode 100644
index 000000000000..4854dd43653e
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_asm.go
@@ -0,0 +1,193 @@
+//go:build (amd64 || arm64) && !appengine && !noasm && gc
+
+// This file contains the specialisation of Decoder.Decompress4X
+// and Decoder.Decompress1X that use an asm implementation of their main loops.
+// The asm function stubs and any per-arch dispatch live in decompress_amd64.go
+// and decompress_arm64.go.
+package huff0
+
+import (
+ "errors"
+ "fmt"
+)
+
+// fallback8BitSize is the size where using Go version is faster.
+const fallback8BitSize = 800
+
+type decompress4xContext struct {
+ pbr *[4]bitReaderShifted
+ peekBits uint8
+ out *byte
+ dstEvery int
+ tbl *dEntrySingle
+ decoded int
+ limit *byte
+}
+
+// Decompress4X will decompress a 4X encoded stream.
+// The length of the supplied input must match the end of a block exactly.
+// The *capacity* of the dst slice must match the destination size of
+// the uncompressed data exactly.
+func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
+ if len(d.dt.single) == 0 {
+ return nil, errors.New("no table loaded")
+ }
+ if len(src) < 6+(4*1) {
+ return nil, errors.New("input too small")
+ }
+
+ use8BitTables := d.actualTableLog <= 8
+ if cap(dst) < fallback8BitSize && use8BitTables {
+ return d.decompress4X8bit(dst, src)
+ }
+
+ var br [4]bitReaderShifted
+ // Decode "jump table"
+ start := 6
+ for i := range 3 {
+ length := int(src[i*2]) | (int(src[i*2+1]) << 8)
+ if start+length >= len(src) {
+ return nil, errors.New("truncated input (or invalid offset)")
+ }
+ err := br[i].init(src[start : start+length])
+ if err != nil {
+ return nil, err
+ }
+ start += length
+ }
+ err := br[3].init(src[start:])
+ if err != nil {
+ return nil, err
+ }
+
+ // destination, offset to match first output
+ dstSize := cap(dst)
+ dst = dst[:dstSize]
+ out := dst
+ dstEvery := (dstSize + 3) / 4
+
+ const tlSize = 1 << tableLogMax
+ const tlMask = tlSize - 1
+ single := d.dt.single[:tlSize]
+
+ var decoded int
+
+ if len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) {
+ ctx := decompress4xContext{
+ pbr: &br,
+ peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()
+ out: &out[0],
+ dstEvery: dstEvery,
+ tbl: &single[0],
+ limit: &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last.
+ }
+ if use8BitTables {
+ decompress4x_8b_main_loop_asm(&ctx)
+ } else {
+ decompress4x_main_loop_asm(&ctx)
+ }
+
+ decoded = ctx.decoded
+ out = out[decoded/4:]
+ }
+
+ // Decode remaining.
+ remainBytes := dstEvery - (decoded / 4)
+ for i := range br {
+ offset := dstEvery * i
+ endsAt := min(offset+remainBytes, len(out))
+ br := &br[i]
+ bitsLeft := br.remaining()
+ for bitsLeft > 0 {
+ br.fill()
+ if offset >= endsAt {
+ return nil, errors.New("corruption detected: stream overrun 4")
+ }
+
+ // Read value and increment offset.
+ val := br.peekBitsFast(d.actualTableLog)
+ v := single[val&tlMask].entry
+ nBits := uint8(v)
+ br.advance(nBits)
+ bitsLeft -= uint(nBits)
+ out[offset] = uint8(v >> 8)
+ offset++
+ }
+ if offset != endsAt {
+ return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt)
+ }
+ decoded += offset - dstEvery*i
+ err = br.close()
+ if err != nil {
+ return nil, err
+ }
+ }
+ if dstSize != decoded {
+ return nil, errors.New("corruption detected: short output block")
+ }
+ return dst, nil
+}
+
+type decompress1xContext struct {
+ pbr *bitReaderShifted
+ peekBits uint8
+ out *byte
+ outCap int
+ tbl *dEntrySingle
+ decoded int
+}
+
+// Error reported by asm implementations
+const error_max_decoded_size_exeeded = -1
+
+// Decompress1X will decompress a 1X encoded stream.
+// The cap of the output buffer will be the maximum decompressed size.
+// The length of the supplied input must match the end of a block exactly.
+func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {
+ if len(d.dt.single) == 0 {
+ return nil, errors.New("no table loaded")
+ }
+ var br bitReaderShifted
+ err := br.init(src)
+ if err != nil {
+ return dst, err
+ }
+ maxDecodedSize := cap(dst)
+ dst = dst[:maxDecodedSize]
+
+ const tlSize = 1 << tableLogMax
+ const tlMask = tlSize - 1
+
+ if maxDecodedSize >= 4 {
+ ctx := decompress1xContext{
+ pbr: &br,
+ out: &dst[0],
+ outCap: maxDecodedSize,
+ peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast()
+ tbl: &d.dt.single[0],
+ }
+
+ decompress1x_main_loop_asm(&ctx)
+ if ctx.decoded == error_max_decoded_size_exeeded {
+ return nil, ErrMaxDecodedSizeExceeded
+ }
+
+ dst = dst[:ctx.decoded]
+ }
+
+ // br < 8, so uint8 is fine
+ bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead
+ for bitsLeft > 0 {
+ br.fill()
+ if len(dst) >= maxDecodedSize {
+ br.close()
+ return nil, ErrMaxDecodedSizeExceeded
+ }
+ v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask]
+ nBits := uint8(v.entry)
+ br.advance(nBits)
+ bitsLeft -= nBits
+ dst = append(dst, uint8(v.entry>>8))
+ }
+ return dst, br.close()
+}
diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go b/vendor/github.com/klauspost/compress/huff0/decompress_generic.go
index 610392322240..e1bca5c686e5 100644
--- a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go
+++ b/vendor/github.com/klauspost/compress/huff0/decompress_generic.go
@@ -1,4 +1,4 @@
-//go:build !amd64 || appengine || !gc || noasm
+//go:build (!amd64 && !arm64) || appengine || !gc || noasm
// This file contains a generic implementation of Decoder.Decompress4X.
package huff0
diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go
index 2329e996f86e..51f9da03875b 100644
--- a/vendor/github.com/klauspost/compress/zstd/blockdec.go
+++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go
@@ -400,8 +400,9 @@ func (b *blockDec) decodeLiterals(in []byte, hist *history) (remain []byte, err
}
}
var err error
- // Use our out buffer.
- huff.MaxDecodedSize = litRegenSize
+ // Decoder.Decompress* uses cap(dst) for the size limit. Do not write
+ // MaxDecodedSize on hist.huffTree: with a trained dictionary that
+ // pointer aliases the shared dict.litEnc and concurrent DecodeAll races.
if fourStreams {
literals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals)
} else {
@@ -673,10 +674,6 @@ func (b *blockDec) executeSequences(hist *history) error {
hbytes := hist.b
if len(hbytes) > hist.windowSize {
hbytes = hbytes[len(hbytes)-hist.windowSize:]
- // We do not need history anymore.
- if hist.dict != nil {
- hist.dict.content = nil
- }
}
hist.decoders.windowSize = hist.windowSize
hist.decoders.out = b.dst[:0]
diff --git a/vendor/github.com/klauspost/compress/zstd/dict.go b/vendor/github.com/klauspost/compress/zstd/dict.go
index 4f1c4938cd34..67f40e791490 100644
--- a/vendor/github.com/klauspost/compress/zstd/dict.go
+++ b/vendor/github.com/klauspost/compress/zstd/dict.go
@@ -296,40 +296,81 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
if offset > 3 {
newOffsets[offset-3]++
} else {
- newOffsets[uint32(o.Offsets[offset-1])]++
+ // Repeat codes reference the training Offsets. Skip unset
+ // (zero) entries so they are not ranked as real offsets.
+ prev := o.Offsets[offset-1]
+ if prev > 0 {
+ newOffsets[uint32(prev)]++
+ }
}
}
}
// Find most used offsets.
var sortedOffsets []uint32
for k := range newOffsets {
+ if k == 0 {
+ continue
+ }
sortedOffsets = append(sortedOffsets, k)
}
sort.Slice(sortedOffsets, func(i, j int) bool {
a, b := sortedOffsets[i], sortedOffsets[j]
- if a == b {
+ ca, cb := newOffsets[a], newOffsets[b]
+ if ca == cb {
// Prefer the longer offset
- return sortedOffsets[i] > sortedOffsets[j]
+ return a > b
}
- return newOffsets[sortedOffsets[i]] > newOffsets[sortedOffsets[j]]
+ return ca > cb
})
- if len(sortedOffsets) > 3 {
- if debug {
- print("Offsets:")
- for i, v := range sortedOffsets {
- if i > 20 {
- break
- }
- printf("[%d: %d],", v, newOffsets[v])
+ if debug {
+ print("Offsets:")
+ for i, v := range sortedOffsets {
+ if i > 20 {
+ break
}
- println("")
+ printf("[%d: %d],", v, newOffsets[v])
+ }
+ println("")
+ }
+ // Dictionary recent-offsets must be three positive values within the
+ // history. Ranked matches may be fewer (or empty when only unset
+ // repeat codes were seen), so fill remaining slots with defaults.
+ used := make(map[int]bool, 3)
+ var finalOffsets [3]int
+ nOff := 0
+ for _, v := range sortedOffsets {
+ iv := int(v)
+ if iv <= 0 || iv > len(hist) || used[iv] {
+ continue
+ }
+ finalOffsets[nOff] = iv
+ used[iv] = true
+ nOff++
+ if nOff == 3 {
+ break
}
-
- sortedOffsets = sortedOffsets[:3]
}
- for i, v := range sortedOffsets {
- o.Offsets[i] = int(v)
+ for _, def := range []int{1, 4, 8} {
+ if nOff == 3 {
+ break
+ }
+ if def <= len(hist) && !used[def] {
+ finalOffsets[nOff] = def
+ used[def] = true
+ nOff++
+ }
+ }
+ for def := 1; nOff < 3 && def <= len(hist); def++ {
+ if !used[def] {
+ finalOffsets[nOff] = def
+ used[def] = true
+ nOff++
+ }
+ }
+ if nOff < 3 {
+ return nil, fmt.Errorf("could not determine 3 valid dictionary offsets (history size %d)", len(hist))
}
+ o.Offsets = finalOffsets
if debug {
println("New repeat offsets", o.Offsets)
}
@@ -337,6 +378,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
if nUsed == 0 || seqs == 0 {
return nil, fmt.Errorf("%d blocks, %d sequences found", nUsed, seqs)
}
+ if litTotal == 0 {
+ return nil, errors.New("0 literals found")
+ }
if debug {
println("Sequences:", seqs, "Blocks:", nUsed, "Literals:", litTotal)
}
@@ -517,11 +561,10 @@ func BuildDict(o BuildDictOptions) ([]byte, error) {
out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[1])))
out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[2])))
out.Write(hist)
+ if _, err := loadDict(out.Bytes()); err != nil {
+ return nil, fmt.Errorf("built dictionary failed validation: %w", err)
+ }
if debug {
- _, err := loadDict(out.Bytes())
- if err != nil {
- panic(err)
- }
i, err := InspectDictionary(out.Bytes())
if err != nil {
panic(err)
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
index 3fc381c7a7b2..4d3188ff49b9 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s
@@ -2081,7 +2081,7 @@ sequenceDecs_decodeSync_amd64_match_len_ofs_ok:
MOVQ 16(SP), R13
// Check if we have enough space in s.out
- LEAQ (AX)(R13*1), R14
+ LEAQ 16(AX)(R13*1), R14
ADDQ R10, R14
CMPQ R14, 32(SP)
JA error_not_enough_space
@@ -2601,7 +2601,7 @@ sequenceDecs_decodeSync_bmi2_match_len_ofs_ok:
MOVQ 16(SP), R13
// Check if we have enough space in s.out
- LEAQ (CX)(R13*1), R14
+ LEAQ 16(CX)(R13*1), R14
ADDQ R9, R14
CMPQ R14, 32(SP)
JA error_not_enough_space
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s
index a468e5fc2cad..6f54ef21ba12 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s
@@ -12,7 +12,7 @@ TEXT ·sequenceDecs_decode_arm64(SB), $8-32
MOVD (R1), R0
MOVD 32(R1), R5
ADD R5, R0, R0
- MOVD R0, (RSP)
+ MOVD R0, 8(RSP)
MOVD ctx+16(FP), R0
MOVD 72(R0), R6
MOVD 80(R0), R7
@@ -24,7 +24,7 @@ TEXT ·sequenceDecs_decode_arm64(SB), $8-32
MOVD 160(R0), R12
sequenceDecs_decode_amd64_main_loop:
- MOVD (RSP), R13
+ MOVD 8(RSP), R13
// Fill bitreader to have enough for the offset and match length.
CMP $0x08, R5
@@ -60,7 +60,8 @@ sequenceDecs_decode_amd64_fill_end:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_amd64_of_update_zero
@@ -81,7 +82,8 @@ sequenceDecs_decode_amd64_of_update_zero:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_amd64_ml_update_zero
@@ -131,7 +133,8 @@ sequenceDecs_decode_amd64_fill_2_end:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_amd64_ll_update_zero
@@ -148,7 +151,7 @@ sequenceDecs_decode_amd64_ll_update_zero:
MOVD R0, (R9)
// Fill bitreader for state updates
- MOVD R13, (RSP)
+ MOVD R13, 8(RSP)
MOVD R8, R0
LSR $0x08, R0, R0
MOVBU R0, R0
@@ -166,7 +169,7 @@ sequenceDecs_decode_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -187,7 +190,7 @@ sequenceDecs_decode_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -208,7 +211,7 @@ sequenceDecs_decode_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -360,7 +363,7 @@ TEXT ·sequenceDecs_decode_56_arm64(SB), $8-32
MOVD (R1), R0
MOVD 32(R1), R5
ADD R5, R0, R0
- MOVD R0, (RSP)
+ MOVD R0, 8(RSP)
MOVD ctx+16(FP), R0
MOVD 72(R0), R6
MOVD 80(R0), R7
@@ -372,7 +375,7 @@ TEXT ·sequenceDecs_decode_56_arm64(SB), $8-32
MOVD 160(R0), R12
sequenceDecs_decode_56_amd64_main_loop:
- MOVD (RSP), R13
+ MOVD 8(RSP), R13
// Fill bitreader to have enough for the offset and match length.
CMP $0x08, R5
@@ -408,7 +411,8 @@ sequenceDecs_decode_56_amd64_fill_end:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_56_amd64_of_update_zero
@@ -429,7 +433,8 @@ sequenceDecs_decode_56_amd64_of_update_zero:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_56_amd64_ml_update_zero
@@ -450,7 +455,8 @@ sequenceDecs_decode_56_amd64_ml_update_zero:
MOVD R3, R1
MOVD R2, R14
LSL R1, R14, R14
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decode_56_amd64_ll_update_zero
@@ -467,7 +473,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero:
MOVD R0, (R9)
// Fill bitreader for state updates
- MOVD R13, (RSP)
+ MOVD R13, 8(RSP)
MOVD R8, R0
LSR $0x08, R0, R0
MOVBU R0, R0
@@ -485,7 +491,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -506,7 +512,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -527,7 +533,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R14, R14
MOVD $0x00000001, R4
- MOVB R13, R1
+ BFI $0, R13, $8, R1
LSLW R1, R4, R4
SUBW $1, R4, R4
AND R4, R14, R14
@@ -766,13 +772,14 @@ copy_4_small:
JMP copy_4_move_8through16
copy_4_move_3:
- MOVH (R13), R10
- MOVB 2(R13), R11
- MOVH R10, (R3)
- MOVB R11, 2(R3)
- ADD R12, R13, R13
- ADD R12, R3, R3
- JMP copy_4_end
+ MOVHU (R13), R10
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R11
+ MOVH R10, (R3)
+ MOVB R11, 2(R3)
+ ADD R12, R13, R13
+ ADD R12, R3, R3
+ JMP copy_4_end
copy_4_move_4through7:
MOVWU (R13), R10
@@ -834,24 +841,27 @@ copy_5_small:
JMP copy_5_move_8through16
copy_5_move_1or2:
- MOVB (R13), R14
- ADD R10, R13, R15
- MOVB -1(R15), R4
- MOVB R14, (R3)
- ADD R10, R3, R15
- MOVB R4, -1(R15)
- ADD R10, R13, R13
- ADD R10, R3, R3
- JMP copy_5_end
+ MOVBU (R13), R16
+ BFI $0, R16, $8, R14
+ ADD R10, R13, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R4
+ MOVB R14, (R3)
+ ADD R10, R3, R15
+ MOVB R4, -1(R15)
+ ADD R10, R13, R13
+ ADD R10, R3, R3
+ JMP copy_5_end
copy_5_move_3:
- MOVH (R13), R14
- MOVB 2(R13), R4
- MOVH R14, (R3)
- MOVB R4, 2(R3)
- ADD R10, R13, R13
- ADD R10, R3, R3
- JMP copy_5_end
+ MOVHU (R13), R14
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R4
+ MOVH R14, (R3)
+ MOVB R4, 2(R3)
+ ADD R10, R13, R13
+ ADD R10, R3, R3
+ JMP copy_5_end
copy_5_move_4through7:
MOVWU (R13), R14
@@ -906,12 +916,13 @@ copy_overlapping_match:
ADD R12, R6, R6
copy_slow_3:
- MOVB (R10), R11
- MOVB R11, (R3)
- ADD $1, R10, R10
- ADD $1, R3, R3
- SUBS $1, R12, R12
- BNE copy_slow_3
+ MOVBU (R10), R16
+ BFI $0, R16, $8, R11
+ MOVB R11, (R3)
+ ADD $1, R10, R10
+ ADD $1, R3, R3
+ SUBS $1, R12, R12
+ BNE copy_slow_3
handle_loop:
ADD $0x18, R0, R0
@@ -1016,24 +1027,27 @@ copy_1_small:
JMP copy_1_move_8through16
copy_1_move_1or2:
- MOVB (R5), R13
- ADD R10, R5, R15
- MOVB -1(R15), R14
- MOVB R13, (R3)
- ADD R10, R3, R15
- MOVB R14, -1(R15)
- ADD R10, R5, R5
- ADD R10, R3, R3
- JMP copy_1_end
+ MOVBU (R5), R16
+ BFI $0, R16, $8, R13
+ ADD R10, R5, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R14
+ MOVB R13, (R3)
+ ADD R10, R3, R15
+ MOVB R14, -1(R15)
+ ADD R10, R5, R5
+ ADD R10, R3, R3
+ JMP copy_1_end
copy_1_move_3:
- MOVH (R5), R13
- MOVB 2(R5), R14
- MOVH R13, (R3)
- MOVB R14, 2(R3)
- ADD R10, R5, R5
- ADD R10, R3, R3
- JMP copy_1_end
+ MOVHU (R5), R13
+ MOVBU 2(R5), R16
+ BFI $0, R16, $8, R14
+ MOVH R13, (R3)
+ MOVB R14, 2(R3)
+ ADD R10, R5, R5
+ ADD R10, R3, R3
+ JMP copy_1_end
copy_1_move_4through7:
MOVWU (R5), R13
@@ -1104,13 +1118,14 @@ copy_4_small:
JMP copy_4_move_8through16
copy_4_move_3:
- MOVH (R13), R10
- MOVB 2(R13), R11
- MOVH R10, (R3)
- MOVB R11, 2(R3)
- ADD R12, R13, R13
- ADD R12, R3, R3
- JMP copy_4_end
+ MOVHU (R13), R10
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R11
+ MOVH R10, (R3)
+ MOVB R11, 2(R3)
+ ADD R12, R13, R13
+ ADD R12, R3, R3
+ JMP copy_4_end
copy_4_move_4through7:
MOVWU (R13), R10
@@ -1172,24 +1187,27 @@ copy_5_small:
JMP copy_5_move_8through16
copy_5_move_1or2:
- MOVB (R13), R14
- ADD R10, R13, R15
- MOVB -1(R15), R4
- MOVB R14, (R3)
- ADD R10, R3, R15
- MOVB R4, -1(R15)
- ADD R10, R13, R13
- ADD R10, R3, R3
- JMP copy_5_end
+ MOVBU (R13), R16
+ BFI $0, R16, $8, R14
+ ADD R10, R13, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R4
+ MOVB R14, (R3)
+ ADD R10, R3, R15
+ MOVB R4, -1(R15)
+ ADD R10, R13, R13
+ ADD R10, R3, R3
+ JMP copy_5_end
copy_5_move_3:
- MOVH (R13), R14
- MOVB 2(R13), R4
- MOVH R14, (R3)
- MOVB R4, 2(R3)
- ADD R10, R13, R13
- ADD R10, R3, R3
- JMP copy_5_end
+ MOVHU (R13), R14
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R4
+ MOVH R14, (R3)
+ MOVB R4, 2(R3)
+ ADD R10, R13, R13
+ ADD R10, R3, R3
+ JMP copy_5_end
copy_5_move_4through7:
MOVWU (R13), R14
@@ -1257,24 +1275,27 @@ copy_2_small:
JMP copy_2_move_8through16
copy_2_move_1or2:
- MOVB (R10), R11
- ADD R12, R10, R15
- MOVB -1(R15), R13
- MOVB R11, (R3)
- ADD R12, R3, R15
- MOVB R13, -1(R15)
- ADD R12, R10, R10
- ADD R12, R3, R3
- JMP copy_2_end
+ MOVBU (R10), R16
+ BFI $0, R16, $8, R11
+ ADD R12, R10, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R13
+ MOVB R11, (R3)
+ ADD R12, R3, R15
+ MOVB R13, -1(R15)
+ ADD R12, R10, R10
+ ADD R12, R3, R3
+ JMP copy_2_end
copy_2_move_3:
- MOVH (R10), R11
- MOVB 2(R10), R13
- MOVH R11, (R3)
- MOVB R13, 2(R3)
- ADD R12, R10, R10
- ADD R12, R3, R3
- JMP copy_2_end
+ MOVHU (R10), R11
+ MOVBU 2(R10), R16
+ BFI $0, R16, $8, R13
+ MOVH R11, (R3)
+ MOVB R13, 2(R3)
+ ADD R12, R10, R10
+ ADD R12, R3, R3
+ JMP copy_2_end
copy_2_move_4through7:
MOVWU (R10), R11
@@ -1305,12 +1326,13 @@ copy_overlapping_match:
ADD R12, R6, R6
copy_slow_3:
- MOVB (R10), R11
- MOVB R11, (R3)
- ADD $1, R10, R10
- ADD $1, R3, R3
- SUBS $1, R12, R12
- BNE copy_slow_3
+ MOVBU (R10), R16
+ BFI $0, R16, $8, R11
+ MOVB R11, (R3)
+ ADD $1, R10, R10
+ ADD $1, R3, R3
+ SUBS $1, R12, R12
+ BNE copy_slow_3
handle_loop:
ADD $0x18, R0, R0
@@ -1361,41 +1383,41 @@ TEXT ·sequenceDecs_decodeSync_arm64(SB), $64-32
MOVD (R1), R0
MOVD 32(R1), R5
ADD R5, R0, R0
- MOVD R0, (RSP)
+ MOVD R0, 8(RSP)
MOVD ctx+16(FP), R0
MOVD 72(R0), R6
MOVD 80(R0), R7
MOVD 88(R0), R8
MOVD $0, R1
- MOVD R1, 8(RSP)
MOVD R1, 16(RSP)
MOVD R1, 24(RSP)
+ MOVD R1, 32(RSP)
MOVD 112(R0), R9
MOVD 128(R0), R1
- MOVD R1, 32(RSP)
+ MOVD R1, 40(RSP)
MOVD 144(R0), R10
MOVD 136(R0), R11
MOVD 200(R0), R1
- MOVD R1, 56(RSP)
+ MOVD R1, 64(RSP)
MOVD 176(R0), R1
- MOVD R1, 48(RSP)
+ MOVD R1, 56(RSP)
MOVD 184(R0), R0
- MOVD R0, 40(RSP)
- MOVD 40(RSP), R0
- MOVD 48(RSP), R16
+ MOVD R0, 48(RSP)
+ MOVD 48(RSP), R0
+ MOVD 56(RSP), R16
ADD R0, R16, R16
- MOVD R16, 48(RSP)
+ MOVD R16, 56(RSP)
// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
- MOVD 32(RSP), R16
+ MOVD 40(RSP), R16
ADD R9, R16, R16
- MOVD R16, 32(RSP)
+ MOVD R16, 40(RSP)
// outBase += outPosition
ADD R11, R9, R9
sequenceDecs_decodeSync_amd64_main_loop:
- MOVD (RSP), R12
+ MOVD 8(RSP), R12
// Fill bitreader to have enough for the offset and match length.
CMP $0x08, R5
@@ -1431,7 +1453,8 @@ sequenceDecs_decodeSync_amd64_fill_end:
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_amd64_of_update_zero
@@ -1445,14 +1468,15 @@ sequenceDecs_decodeSync_amd64_fill_end:
ADD R13, R0, R0
sequenceDecs_decodeSync_amd64_of_update_zero:
- MOVD R0, 8(RSP)
+ MOVD R0, 16(RSP)
// Update match length
MOVD R7, R0
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_amd64_ml_update_zero
@@ -1466,7 +1490,7 @@ sequenceDecs_decodeSync_amd64_of_update_zero:
ADD R13, R0, R0
sequenceDecs_decodeSync_amd64_ml_update_zero:
- MOVD R0, 16(RSP)
+ MOVD R0, 24(RSP)
// Fill bitreader to have enough for the remaining
CMP $0x08, R5
@@ -1502,7 +1526,8 @@ sequenceDecs_decodeSync_amd64_fill_2_end:
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_amd64_ll_update_zero
@@ -1516,10 +1541,10 @@ sequenceDecs_decodeSync_amd64_fill_2_end:
ADD R13, R0, R0
sequenceDecs_decodeSync_amd64_ll_update_zero:
- MOVD R0, 24(RSP)
+ MOVD R0, 32(RSP)
// Fill bitreader for state updates
- MOVD R12, (RSP)
+ MOVD R12, 8(RSP)
MOVD R8, R0
LSR $0x08, R0, R0
MOVBU R0, R0
@@ -1537,7 +1562,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -1558,7 +1583,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -1579,7 +1604,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -1594,7 +1619,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero:
sequenceDecs_decodeSync_amd64_skip_update:
// Adjust offset
MOVD s+0(FP), R1
- MOVD 8(RSP), R12
+ MOVD 16(RSP), R12
CMP $0x01, R0
BLS sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0
ADD $144, R1, R15
@@ -1605,7 +1630,7 @@ sequenceDecs_decodeSync_amd64_skip_update:
JMP sequenceDecs_decodeSync_amd64_after_adjust
sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0:
- MOVD 24(RSP), R16
+ MOVD 32(RSP), R16
CMP $0x00000000, R16
BNE sequenceDecs_decodeSync_amd64_adjust_offset_maybezero
ADD $1, R12, R12
@@ -1643,11 +1668,11 @@ sequenceDecs_decodeSync_amd64_adjust_skip:
MOVD R13, R12
sequenceDecs_decodeSync_amd64_after_adjust:
- MOVD R12, 8(RSP)
+ MOVD R12, 16(RSP)
// Check values
- MOVD 16(RSP), R0
- MOVD 24(RSP), R1
+ MOVD 24(RSP), R0
+ MOVD 32(RSP), R1
ADD R1, R0, R13
MOVD s+0(FP), R14
MOVD 256(R14), R16
@@ -1666,14 +1691,15 @@ sequenceDecs_decodeSync_amd64_after_adjust:
BNE sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch
sequenceDecs_decodeSync_amd64_match_len_ofs_ok:
- MOVD 24(RSP), R0
- MOVD 8(RSP), R1
- MOVD 16(RSP), R12
+ MOVD 32(RSP), R0
+ MOVD 16(RSP), R1
+ MOVD 24(RSP), R12
// Check if we have enough space in s.out
ADD R12, R0, R13
+ ADD $16, R13, R13
ADD R9, R13, R13
- MOVD 32(RSP), R16
+ MOVD 40(RSP), R16
CMP R16, R13
BHI error_not_enough_space
@@ -1697,11 +1723,11 @@ copy_1:
// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)
check_offset:
MOVD R11, R0
- MOVD 40(RSP), R16
+ MOVD 48(RSP), R16
ADD R16, R0, R0
CMP R0, R1
BGT error_match_off_too_big
- MOVD 56(RSP), R16
+ MOVD 64(RSP), R16
CMP R16, R1
BGT error_match_off_too_big
@@ -1709,7 +1735,7 @@ check_offset:
MOVD R1, R0
SUBS R11, R0, R0
BLS copy_match
- MOVD 48(RSP), R13
+ MOVD 56(RSP), R13
SUB R0, R13, R13
CMP R0, R12
BGT copy_all_from_history
@@ -1742,13 +1768,14 @@ copy_4_small:
JMP copy_4_move_8through16
copy_4_move_3:
- MOVH (R13), R0
- MOVB 2(R13), R1
- MOVH R0, (R9)
- MOVB R1, 2(R9)
- ADD R12, R13, R13
- ADD R12, R9, R9
- JMP copy_4_end
+ MOVHU (R13), R0
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R1
+ MOVH R0, (R9)
+ MOVB R1, 2(R9)
+ ADD R12, R13, R13
+ ADD R12, R9, R9
+ JMP copy_4_end
copy_4_move_4through7:
MOVWU (R13), R0
@@ -1807,24 +1834,27 @@ copy_5_small:
JMP copy_5_move_8through16
copy_5_move_1or2:
- MOVB (R13), R14
- ADD R0, R13, R15
- MOVB -1(R15), R4
- MOVB R14, (R9)
- ADD R0, R9, R15
- MOVB R4, -1(R15)
- ADD R0, R13, R13
- ADD R0, R9, R9
- JMP copy_5_end
+ MOVBU (R13), R16
+ BFI $0, R16, $8, R14
+ ADD R0, R13, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R4
+ MOVB R14, (R9)
+ ADD R0, R9, R15
+ MOVB R4, -1(R15)
+ ADD R0, R13, R13
+ ADD R0, R9, R9
+ JMP copy_5_end
copy_5_move_3:
- MOVH (R13), R14
- MOVB 2(R13), R4
- MOVH R14, (R9)
- MOVB R4, 2(R9)
- ADD R0, R13, R13
- ADD R0, R9, R9
- JMP copy_5_end
+ MOVHU (R13), R14
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R4
+ MOVH R14, (R9)
+ MOVB R4, 2(R9)
+ ADD R0, R13, R13
+ ADD R0, R9, R9
+ JMP copy_5_end
copy_5_move_4through7:
MOVWU (R13), R14
@@ -1879,12 +1909,13 @@ copy_overlapping_match:
ADD R12, R11, R11
copy_slow_3:
- MOVB (R0), R1
- MOVB R1, (R9)
- ADD $1, R0, R0
- ADD $1, R9, R9
- SUBS $1, R12, R12
- BNE copy_slow_3
+ MOVBU (R0), R16
+ BFI $0, R16, $8, R1
+ MOVB R1, (R9)
+ ADD $1, R0, R0
+ ADD $1, R9, R9
+ SUBS $1, R12, R12
+ BNE copy_slow_3
handle_loop:
MOVD ctx+16(FP), R0
@@ -1913,7 +1944,7 @@ loop_finished:
// Return with match length error
sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch:
- MOVD 16(RSP), R0
+ MOVD 24(RSP), R0
MOVD ctx+16(FP), R1
MOVD R0, 216(R1)
MOVD $0x00000001, R16
@@ -1923,7 +1954,7 @@ sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch:
// Return with match too long error
sequenceDecs_decodeSync_amd64_error_match_len_too_big:
MOVD ctx+16(FP), R0
- MOVD 16(RSP), R1
+ MOVD 24(RSP), R1
MOVD R1, 216(R0)
MOVD $0x00000002, R16
MOVD R16, ret+24(FP)
@@ -1932,7 +1963,7 @@ sequenceDecs_decodeSync_amd64_error_match_len_too_big:
// Return with match offset too long error
error_match_off_too_big:
MOVD ctx+16(FP), R0
- MOVD 8(RSP), R1
+ MOVD 16(RSP), R1
MOVD R1, 224(R0)
MOVD R11, 136(R0)
MOVD $0x00000003, R16
@@ -1942,7 +1973,7 @@ error_match_off_too_big:
// Return with not enough literals error
error_not_enough_literals:
MOVD ctx+16(FP), R0
- MOVD 24(RSP), R1
+ MOVD 32(RSP), R1
MOVD R1, 208(R0)
MOVD $0x00000004, R16
MOVD R16, ret+24(FP)
@@ -1957,9 +1988,9 @@ error_overread:
// Return with not enough output space error
error_not_enough_space:
MOVD ctx+16(FP), R0
- MOVD 24(RSP), R1
+ MOVD 32(RSP), R1
MOVD R1, 208(R0)
- MOVD 16(RSP), R1
+ MOVD 24(RSP), R1
MOVD R1, 216(R0)
MOVD R11, 136(R0)
MOVD $0x00000005, R16
@@ -1977,41 +2008,41 @@ TEXT ·sequenceDecs_decodeSync_safe_arm64(SB), $64-32
MOVD (R1), R0
MOVD 32(R1), R5
ADD R5, R0, R0
- MOVD R0, (RSP)
+ MOVD R0, 8(RSP)
MOVD ctx+16(FP), R0
MOVD 72(R0), R6
MOVD 80(R0), R7
MOVD 88(R0), R8
MOVD $0, R1
- MOVD R1, 8(RSP)
MOVD R1, 16(RSP)
MOVD R1, 24(RSP)
+ MOVD R1, 32(RSP)
MOVD 112(R0), R9
MOVD 128(R0), R1
- MOVD R1, 32(RSP)
+ MOVD R1, 40(RSP)
MOVD 144(R0), R10
MOVD 136(R0), R11
MOVD 200(R0), R1
- MOVD R1, 56(RSP)
+ MOVD R1, 64(RSP)
MOVD 176(R0), R1
- MOVD R1, 48(RSP)
+ MOVD R1, 56(RSP)
MOVD 184(R0), R0
- MOVD R0, 40(RSP)
- MOVD 40(RSP), R0
- MOVD 48(RSP), R16
+ MOVD R0, 48(RSP)
+ MOVD 48(RSP), R0
+ MOVD 56(RSP), R16
ADD R0, R16, R16
- MOVD R16, 48(RSP)
+ MOVD R16, 56(RSP)
// Calculate pointer to s.out[cap(s.out)] (a past-end pointer)
- MOVD 32(RSP), R16
+ MOVD 40(RSP), R16
ADD R9, R16, R16
- MOVD R16, 32(RSP)
+ MOVD R16, 40(RSP)
// outBase += outPosition
ADD R11, R9, R9
sequenceDecs_decodeSync_safe_amd64_main_loop:
- MOVD (RSP), R12
+ MOVD 8(RSP), R12
// Fill bitreader to have enough for the offset and match length.
CMP $0x08, R5
@@ -2047,7 +2078,8 @@ sequenceDecs_decodeSync_safe_amd64_fill_end:
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_safe_amd64_of_update_zero
@@ -2061,14 +2093,15 @@ sequenceDecs_decodeSync_safe_amd64_fill_end:
ADD R13, R0, R0
sequenceDecs_decodeSync_safe_amd64_of_update_zero:
- MOVD R0, 8(RSP)
+ MOVD R0, 16(RSP)
// Update match length
MOVD R7, R0
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_safe_amd64_ml_update_zero
@@ -2082,7 +2115,7 @@ sequenceDecs_decodeSync_safe_amd64_of_update_zero:
ADD R13, R0, R0
sequenceDecs_decodeSync_safe_amd64_ml_update_zero:
- MOVD R0, 16(RSP)
+ MOVD R0, 24(RSP)
// Fill bitreader to have enough for the remaining
CMP $0x08, R5
@@ -2118,7 +2151,8 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_end:
MOVD R3, R1
MOVD R2, R13
LSL R1, R13, R13
- UBFX $8, R0, $8, R1
+ UBFX $8, R0, $8, R16
+ BFI $0, R16, $8, R1
LSR $0x20, R0, R0
TST R1, R1
BEQ sequenceDecs_decodeSync_safe_amd64_ll_update_zero
@@ -2132,10 +2166,10 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_end:
ADD R13, R0, R0
sequenceDecs_decodeSync_safe_amd64_ll_update_zero:
- MOVD R0, 24(RSP)
+ MOVD R0, 32(RSP)
// Fill bitreader for state updates
- MOVD R12, (RSP)
+ MOVD R12, 8(RSP)
MOVD R8, R0
LSR $0x08, R0, R0
MOVBU R0, R0
@@ -2153,7 +2187,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -2174,7 +2208,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -2195,7 +2229,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero:
NEG R1, R16
ROR R16, R13, R13
MOVD $0x00000001, R14
- MOVB R12, R1
+ BFI $0, R12, $8, R1
LSLW R1, R14, R14
SUBW $1, R14, R14
AND R14, R13, R13
@@ -2210,7 +2244,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero:
sequenceDecs_decodeSync_safe_amd64_skip_update:
// Adjust offset
MOVD s+0(FP), R1
- MOVD 8(RSP), R12
+ MOVD 16(RSP), R12
CMP $0x01, R0
BLS sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0
ADD $144, R1, R15
@@ -2221,7 +2255,7 @@ sequenceDecs_decodeSync_safe_amd64_skip_update:
JMP sequenceDecs_decodeSync_safe_amd64_after_adjust
sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0:
- MOVD 24(RSP), R16
+ MOVD 32(RSP), R16
CMP $0x00000000, R16
BNE sequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero
ADD $1, R12, R12
@@ -2259,11 +2293,11 @@ sequenceDecs_decodeSync_safe_amd64_adjust_skip:
MOVD R13, R12
sequenceDecs_decodeSync_safe_amd64_after_adjust:
- MOVD R12, 8(RSP)
+ MOVD R12, 16(RSP)
// Check values
- MOVD 16(RSP), R0
- MOVD 24(RSP), R1
+ MOVD 24(RSP), R0
+ MOVD 32(RSP), R1
ADD R1, R0, R13
MOVD s+0(FP), R14
MOVD 256(R14), R16
@@ -2282,14 +2316,14 @@ sequenceDecs_decodeSync_safe_amd64_after_adjust:
BNE sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch
sequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok:
- MOVD 24(RSP), R0
- MOVD 8(RSP), R1
- MOVD 16(RSP), R12
+ MOVD 32(RSP), R0
+ MOVD 16(RSP), R1
+ MOVD 24(RSP), R12
// Check if we have enough space in s.out
ADD R12, R0, R13
ADD R9, R13, R13
- MOVD 32(RSP), R16
+ MOVD 40(RSP), R16
CMP R16, R13
BHI error_not_enough_space
@@ -2326,24 +2360,27 @@ copy_1_small:
JMP copy_1_move_8through16
copy_1_move_1or2:
- MOVB (R10), R13
- ADD R0, R10, R15
- MOVB -1(R15), R14
- MOVB R13, (R9)
- ADD R0, R9, R15
- MOVB R14, -1(R15)
- ADD R0, R10, R10
- ADD R0, R9, R9
- JMP copy_1_end
+ MOVBU (R10), R16
+ BFI $0, R16, $8, R13
+ ADD R0, R10, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R14
+ MOVB R13, (R9)
+ ADD R0, R9, R15
+ MOVB R14, -1(R15)
+ ADD R0, R10, R10
+ ADD R0, R9, R9
+ JMP copy_1_end
copy_1_move_3:
- MOVH (R10), R13
- MOVB 2(R10), R14
- MOVH R13, (R9)
- MOVB R14, 2(R9)
- ADD R0, R10, R10
- ADD R0, R9, R9
- JMP copy_1_end
+ MOVHU (R10), R13
+ MOVBU 2(R10), R16
+ BFI $0, R16, $8, R14
+ MOVH R13, (R9)
+ MOVB R14, 2(R9)
+ ADD R0, R10, R10
+ ADD R0, R9, R9
+ JMP copy_1_end
copy_1_move_4through7:
MOVWU (R10), R13
@@ -2372,11 +2409,11 @@ copy_1_end:
// Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize)
check_offset:
MOVD R11, R0
- MOVD 40(RSP), R16
+ MOVD 48(RSP), R16
ADD R16, R0, R0
CMP R0, R1
BGT error_match_off_too_big
- MOVD 56(RSP), R16
+ MOVD 64(RSP), R16
CMP R16, R1
BGT error_match_off_too_big
@@ -2384,7 +2421,7 @@ check_offset:
MOVD R1, R0
SUBS R11, R0, R0
BLS copy_match
- MOVD 48(RSP), R13
+ MOVD 56(RSP), R13
SUB R0, R13, R13
CMP R0, R12
BGT copy_all_from_history
@@ -2417,13 +2454,14 @@ copy_4_small:
JMP copy_4_move_8through16
copy_4_move_3:
- MOVH (R13), R0
- MOVB 2(R13), R1
- MOVH R0, (R9)
- MOVB R1, 2(R9)
- ADD R12, R13, R13
- ADD R12, R9, R9
- JMP copy_4_end
+ MOVHU (R13), R0
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R1
+ MOVH R0, (R9)
+ MOVB R1, 2(R9)
+ ADD R12, R13, R13
+ ADD R12, R9, R9
+ JMP copy_4_end
copy_4_move_4through7:
MOVWU (R13), R0
@@ -2482,24 +2520,27 @@ copy_5_small:
JMP copy_5_move_8through16
copy_5_move_1or2:
- MOVB (R13), R14
- ADD R0, R13, R15
- MOVB -1(R15), R4
- MOVB R14, (R9)
- ADD R0, R9, R15
- MOVB R4, -1(R15)
- ADD R0, R13, R13
- ADD R0, R9, R9
- JMP copy_5_end
+ MOVBU (R13), R16
+ BFI $0, R16, $8, R14
+ ADD R0, R13, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R4
+ MOVB R14, (R9)
+ ADD R0, R9, R15
+ MOVB R4, -1(R15)
+ ADD R0, R13, R13
+ ADD R0, R9, R9
+ JMP copy_5_end
copy_5_move_3:
- MOVH (R13), R14
- MOVB 2(R13), R4
- MOVH R14, (R9)
- MOVB R4, 2(R9)
- ADD R0, R13, R13
- ADD R0, R9, R9
- JMP copy_5_end
+ MOVHU (R13), R14
+ MOVBU 2(R13), R16
+ BFI $0, R16, $8, R4
+ MOVH R14, (R9)
+ MOVB R4, 2(R9)
+ ADD R0, R13, R13
+ ADD R0, R9, R9
+ JMP copy_5_end
copy_5_move_4through7:
MOVWU (R13), R14
@@ -2567,24 +2608,27 @@ copy_2_small:
JMP copy_2_move_8through16
copy_2_move_1or2:
- MOVB (R0), R1
- ADD R12, R0, R15
- MOVB -1(R15), R13
- MOVB R1, (R9)
- ADD R12, R9, R15
- MOVB R13, -1(R15)
- ADD R12, R0, R0
- ADD R12, R9, R9
- JMP copy_2_end
+ MOVBU (R0), R16
+ BFI $0, R16, $8, R1
+ ADD R12, R0, R15
+ MOVBU -1(R15), R16
+ BFI $0, R16, $8, R13
+ MOVB R1, (R9)
+ ADD R12, R9, R15
+ MOVB R13, -1(R15)
+ ADD R12, R0, R0
+ ADD R12, R9, R9
+ JMP copy_2_end
copy_2_move_3:
- MOVH (R0), R1
- MOVB 2(R0), R13
- MOVH R1, (R9)
- MOVB R13, 2(R9)
- ADD R12, R0, R0
- ADD R12, R9, R9
- JMP copy_2_end
+ MOVHU (R0), R1
+ MOVBU 2(R0), R16
+ BFI $0, R16, $8, R13
+ MOVH R1, (R9)
+ MOVB R13, 2(R9)
+ ADD R12, R0, R0
+ ADD R12, R9, R9
+ JMP copy_2_end
copy_2_move_4through7:
MOVWU (R0), R1
@@ -2615,12 +2659,13 @@ copy_overlapping_match:
ADD R12, R11, R11
copy_slow_3:
- MOVB (R0), R1
- MOVB R1, (R9)
- ADD $1, R0, R0
- ADD $1, R9, R9
- SUBS $1, R12, R12
- BNE copy_slow_3
+ MOVBU (R0), R16
+ BFI $0, R16, $8, R1
+ MOVB R1, (R9)
+ ADD $1, R0, R0
+ ADD $1, R9, R9
+ SUBS $1, R12, R12
+ BNE copy_slow_3
handle_loop:
MOVD ctx+16(FP), R0
@@ -2649,7 +2694,7 @@ loop_finished:
// Return with match length error
sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch:
- MOVD 16(RSP), R0
+ MOVD 24(RSP), R0
MOVD ctx+16(FP), R1
MOVD R0, 216(R1)
MOVD $0x00000001, R16
@@ -2659,7 +2704,7 @@ sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch:
// Return with match too long error
sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big:
MOVD ctx+16(FP), R0
- MOVD 16(RSP), R1
+ MOVD 24(RSP), R1
MOVD R1, 216(R0)
MOVD $0x00000002, R16
MOVD R16, ret+24(FP)
@@ -2668,7 +2713,7 @@ sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big:
// Return with match offset too long error
error_match_off_too_big:
MOVD ctx+16(FP), R0
- MOVD 8(RSP), R1
+ MOVD 16(RSP), R1
MOVD R1, 224(R0)
MOVD R11, 136(R0)
MOVD $0x00000003, R16
@@ -2678,7 +2723,7 @@ error_match_off_too_big:
// Return with not enough literals error
error_not_enough_literals:
MOVD ctx+16(FP), R0
- MOVD 24(RSP), R1
+ MOVD 32(RSP), R1
MOVD R1, 208(R0)
MOVD $0x00000004, R16
MOVD R16, ret+24(FP)
@@ -2693,9 +2738,9 @@ error_overread:
// Return with not enough output space error
error_not_enough_space:
MOVD ctx+16(FP), R0
- MOVD 24(RSP), R1
+ MOVD 32(RSP), R1
MOVD R1, 208(R0)
- MOVD 16(RSP), R1
+ MOVD 24(RSP), R1
MOVD R1, 216(R0)
MOVD R11, 136(R0)
MOVD $0x00000005, R16
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go b/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go
index 55405f3914d8..42ce5de71636 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go
@@ -77,6 +77,35 @@ const errorNotEnoughSpace = 5
// error reported when bits are overread.
const errorOverread = 6
+// useSafeDecodeSync reports whether decodeSyncSimple must use the bounds-exact
+// ("safe") copy variants for the current buffer geometry.
+//
+// When the output and literal buffers have compressedBlockOverAlloc (16)
+// bytes of slack past their logical use, the assembly may use extended
+// memory copies that read and write in 16-byte blocks, overrunning the end
+// of a literal run or match by up to 15 bytes. Otherwise it must use the
+// bounds-exact ("safe") copies. This mirrors the analogous, always-dynamic
+// selection in executeSimple below.
+//
+// The unsafe copies were disabled in #644 (2022) as a mitigation for a
+// crash, but that crash's root cause — an unguarded bitReader overread that
+// produced out-of-range match offsets/lengths — was fixed three days later
+// in #645, which also added the fuzz corpus that has guarded this path since.
+// See #1168. An asan-instrumented fuzz job (see .github/workflows/go.yml)
+// covers the extended-copy path, which -race and plain fuzzing cannot.
+func (s *sequenceDecs) useSafeDecodeSync() bool {
+ if s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSizeAlloc {
+ return true
+ }
+ if s.maxSyncLen > 0 && cap(s.out)-len(s.out)-compressedBlockOverAlloc < int(s.maxSyncLen) {
+ return true
+ }
+ if cap(s.literals) < len(s.literals)+compressedBlockOverAlloc {
+ return true
+ }
+ return false
+}
+
// decode sequences from the stream with the provided history but without a dictionary.
func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
if len(s.dict) > 0 {
@@ -86,9 +115,7 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
return false, nil
}
- // FIXME: Using unsafe memory copies leads to rare, random crashes
- // with fuzz testing. It is therefore disabled for now.
- const useSafe = true
+ useSafe := s.useSafeDecodeSync()
br := s.br
diff --git a/vendor/github.com/moby/buildkit/api/services/control/control.pb.go b/vendor/github.com/moby/buildkit/api/services/control/control.pb.go
index 6d4ee62b15dc..6273d1e1b51b 100644
--- a/vendor/github.com/moby/buildkit/api/services/control/control.pb.go
+++ b/vendor/github.com/moby/buildkit/api/services/control/control.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/api/services/control/control.proto
diff --git a/vendor/github.com/moby/buildkit/api/services/control/control_grpc.pb.go b/vendor/github.com/moby/buildkit/api/services/control/control_grpc.pb.go
index e09aa8ecf0b9..0b88d2266f73 100644
--- a/vendor/github.com/moby/buildkit/api/services/control/control_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/api/services/control/control_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/api/services/control/control.proto
diff --git a/vendor/github.com/moby/buildkit/api/types/worker.pb.go b/vendor/github.com/moby/buildkit/api/types/worker.pb.go
index 4d3015a47737..e73bd530300f 100644
--- a/vendor/github.com/moby/buildkit/api/types/worker.pb.go
+++ b/vendor/github.com/moby/buildkit/api/types/worker.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/api/types/worker.proto
diff --git a/vendor/github.com/moby/buildkit/client/connhelper/ssh/ssh.go b/vendor/github.com/moby/buildkit/client/connhelper/ssh/ssh.go
index e3666b572f2a..5475691ad6d8 100644
--- a/vendor/github.com/moby/buildkit/client/connhelper/ssh/ssh.go
+++ b/vendor/github.com/moby/buildkit/client/connhelper/ssh/ssh.go
@@ -66,7 +66,7 @@ func SpecFromURL(u *url.URL) (*Spec, error) {
}
}
if sp.Host == "" {
- return nil, errors.Errorf("no host specified")
+ return nil, errors.New("no host specified")
}
if u.RawQuery != "" {
return nil, errors.Errorf("extra query after the host: %q", u.RawQuery)
diff --git a/vendor/github.com/moby/buildkit/client/llb/definition.go b/vendor/github.com/moby/buildkit/client/llb/definition.go
index 9a54330ba08a..33e996bea8ec 100644
--- a/vendor/github.com/moby/buildkit/client/llb/definition.go
+++ b/vendor/github.com/moby/buildkit/client/llb/definition.go
@@ -150,7 +150,7 @@ func (d *DefinitionOp) Validate(context.Context, *Constraints) error {
// It is possible for d.index >= len(d.ops[d.dgst]) when depending on scratch
// images.
if d.index < 0 {
- return errors.Errorf("invalid definition op with invalid index")
+ return errors.New("invalid definition op with invalid index")
}
return nil
@@ -158,7 +158,7 @@ func (d *DefinitionOp) Validate(context.Context, *Constraints) error {
func (d *DefinitionOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, []*SourceLocation, error) {
if d.dgst == "" {
- return "", nil, nil, nil, errors.Errorf("cannot marshal empty definition op")
+ return "", nil, nil, nil, errors.New("cannot marshal empty definition op")
}
if err := d.Validate(ctx, c); err != nil {
diff --git a/vendor/github.com/moby/buildkit/client/llb/exec.go b/vendor/github.com/moby/buildkit/client/llb/exec.go
index ca6d58b837e3..edc9ff269ab3 100644
--- a/vendor/github.com/moby/buildkit/client/llb/exec.go
+++ b/vendor/github.com/moby/buildkit/client/llb/exec.go
@@ -111,7 +111,7 @@ func (e *ExecOp) Validate(ctx context.Context, c *Constraints) error {
return err
}
if len(args) == 0 {
- return errors.Errorf("arguments are required")
+ return errors.New("arguments are required")
}
cwd, err := getDir(e.base)(ctx, c)
if err != nil {
@@ -364,7 +364,7 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
inputIndex := pb.InputIndex(len(pop.Inputs))
if m.source != nil {
if m.tmpfs {
- return "", nil, nil, nil, errors.Errorf("tmpfs mounts must use scratch")
+ return "", nil, nil, nil, errors.New("tmpfs mounts must use scratch")
}
inp, err := m.source.ToInput(ctx, c)
if err != nil {
diff --git a/vendor/github.com/moby/buildkit/client/llb/fileop.go b/vendor/github.com/moby/buildkit/client/llb/fileop.go
index 9bd23a91d6e9..847ff50fecd3 100644
--- a/vendor/github.com/moby/buildkit/client/llb/fileop.go
+++ b/vendor/github.com/moby/buildkit/client/llb/fileop.go
@@ -703,7 +703,7 @@ func (f *FileOp) Validate(context.Context, *Constraints) error {
return nil
}
if f.action == nil {
- return errors.Errorf("action is required")
+ return errors.New("action is required")
}
f.isValidated = true
return nil
@@ -805,7 +805,7 @@ func (ms *marshalState) add(fa *FileAction, c *Constraints) (*fileActionState, e
}
st.input2Relative = &src.target
} else {
- return nil, errors.Errorf("invalid empty source for copy")
+ return nil, errors.New("invalid empty source for copy")
}
}
diff --git a/vendor/github.com/moby/buildkit/client/llb/merge.go b/vendor/github.com/moby/buildkit/client/llb/merge.go
index 880dc1e68ca5..a3c5d977122d 100644
--- a/vendor/github.com/moby/buildkit/client/llb/merge.go
+++ b/vendor/github.com/moby/buildkit/client/llb/merge.go
@@ -26,7 +26,7 @@ func NewMerge(inputs []State, c Constraints) *MergeOp {
func (m *MergeOp) Validate(ctx context.Context, constraints *Constraints) error {
if len(m.inputs) < 2 {
- return errors.Errorf("merge must have at least 2 inputs")
+ return errors.New("merge must have at least 2 inputs")
}
return nil
}
diff --git a/vendor/github.com/moby/buildkit/client/llb/passthrough.go b/vendor/github.com/moby/buildkit/client/llb/passthrough.go
index 3c7a215c9cac..19c64277b4a9 100644
--- a/vendor/github.com/moby/buildkit/client/llb/passthrough.go
+++ b/vendor/github.com/moby/buildkit/client/llb/passthrough.go
@@ -55,13 +55,13 @@ func NewPassthrough(id string, inputs []PassthroughInput, opts ...ConstraintsOpt
func (p *PassthroughOp) Validate(context.Context, *Constraints) error {
if len(p.inputs) == 0 {
- return errors.Errorf("passthrough must have at least one input")
+ return errors.New("passthrough must have at least one input")
}
if p.id == "" {
- return errors.Errorf("passthrough requires an id")
+ return errors.New("passthrough requires an id")
}
if len(p.outputMap) == 0 {
- return errors.Errorf("passthrough must have at least one output")
+ return errors.New("passthrough must have at least one output")
}
for _, input := range p.outputMap {
if input < 0 || input >= len(p.inputs) {
diff --git a/vendor/github.com/moby/buildkit/client/llb/source.go b/vendor/github.com/moby/buildkit/client/llb/source.go
index 4ca5ceed07fb..cf79fa56687a 100644
--- a/vendor/github.com/moby/buildkit/client/llb/source.go
+++ b/vendor/github.com/moby/buildkit/client/llb/source.go
@@ -44,7 +44,7 @@ func (s *SourceOp) Validate(ctx context.Context, c *Constraints) error {
return s.err
}
if s.id == "" {
- return errors.Errorf("source identifier can't be empty")
+ return errors.New("source identifier can't be empty")
}
return nil
}
@@ -140,9 +140,9 @@ func ImageBlob(ref string, opts ...ImageBlobOption) State {
r, err := reference.ParseNormalizedNamed(ref)
if err == nil {
if _, tagged := r.(reference.Tagged); tagged {
- err = errors.Errorf("tagged image reference not allowed for blob reference")
+ err = errors.New("tagged image reference not allowed for blob reference")
} else if ref, ok := r.(reference.Digested); !ok {
- err = errors.Errorf("checksum required in blob reference")
+ err = errors.New("checksum required in blob reference")
} else {
digested = ref
}
@@ -194,9 +194,9 @@ func OCILayoutBlob(ref string, opts ...ImageBlobOption) State {
r, err := reference.ParseNormalizedNamed(ref)
if err == nil {
if _, tagged := r.(reference.Tagged); tagged {
- err = errors.Errorf("tagged image reference not allowed for blob reference")
+ err = errors.New("tagged image reference not allowed for blob reference")
} else if ref, ok := r.(reference.Digested); !ok {
- err = errors.Errorf("checksum required in blob reference")
+ err = errors.New("checksum required in blob reference")
} else {
digested = ref
}
@@ -483,6 +483,10 @@ func Git(url, fragment string, opts ...GitOption) State {
addCap(&gi.Constraints, pb.CapSourceGitMTime)
}
+ if gi.Advice {
+ attrs[pb.AttrGitAdvice] = "true"
+ }
+
if gi.FetchByCommit {
attrs[pb.AttrGitFetchByCommit] = "true"
addCap(&gi.Constraints, pb.CapSourceGitFetchByCommit)
@@ -531,6 +535,7 @@ type GitInfo struct {
SubDir string
SkipSubmodules bool
MTime string
+ Advice bool
Bundle string
BundleOCISessionID string
BundleOCIStoreID string
@@ -570,6 +575,14 @@ func GitMTime(v string) GitOption {
})
}
+// GitAdvice controls whether Git advice messages are emitted while resolving
+// this git source.
+func GitAdvice(enabled bool) GitOption {
+ return gitOptionFunc(func(gi *GitInfo) {
+ gi.Advice = enabled
+ })
+}
+
func KeepGitDir() GitOption {
return gitOptionFunc(func(gi *GitInfo) {
gi.KeepGitDir = true
diff --git a/vendor/github.com/moby/buildkit/client/solve.go b/vendor/github.com/moby/buildkit/client/solve.go
index 2285c568ac1a..12d68b0c452c 100644
--- a/vendor/github.com/moby/buildkit/client/solve.go
+++ b/vendor/github.com/moby/buildkit/client/solve.go
@@ -121,7 +121,7 @@ func (c *Client) solve(ctx context.Context, def *llb.Definition, runGateway runG
if s == nil {
if opt.SessionPreInitialized {
- return nil, errors.Errorf("no session provided for preinitialized option")
+ return nil, errors.New("no session provided for preinitialized option")
}
s, err = session.NewSession(statusContext, opt.SharedKey)
if err != nil {
diff --git a/vendor/github.com/moby/buildkit/cmd/buildkitd/config/config.go b/vendor/github.com/moby/buildkit/cmd/buildkitd/config/config.go
index 42b1b4026661..e029a73dd305 100644
--- a/vendor/github.com/moby/buildkit/cmd/buildkitd/config/config.go
+++ b/vendor/github.com/moby/buildkit/cmd/buildkitd/config/config.go
@@ -221,7 +221,7 @@ type DNSConfig struct {
type HistoryConfig struct {
MaxAge Duration `toml:"maxAge"`
- MaxEntries int64 `toml:"maxEntries"`
+ MaxEntries *int64 `toml:"maxEntries"`
}
type DockerfileFrontendConfig struct {
diff --git a/vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go b/vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go
index 209562d35f65..d07df3412cf3 100644
--- a/vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go
+++ b/vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go
@@ -274,7 +274,7 @@ func (r *Result) PrintWarnings(out io.Writer) {
fmt.Fprintf(out, "[WARNING]: %s\n", w.Short)
}
if len(r.Warnings) > 0 {
- fmt.Fprintf(out, "[WARNING]: Empty continuation lines will become errors in a future release.\n")
+ fmt.Fprint(out, "[WARNING]: Empty continuation lines will become errors in a future release.\n")
}
}
diff --git a/vendor/github.com/moby/buildkit/frontend/dockerui/config.go b/vendor/github.com/moby/buildkit/frontend/dockerui/config.go
index 5bbe333dcd59..fed608f4574e 100644
--- a/vendor/github.com/moby/buildkit/frontend/dockerui/config.go
+++ b/vendor/github.com/moby/buildkit/frontend/dockerui/config.go
@@ -57,6 +57,7 @@ const (
keyHostnameArg = "build-arg:BUILDKIT_SANDBOX_HOSTNAME"
keyDockerfileLintArg = "build-arg:BUILDKIT_DOCKERFILE_CHECK"
keyContextKeepGitDirArg = "build-arg:BUILDKIT_CONTEXT_KEEP_GIT_DIR"
+ keyGitAdviceArg = "build-arg:BUILDKIT_GIT_ADVICE"
)
type Config struct {
@@ -68,6 +69,7 @@ type Config struct {
ImageResolveMode llb.ResolveMode
Labels map[string]string
NetworkMode pb.NetMode
+ GitAdvice bool
ShmSize int64
Target string
Ulimits []*pb.Ulimit
@@ -233,7 +235,7 @@ func (bc *Client) init() error {
return errors.Errorf("invalid boolean value for multi-platform: %s", v)
}
if !b && multiPlatform {
- return errors.Errorf("conflicting config: returning multiple target platforms is not allowed")
+ return errors.New("conflicting config: returning multiple target platforms is not allowed")
}
multiPlatform = b
}
@@ -285,7 +287,7 @@ func (bc *Client) init() error {
}
}
if ref == nil {
- return errors.Errorf("sbom scanner cannot be empty")
+ return errors.New("sbom scanner cannot be empty")
}
bc.SBOM = &SBOM{
@@ -311,6 +313,12 @@ func (bc *Client) init() error {
return errors.Wrapf(err, "failed to parse %s", keyDockerfileLintArg)
}
}
+ if v := opts[keyGitAdviceArg]; v != "" {
+ bc.GitAdvice, err = strconv.ParseBool(v)
+ if err != nil {
+ return errors.Wrapf(err, "failed to parse %s", keyGitAdviceArg)
+ }
+ }
bc.localsSessionIDs = parseLocalSessionIDs(opts)
diff --git a/vendor/github.com/moby/buildkit/frontend/dockerui/context.go b/vendor/github.com/moby/buildkit/frontend/dockerui/context.go
index 6fb3ebd1be60..4848c04d41eb 100644
--- a/vendor/github.com/moby/buildkit/frontend/dockerui/context.go
+++ b/vendor/github.com/moby/buildkit/frontend/dockerui/context.go
@@ -4,6 +4,7 @@ import (
"archive/tar"
"bytes"
"context"
+ "encoding/binary"
"io"
"maps"
"path/filepath"
@@ -90,6 +91,7 @@ func (bc *Client) initContext(ctx context.Context) (*buildContext, error) {
if opts[buildArgPrefix+"SOURCE_DATE_EPOCH"] != "" {
extraGitOpts = append(extraGitOpts, llb.GitMTimeCommit())
}
+ extraGitOpts = append(extraGitOpts, gitAdviceOpts(bc.GitAdvice)...)
if st, ok, err := DetectGitContext(opts[localNameContext], keepGit, extraGitOpts...); ok {
if err != nil {
return nil, err
@@ -325,6 +327,13 @@ func DetectGitContext(ref string, keepGit *bool, opts ...llb.GitOption) (*llb.St
return &st, true, nil
}
+func gitAdviceOpts(enabled bool) []llb.GitOption {
+ if enabled {
+ return []llb.GitOption{llb.GitAdvice(true)}
+ }
+ return nil
+}
+
func DetectHTTPContext(ref string) (*llb.State, string, bool) {
filename := "context"
if httpPrefix.MatchString(ref) {
@@ -339,15 +348,16 @@ func isArchive(header []byte) bool {
{0x42, 0x5A, 0x68}, // bzip2
{0x1F, 0x8B, 0x08}, // gzip
{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00}, // xz
+ {0x28, 0xB5, 0x2F, 0xFD}, // zstd
} {
- if len(header) < len(m) {
- continue
- }
- if bytes.Equal(m, header[:len(m)]) {
+ if bytes.HasPrefix(header, m) {
return true
}
}
-
+ // zstd skippable frames use magic numbers from 0x184D2A50 to 0x184D2A5F
+ if len(header) >= 8 && binary.LittleEndian.Uint32(header[:4])&0xFFFFFFF0 == 0x184D2A50 {
+ return true
+ }
r := tar.NewReader(bytes.NewBuffer(header))
_, err := r.Next()
return err == nil
diff --git a/vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go b/vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go
index 06e396e05ef7..1d27ddcf488e 100644
--- a/vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go
+++ b/vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go
@@ -141,7 +141,7 @@ func (nc *NamedContext) load(ctx context.Context, count int) (*llb.State, *docke
}
return &st, &img, nil
case "git":
- st, ok, err := DetectGitContext(nc.input, nil)
+ st, ok, err := DetectGitContext(nc.input, nil, gitAdviceOpts(nc.bc.GitAdvice)...)
if !ok {
return nil, nil, errors.Errorf("invalid git context %s", nc.input)
}
@@ -150,7 +150,7 @@ func (nc *NamedContext) load(ctx context.Context, count int) (*llb.State, *docke
}
return st, nil, nil
case "http", "https":
- st, ok, err := DetectGitContext(nc.input, nil)
+ st, ok, err := DetectGitContext(nc.input, nil, gitAdviceOpts(nc.bc.GitAdvice)...)
if ok {
if err != nil {
return nil, nil, err
diff --git a/vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go b/vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go
index 6ff39cc3b3b4..763742243701 100644
--- a/vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go
+++ b/vendor/github.com/moby/buildkit/frontend/gateway/client/attestation.go
@@ -9,7 +9,7 @@ import (
func AttestationToPB[T any](a *result.Attestation[T]) (*pb.Attestation, error) {
if a.ContentFunc != nil {
- return nil, errors.Errorf("attestation callback cannot be sent through gateway")
+ return nil, errors.New("attestation callback cannot be sent through gateway")
}
subjects := make([]*pb.InTotoSubject, len(a.InToto.Subjects))
@@ -32,12 +32,12 @@ func AttestationToPB[T any](a *result.Attestation[T]) (*pb.Attestation, error) {
func AttestationFromPB[T any](a *pb.Attestation) (*result.Attestation[T], error) {
if a == nil {
- return nil, errors.Errorf("invalid nil attestation")
+ return nil, errors.New("invalid nil attestation")
}
subjects := make([]result.InTotoSubject, len(a.InTotoSubjects))
for i, subject := range a.InTotoSubjects {
if subject == nil {
- return nil, errors.Errorf("invalid nil attestation subject")
+ return nil, errors.New("invalid nil attestation subject")
}
subjects[i] = result.InTotoSubject{
Kind: subject.Kind,
diff --git a/vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go b/vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
index 32830df0412e..34eeb70909dc 100644
--- a/vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
+++ b/vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
@@ -1117,7 +1117,7 @@ func (ctr *container) Start(ctx context.Context, req client.StartRequest) (clien
msg, _ := msgs.Recv(ctx)
if msg == nil {
- return nil, errors.Errorf("failed to receive started message")
+ return nil, errors.New("failed to receive started message")
}
started := msg.GetStarted()
if started == nil {
@@ -1378,7 +1378,7 @@ func (r *reference) ToState() (st llb.State, err error) {
}
if r.def == nil {
- return st, errors.Errorf("gateway did not return reference with definition")
+ return st, errors.New("gateway did not return reference with definition")
}
defop, err := llb.NewDefinitionOp(r.def)
diff --git a/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go b/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go
index 16880923dfa7..28ddeeadd13a 100644
--- a/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go
+++ b/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
diff --git a/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway_grpc.pb.go b/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway_grpc.pb.go
index c091c0edb822..e2daff71be6f 100644
--- a/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
diff --git a/vendor/github.com/moby/buildkit/frontend/subrequests/describe.go b/vendor/github.com/moby/buildkit/frontend/subrequests/describe.go
index 832c9a839ff9..3e5c737a7a7a 100644
--- a/vendor/github.com/moby/buildkit/frontend/subrequests/describe.go
+++ b/vendor/github.com/moby/buildkit/frontend/subrequests/describe.go
@@ -55,7 +55,7 @@ func Describe(ctx context.Context, c client.Client) ([]Request, error) {
dt, ok := res.Metadata["result.json"]
if !ok {
- return nil, errors.Errorf("no result.json metadata in response")
+ return nil, errors.New("no result.json metadata in response")
}
var reqs []Request
@@ -72,7 +72,7 @@ func PrintDescribe(dt []byte, w io.Writer) error {
}
tw := tabwriter.NewWriter(w, 0, 0, 1, ' ', 0)
- fmt.Fprintf(tw, "NAME\tVERSION\tDESCRIPTION\n")
+ fmt.Fprint(tw, "NAME\tVERSION\tDESCRIPTION\n")
for _, r := range d {
fmt.Fprintf(tw, "%s\t%s\t%s\n", strings.TrimPrefix(r.Name, "frontend."), r.Version, r.Description)
diff --git a/vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go b/vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go
index 3b1e980ee39d..ffc7632cab20 100644
--- a/vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go
+++ b/vendor/github.com/moby/buildkit/frontend/subrequests/lint/lint.go
@@ -202,12 +202,12 @@ func (results *LintResults) PrintErrorTo(w io.Writer, scb SourceInfoMap) {
func (results *LintResults) validateWarnings() error {
for _, warning := range results.Warnings {
if int(warning.Location.SourceIndex) >= len(results.Sources) {
- return errors.Errorf("sourceIndex is out of range")
+ return errors.New("sourceIndex is out of range")
}
if warning.Location.SourceIndex > 0 {
warningSource := results.Sources[warning.Location.SourceIndex]
if warningSource == nil {
- return errors.Errorf("sourceIndex points to nil source")
+ return errors.New("sourceIndex points to nil source")
}
}
}
diff --git a/vendor/github.com/moby/buildkit/frontend/subrequests/outline/outline.go b/vendor/github.com/moby/buildkit/frontend/subrequests/outline/outline.go
index c0a376b0f94a..04421ff1d3ef 100644
--- a/vendor/github.com/moby/buildkit/frontend/subrequests/outline/outline.go
+++ b/vendor/github.com/moby/buildkit/frontend/subrequests/outline/outline.go
@@ -106,7 +106,7 @@ func PrintOutline(dt []byte, w io.Writer) error {
if len(o.Args) > 0 {
tw := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0)
- fmt.Fprintf(tw, "BUILD ARG\tVALUE\tDESCRIPTION\n")
+ fmt.Fprint(tw, "BUILD ARG\tVALUE\tDESCRIPTION\n")
for _, a := range o.Args {
fmt.Fprintf(tw, "%s\t%s\t%s\n", a.Name, a.Value, a.Description)
}
@@ -116,7 +116,7 @@ func PrintOutline(dt []byte, w io.Writer) error {
if len(o.Secrets) > 0 {
tw := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0)
- fmt.Fprintf(tw, "SECRET\tREQUIRED\n")
+ fmt.Fprint(tw, "SECRET\tREQUIRED\n")
for _, s := range o.Secrets {
b := ""
if s.Required {
@@ -130,7 +130,7 @@ func PrintOutline(dt []byte, w io.Writer) error {
if len(o.SSH) > 0 {
tw := tabwriter.NewWriter(w, 0, 0, 3, ' ', 0)
- fmt.Fprintf(tw, "SSH\tREQUIRED\n")
+ fmt.Fprint(tw, "SSH\tREQUIRED\n")
for _, s := range o.SSH {
b := ""
if s.Required {
diff --git a/vendor/github.com/moby/buildkit/frontend/subrequests/targets/targets.go b/vendor/github.com/moby/buildkit/frontend/subrequests/targets/targets.go
index d9d9dcd9842f..ebfadeca9efe 100644
--- a/vendor/github.com/moby/buildkit/frontend/subrequests/targets/targets.go
+++ b/vendor/github.com/moby/buildkit/frontend/subrequests/targets/targets.go
@@ -66,7 +66,7 @@ func PrintTargets(dt []byte, w io.Writer) error {
}
tw := tabwriter.NewWriter(w, 0, 0, 1, ' ', 0)
- fmt.Fprintf(tw, "TARGET\tDESCRIPTION\n")
+ fmt.Fprint(tw, "TARGET\tDESCRIPTION\n")
for _, t := range l.Targets {
name := t.Name
diff --git a/vendor/github.com/moby/buildkit/session/auth/auth.pb.go b/vendor/github.com/moby/buildkit/session/auth/auth.pb.go
index 32e7be7c62b2..80bf0ac21486 100644
--- a/vendor/github.com/moby/buildkit/session/auth/auth.pb.go
+++ b/vendor/github.com/moby/buildkit/session/auth/auth.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/auth/auth.proto
diff --git a/vendor/github.com/moby/buildkit/session/auth/auth_grpc.pb.go b/vendor/github.com/moby/buildkit/session/auth/auth_grpc.pb.go
index b7a1b74229b4..33d1b9745349 100644
--- a/vendor/github.com/moby/buildkit/session/auth/auth_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/auth/auth_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/auth/auth.proto
diff --git a/vendor/github.com/moby/buildkit/session/exporter/exporter.pb.go b/vendor/github.com/moby/buildkit/session/exporter/exporter.pb.go
index 6b25e780ee1d..c6103d4a48cb 100644
--- a/vendor/github.com/moby/buildkit/session/exporter/exporter.pb.go
+++ b/vendor/github.com/moby/buildkit/session/exporter/exporter.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/exporter/exporter.proto
diff --git a/vendor/github.com/moby/buildkit/session/exporter/exporter_grpc.pb.go b/vendor/github.com/moby/buildkit/session/exporter/exporter_grpc.pb.go
index af1559be5a32..e6ad8bfb090d 100644
--- a/vendor/github.com/moby/buildkit/session/exporter/exporter_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/exporter/exporter_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/exporter/exporter.proto
diff --git a/vendor/github.com/moby/buildkit/session/filesync/filesync.pb.go b/vendor/github.com/moby/buildkit/session/filesync/filesync.pb.go
index ce74423882b7..e4e216b632c9 100644
--- a/vendor/github.com/moby/buildkit/session/filesync/filesync.pb.go
+++ b/vendor/github.com/moby/buildkit/session/filesync/filesync.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/filesync/filesync.proto
diff --git a/vendor/github.com/moby/buildkit/session/filesync/filesync_grpc.pb.go b/vendor/github.com/moby/buildkit/session/filesync/filesync_grpc.pb.go
index 4a6a01d1db90..96a69f4506c8 100644
--- a/vendor/github.com/moby/buildkit/session/filesync/filesync_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/filesync/filesync_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/filesync/filesync.proto
diff --git a/vendor/github.com/moby/buildkit/session/grpc.go b/vendor/github.com/moby/buildkit/session/grpc.go
index 5e3291f5883a..e23a406aa899 100644
--- a/vendor/github.com/moby/buildkit/session/grpc.go
+++ b/vendor/github.com/moby/buildkit/session/grpc.go
@@ -70,7 +70,7 @@ func grpcClientConn(ctx context.Context, conn net.Conn, opts map[string][]string
var dialCount atomic.Int64
dialer := grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
if c := dialCount.Add(1); c > 1 {
- return nil, errors.Errorf("only one connection allowed")
+ return nil, errors.New("only one connection allowed")
}
return conn, nil
})
diff --git a/vendor/github.com/moby/buildkit/session/header.go b/vendor/github.com/moby/buildkit/session/header.go
new file mode 100644
index 000000000000..e250f3ba5aa6
--- /dev/null
+++ b/vendor/github.com/moby/buildkit/session/header.go
@@ -0,0 +1,23 @@
+package session
+
+import "net/url"
+
+func encodeHeaderValue(input string) (string, bool) {
+ for _, r := range input {
+ if r < 0x20 || r > 0x7e {
+ return url.QueryEscape(input), true
+ }
+ }
+ return input, false
+}
+
+func decodeHeaderValue(input string, encoded bool) string {
+ if !encoded {
+ return input
+ }
+ out, err := url.QueryUnescape(input)
+ if err != nil {
+ return input
+ }
+ return out
+}
diff --git a/vendor/github.com/moby/buildkit/session/manager.go b/vendor/github.com/moby/buildkit/session/manager.go
index 54792a49d84b..8419494f55b7 100644
--- a/vendor/github.com/moby/buildkit/session/manager.go
+++ b/vendor/github.com/moby/buildkit/session/manager.go
@@ -4,6 +4,7 @@ import (
"context"
"net"
"net/http"
+ "strconv"
"strings"
"sync"
@@ -105,7 +106,7 @@ func (sm *Manager) handleConn(ctx context.Context, conn net.Conn, opts map[strin
h := http.Header(opts)
id := h.Get(headerSessionID)
- sharedKey := h.Get(headerSessionSharedKey)
+ sharedKey := decodeHeaderValue(h.Get(headerSessionSharedKey), headerValueIsEncoded(h, headerSessionSharedKeyEncoded))
ctx, cc, err := grpcClientConn(ctx, conn, opts)
if err != nil {
@@ -213,3 +214,12 @@ func canonicalHeaders(in map[string][]string) map[string][]string {
}
return out
}
+
+func headerValueIsEncoded(h http.Header, key string) bool {
+ v := h.Get(key)
+ if v == "" {
+ return false
+ }
+ encoded, _ := strconv.ParseBool(v)
+ return encoded
+}
diff --git a/vendor/github.com/moby/buildkit/session/secrets/secrets.go b/vendor/github.com/moby/buildkit/session/secrets/secrets.go
index d18775851040..3f7dea3ef862 100644
--- a/vendor/github.com/moby/buildkit/session/secrets/secrets.go
+++ b/vendor/github.com/moby/buildkit/session/secrets/secrets.go
@@ -13,7 +13,7 @@ type SecretStore interface {
GetSecret(context.Context, string) ([]byte, error)
}
-var ErrNotFound = errors.Errorf("not found")
+var ErrNotFound = errors.New("not found")
func GetSecret(ctx context.Context, c session.Caller, id string) ([]byte, error) {
ctx = c.Context(ctx)
diff --git a/vendor/github.com/moby/buildkit/session/secrets/secrets.pb.go b/vendor/github.com/moby/buildkit/session/secrets/secrets.pb.go
index abb70feca7e1..6d504882b33d 100644
--- a/vendor/github.com/moby/buildkit/session/secrets/secrets.pb.go
+++ b/vendor/github.com/moby/buildkit/session/secrets/secrets.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/secrets/secrets.proto
diff --git a/vendor/github.com/moby/buildkit/session/secrets/secrets_grpc.pb.go b/vendor/github.com/moby/buildkit/session/secrets/secrets_grpc.pb.go
index da2524a1da74..65d562a42678 100644
--- a/vendor/github.com/moby/buildkit/session/secrets/secrets_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/secrets/secrets_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/secrets/secrets.proto
diff --git a/vendor/github.com/moby/buildkit/session/secrets/secretsprovider/store.go b/vendor/github.com/moby/buildkit/session/secrets/secretsprovider/store.go
index 922036aed67b..35bb2f9c8575 100644
--- a/vendor/github.com/moby/buildkit/session/secrets/secretsprovider/store.go
+++ b/vendor/github.com/moby/buildkit/session/secrets/secretsprovider/store.go
@@ -19,7 +19,7 @@ func NewStore(files []Source) (secrets.SecretStore, error) {
m := map[string]Source{}
for _, f := range files {
if f.ID == "" {
- return nil, errors.Errorf("secret missing ID")
+ return nil, errors.New("secret missing ID")
}
if f.Env == "" && f.FilePath == "" {
if _, ok := os.LookupEnv(f.ID); ok {
diff --git a/vendor/github.com/moby/buildkit/session/session.go b/vendor/github.com/moby/buildkit/session/session.go
index b67e25ecee7b..2d0f6af30a6b 100644
--- a/vendor/github.com/moby/buildkit/session/session.go
+++ b/vendor/github.com/moby/buildkit/session/session.go
@@ -18,10 +18,11 @@ import (
)
const (
- headerSessionID = "X-Docker-Expose-Session-Uuid"
- headerSessionName = "X-Docker-Expose-Session-Name"
- headerSessionSharedKey = "X-Docker-Expose-Session-Sharedkey"
- headerSessionMethod = "X-Docker-Expose-Session-Grpc-Method"
+ headerSessionID = "X-Docker-Expose-Session-Uuid"
+ headerSessionName = "X-Docker-Expose-Session-Name"
+ headerSessionSharedKey = "X-Docker-Expose-Session-Sharedkey"
+ headerSessionSharedKeyEncoded = headerSessionSharedKey + "-Encoded"
+ headerSessionMethod = "X-Docker-Expose-Session-Grpc-Method"
)
var propagators = propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})
@@ -101,7 +102,11 @@ func (s *Session) Run(ctx context.Context, dialer Dialer) error {
meta := make(map[string][]string)
meta[headerSessionID] = []string{s.id}
- meta[headerSessionSharedKey] = []string{s.sharedKey}
+ sharedKey, encoded := encodeHeaderValue(s.sharedKey)
+ meta[headerSessionSharedKey] = []string{sharedKey}
+ if encoded {
+ meta[headerSessionSharedKeyEncoded] = []string{"1"}
+ }
for name, svc := range s.grpcServer.GetServiceInfo() {
for _, method := range svc.Methods {
diff --git a/vendor/github.com/moby/buildkit/session/sshforward/ssh.pb.go b/vendor/github.com/moby/buildkit/session/sshforward/ssh.pb.go
index 8da3abd23b92..c921f023d5d7 100644
--- a/vendor/github.com/moby/buildkit/session/sshforward/ssh.pb.go
+++ b/vendor/github.com/moby/buildkit/session/sshforward/ssh.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/sshforward/ssh.proto
diff --git a/vendor/github.com/moby/buildkit/session/sshforward/ssh_grpc.pb.go b/vendor/github.com/moby/buildkit/session/sshforward/ssh_grpc.pb.go
index c18f4a6ecc21..1a79ef3794c6 100644
--- a/vendor/github.com/moby/buildkit/session/sshforward/ssh_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/sshforward/ssh_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/sshforward/ssh.proto
diff --git a/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider.go b/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider.go
index 78930203d863..d9b3ea4bb9f8 100644
--- a/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider.go
+++ b/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider.go
@@ -139,7 +139,7 @@ func toDialer(paths []string, raw bool) (func(context.Context) (net.Conn, error)
continue
}
if raw {
- return nil, errors.Errorf("raw mode only supported with socket paths")
+ return nil, errors.New("raw mode only supported with socket paths")
}
f, err := os.Open(p) //nolint:gosec // SSH key paths are explicit user inputs and may intentionally be symlinks.
@@ -159,7 +159,7 @@ func toDialer(paths []string, raw bool) (func(context.Context) (net.Conn, error)
// If parsing the file fails, check to see if it kind of looks like socket-shaped.
if runtime.GOOS == "windows" && strings.Contains(string(dt), "socket") {
if keys {
- return nil, errors.Errorf("invalid combination of keys and sockets")
+ return nil, errors.New("invalid combination of keys and sockets")
}
socket = &socketDialer{path: p, dialer: unixSocketDialer}
continue
@@ -176,7 +176,7 @@ func toDialer(paths []string, raw bool) (func(context.Context) (net.Conn, error)
if socket != nil {
if keys {
- return nil, errors.Errorf("invalid combination of keys and sockets")
+ return nil, errors.New("invalid combination of keys and sockets")
}
if raw {
return func(ctx context.Context) (net.Conn, error) {
@@ -203,21 +203,21 @@ type readOnlyAgent struct {
}
func (a *readOnlyAgent) Add(_ agent.AddedKey) error {
- return errors.Errorf("adding new keys not allowed by buildkit")
+ return errors.New("adding new keys not allowed by buildkit")
}
func (a *readOnlyAgent) Remove(_ ssh.PublicKey) error {
- return errors.Errorf("removing keys not allowed by buildkit")
+ return errors.New("removing keys not allowed by buildkit")
}
func (a *readOnlyAgent) RemoveAll() error {
- return errors.Errorf("removing keys not allowed by buildkit")
+ return errors.New("removing keys not allowed by buildkit")
}
func (a *readOnlyAgent) Lock(_ []byte) error {
- return errors.Errorf("locking agent not allowed by buildkit")
+ return errors.New("locking agent not allowed by buildkit")
}
func (a *readOnlyAgent) Extension(_ string, _ []byte) ([]byte, error) {
- return nil, errors.Errorf("extensions not allowed by buildkit")
+ return nil, errors.New("extensions not allowed by buildkit")
}
diff --git a/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider_unix.go b/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider_unix.go
index 95b2591e1328..124e2558a8e5 100644
--- a/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider_unix.go
+++ b/vendor/github.com/moby/buildkit/session/sshforward/sshprovider/agentprovider_unix.go
@@ -7,7 +7,7 @@ import (
)
func getFallbackAgentPath() (string, error) {
- return "", errors.Errorf("make sure SSH_AUTH_SOCK is set")
+ return "", errors.New("make sure SSH_AUTH_SOCK is set")
}
func getWindowsPipeDialer(_ string) *socketDialer {
diff --git a/vendor/github.com/moby/buildkit/session/upload/upload.pb.go b/vendor/github.com/moby/buildkit/session/upload/upload.pb.go
index 33c82057db09..30320775d897 100644
--- a/vendor/github.com/moby/buildkit/session/upload/upload.pb.go
+++ b/vendor/github.com/moby/buildkit/session/upload/upload.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/session/upload/upload.proto
diff --git a/vendor/github.com/moby/buildkit/session/upload/upload_grpc.pb.go b/vendor/github.com/moby/buildkit/session/upload/upload_grpc.pb.go
index d9c3a55d0b34..5d5e9ebdeacf 100644
--- a/vendor/github.com/moby/buildkit/session/upload/upload_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/session/upload/upload_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/session/upload/upload.proto
diff --git a/vendor/github.com/moby/buildkit/solver/errdefs/errdefs.pb.go b/vendor/github.com/moby/buildkit/solver/errdefs/errdefs.pb.go
index cacfbfa21a85..5f733e348b0b 100644
--- a/vendor/github.com/moby/buildkit/solver/errdefs/errdefs.pb.go
+++ b/vendor/github.com/moby/buildkit/solver/errdefs/errdefs.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/solver/errdefs/errdefs.proto
diff --git a/vendor/github.com/moby/buildkit/solver/errdefs/source.go b/vendor/github.com/moby/buildkit/solver/errdefs/source.go
index 290ed06db010..6578213bdf03 100644
--- a/vendor/github.com/moby/buildkit/solver/errdefs/source.go
+++ b/vendor/github.com/moby/buildkit/solver/errdefs/source.go
@@ -89,7 +89,7 @@ func (s *Source) Print(w io.Writer) error {
}
fmt.Fprintf(w, " %3d | %s %s\n", i, pfx, lines[i-1])
}
- fmt.Fprintf(w, "--------------------\n")
+ fmt.Fprint(w, "--------------------\n")
return nil
}
diff --git a/vendor/github.com/moby/buildkit/solver/pb/attr.go b/vendor/github.com/moby/buildkit/solver/pb/attr.go
index 4089fce2c412..7a0a68d4ab78 100644
--- a/vendor/github.com/moby/buildkit/solver/pb/attr.go
+++ b/vendor/github.com/moby/buildkit/solver/pb/attr.go
@@ -12,6 +12,7 @@ const AttrGitMTime = "git.mtime"
const AttrGitFetchByCommit = "git.fetchbycommit"
const AttrGitBundle = "git.bundle"
const AttrGitCheckoutBundle = "git.checkoutbundle"
+const AttrGitAdvice = "git.advice"
const AttrGitSignatureVerifyPubKey = "git.sig.pubkey"
const AttrGitSignatureVerifyRejectExpired = "git.sig.rejectexpired"
diff --git a/vendor/github.com/moby/buildkit/solver/pb/ops.pb.go b/vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
index a99f456bb393..25fefea336b7 100644
--- a/vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
+++ b/vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/solver/pb/ops.proto
diff --git a/vendor/github.com/moby/buildkit/solver/result/result.go b/vendor/github.com/moby/buildkit/solver/result/result.go
index 7d1b66dfcd0b..4ce4c7dbf0f9 100644
--- a/vendor/github.com/moby/buildkit/solver/result/result.go
+++ b/vendor/github.com/moby/buildkit/solver/result/result.go
@@ -62,7 +62,7 @@ func (r *Result[T]) SingleRef() (T, error) {
var zero T
if r.Refs != nil && r.Ref == zero {
var t T
- return t, errors.Errorf("invalid map result")
+ return t, errors.New("invalid map result")
}
return r.Ref, nil
}
diff --git a/vendor/github.com/moby/buildkit/sourcepolicy/pb/policy.pb.go b/vendor/github.com/moby/buildkit/sourcepolicy/pb/policy.pb.go
index e97f51bc4250..22284e0c7c93 100644
--- a/vendor/github.com/moby/buildkit/sourcepolicy/pb/policy.pb.go
+++ b/vendor/github.com/moby/buildkit/sourcepolicy/pb/policy.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/sourcepolicy/pb/policy.proto
diff --git a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession.pb.go b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession.pb.go
index 0caf6971f5f4..94bf7230085c 100644
--- a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession.pb.go
+++ b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/sourcepolicy/policysession/policysession.proto
diff --git a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession_grpc.pb.go b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession_grpc.pb.go
index 78d8220dfa2d..208826a01b78 100644
--- a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession_grpc.pb.go
+++ b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/policysession_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.6.1
+// - protoc-gen-go-grpc v1.6.2
// - protoc v3.14.0
// source: github.com/moby/buildkit/sourcepolicy/policysession/policysession.proto
diff --git a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/provider.go b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/provider.go
index 88cdf39bed0f..072f5087b37d 100644
--- a/vendor/github.com/moby/buildkit/sourcepolicy/policysession/provider.go
+++ b/vendor/github.com/moby/buildkit/sourcepolicy/policysession/provider.go
@@ -26,7 +26,7 @@ func (p *PolicyProvider) CheckPolicy(ctx context.Context, req *CheckPolicyReques
return nil, err
}
if metareq != nil && decision != nil {
- return nil, errors.Errorf("cannot return both decision and meta request")
+ return nil, errors.New("cannot return both decision and meta request")
}
resp := &CheckPolicyResponse{}
if decision != nil {
diff --git a/vendor/github.com/moby/buildkit/util/apicaps/pb/caps.pb.go b/vendor/github.com/moby/buildkit/util/apicaps/pb/caps.pb.go
index 5a1c326932f4..344173ab4400 100644
--- a/vendor/github.com/moby/buildkit/util/apicaps/pb/caps.pb.go
+++ b/vendor/github.com/moby/buildkit/util/apicaps/pb/caps.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/util/apicaps/pb/caps.proto
diff --git a/vendor/github.com/moby/buildkit/util/contentutil/buffer.go b/vendor/github.com/moby/buildkit/util/contentutil/buffer.go
index 1627f90aada8..0673a147089e 100644
--- a/vendor/github.com/moby/buildkit/util/contentutil/buffer.go
+++ b/vendor/github.com/moby/buildkit/util/contentutil/buffer.go
@@ -206,7 +206,7 @@ func (w *bufferedWriter) Digest() digest.Digest {
func (w *bufferedWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opt ...content.Opt) error {
if w.buffer == nil {
- return errors.Errorf("can't commit already committed or closed")
+ return errors.New("can't commit already committed or closed")
}
if s := int64(w.buffer.Len()); size > 0 && size != s {
return errors.Errorf("unexpected commit size %d, expected %d", s, size)
diff --git a/vendor/github.com/moby/buildkit/util/contentutil/fetcher.go b/vendor/github.com/moby/buildkit/util/contentutil/fetcher.go
index 87e04691b296..b56a3ff52f91 100644
--- a/vendor/github.com/moby/buildkit/util/contentutil/fetcher.go
+++ b/vendor/github.com/moby/buildkit/util/contentutil/fetcher.go
@@ -38,7 +38,7 @@ func (p *fetchedProvider) ReaderAt(ctx context.Context, desc ocispecs.Descriptor
func (p *fetchedProvider) FetchReferrers(ctx context.Context, dgst digest.Digest, opts ...remotes.FetchReferrersOpt) ([]ocispecs.Descriptor, error) {
refs, ok := p.f.(remotes.ReferrersFetcher)
if !ok {
- return nil, errors.Errorf("fetcher does not support referrers")
+ return nil, errors.New("fetcher does not support referrers")
}
return refs.FetchReferrers(ctx, dgst, opts...)
}
@@ -61,7 +61,7 @@ func (r *readerAt) ReadAt(b []byte, off int64) (int, error) {
if ra, ok := r.Reader.(io.ReaderAt); ok {
return ra.ReadAt(b, off)
}
- return 0, errors.Errorf("unsupported offset")
+ return 0, errors.New("unsupported offset")
}
}
diff --git a/vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go b/vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
index 98c9d89f60a0..f5c5065785e6 100644
--- a/vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
+++ b/vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
@@ -20,6 +20,18 @@ func NewMultiProvider(base content.InfoReaderProvider) *MultiProvider {
}
}
+type sessionProvider interface {
+ ProviderForSession(session.Group) content.Provider
+}
+
+// ProviderForSession provides a session-bound content provider when supported.
+func ProviderForSession(p content.Provider, g session.Group) content.Provider {
+ if sp, ok := p.(sessionProvider); ok {
+ return sp.ProviderForSession(g)
+ }
+ return p
+}
+
// MultiProvider is a provider backed by a mutable map of providers
type MultiProvider struct {
mu sync.RWMutex
@@ -86,6 +98,28 @@ func (mp *MultiProvider) Add(dgst digest.Digest, p content.InfoReaderProvider) {
mp.sub[dgst] = p
}
+func (mp *MultiProvider) ProviderForSession(g session.Group) content.Provider {
+ return &multiProviderForSession{MultiProvider: mp, g: g}
+}
+
+type multiProviderForSession struct {
+ *MultiProvider
+ g session.Group
+}
+
+func (p *multiProviderForSession) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (content.ReaderAt, error) {
+ p.mu.RLock()
+ provider, ok := p.sub[desc.Digest]
+ if !ok {
+ provider = p.base
+ }
+ p.mu.RUnlock()
+ if provider == nil {
+ return nil, errors.Wrapf(cerrdefs.ErrNotFound, "content %v", desc.Digest)
+ }
+ return ProviderForSession(provider, p.g).ReaderAt(ctx, desc)
+}
+
func (mp *MultiProvider) UnlazySession(desc ocispecs.Descriptor) session.Group {
type unlazySession interface {
UnlazySession(ocispecs.Descriptor) session.Group
diff --git a/vendor/github.com/moby/buildkit/util/contentutil/refs.go b/vendor/github.com/moby/buildkit/util/contentutil/refs.go
index affbfabc7dff..2c19707dbcfc 100644
--- a/vendor/github.com/moby/buildkit/util/contentutil/refs.go
+++ b/vendor/github.com/moby/buildkit/util/contentutil/refs.go
@@ -33,7 +33,7 @@ func WithCredentials(c func(string) (string, string, error)) ResolveOptFunc {
}
}
-func ProviderFromRef(ref string, opts ...ResolveOptFunc) (ocispecs.Descriptor, content.Provider, error) {
+func ProviderFromRef(ctx context.Context, ref string, opts ...ResolveOptFunc) (ocispecs.Descriptor, content.Provider, error) {
headers := http.Header{}
headers.Set("User-Agent", version.UserAgent())
@@ -52,26 +52,26 @@ func ProviderFromRef(ref string, opts ...ResolveOptFunc) (ocispecs.Descriptor, c
}
remote := docker.NewResolver(dro)
- name, desc, err := remote.Resolve(context.TODO(), ref)
+ name, desc, err := remote.Resolve(ctx, ref)
if err != nil {
return ocispecs.Descriptor{}, nil, err
}
- fetcher, err := remote.Fetcher(context.TODO(), name)
+ fetcher, err := remote.Fetcher(ctx, name)
if err != nil {
return ocispecs.Descriptor{}, nil, err
}
return desc, FromFetcher(fetcher), nil
}
-func IngesterFromRef(ref string) (content.Ingester, error) {
+func IngesterFromRef(ctx context.Context, ref string) (content.Ingester, error) {
headers := http.Header{}
headers.Set("User-Agent", version.UserAgent())
remote := docker.NewResolver(docker.ResolverOptions{
Headers: headers,
})
- p, err := remote.Pusher(context.TODO(), ref)
+ p, err := remote.Pusher(ctx, ref)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go b/vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go
index e986d67649ed..791f6c2a8c8d 100644
--- a/vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go
+++ b/vendor/github.com/moby/buildkit/util/flightcontrol/flightcontrol.go
@@ -16,8 +16,8 @@ import (
// nested progress reporting
var (
- errRetry = errors.Errorf("retry")
- errRetryTimeout = errors.Errorf("exceeded retry timeout")
+ errRetry = errors.New("retry")
+ errRetryTimeout = errors.New("exceeded retry timeout")
)
type contextKeyT string
diff --git a/vendor/github.com/moby/buildkit/util/gitutil/git_cli.go b/vendor/github.com/moby/buildkit/util/gitutil/git_cli.go
index e10733912bd1..2e7c65820534 100644
--- a/vendor/github.com/moby/buildkit/util/gitutil/git_cli.go
+++ b/vendor/github.com/moby/buildkit/util/gitutil/git_cli.go
@@ -21,6 +21,7 @@ type GitCLI struct {
args []string
dir string
streams StreamFunc
+ advice *bool
workTree string
gitDir string
@@ -54,6 +55,13 @@ func WithArgs(args ...string) Option {
}
}
+// WithGitAdvice controls whether Git advice messages are emitted.
+func WithGitAdvice(enabled bool) Option {
+ return func(b *GitCLI) {
+ b.advice = &enabled
+ }
+}
+
// WithDir sets working directory.
//
// This should be a path to any directory within a standard git repository.
@@ -165,6 +173,9 @@ func (cli *GitCLI) Run(ctx context.Context, args ...string) (_ []byte, err error
// Block sneaky repositories from using repos from the filesystem as submodules.
cmd.Args = append(cmd.Args, "-c", "protocol.file.allow=user")
+ if cli.advice != nil && !*cli.advice {
+ cmd.Args = append(cmd.Args, "-c", "advice.detachedHead=false")
+ }
if cli.workTree != "" {
cmd.Args = append(cmd.Args, "--work-tree", cli.workTree)
}
@@ -203,6 +214,13 @@ func (cli *GitCLI) Run(ctx context.Context, args ...string) (_ []byte, err error
// "GIT_TRACE=1",
"LC_ALL=C", // Ensure consistent output.
}
+ if cli.advice != nil {
+ if *cli.advice {
+ cmd.Env = append(cmd.Env, "GIT_ADVICE=1")
+ } else {
+ cmd.Env = append(cmd.Env, "GIT_ADVICE=0")
+ }
+ }
if cli.hostGitConfig {
for _, ev := range [...]string{
"HOME",
diff --git a/vendor/github.com/moby/buildkit/util/gitutil/gitobject/parse.go b/vendor/github.com/moby/buildkit/util/gitutil/gitobject/parse.go
index 7c35fd973e45..67985a0c4391 100644
--- a/vendor/github.com/moby/buildkit/util/gitutil/gitobject/parse.go
+++ b/vendor/github.com/moby/buildkit/util/gitutil/gitobject/parse.go
@@ -49,7 +49,7 @@ func Parse(raw []byte) (*GitObject, error) {
obj := &GitObject{Headers: make(map[string][]string), Raw: raw}
lines := strings.Split(string(raw), "\n")
if len(lines) == 0 {
- return nil, errors.Errorf("invalid empty git object")
+ return nil, errors.New("invalid empty git object")
}
isTag := bytes.HasPrefix(raw, []byte("object "))
@@ -171,7 +171,7 @@ func (obj *GitObject) VerifyChecksum(sha string) error {
func (obj *GitObject) ToCommit() (*Commit, error) {
if obj.Type != "commit" {
- return nil, errors.Errorf("not a commit object")
+ return nil, errors.New("not a commit object")
}
c := &Commit{}
if trees, ok := obj.Headers["tree"]; ok && len(trees) > 0 {
@@ -192,7 +192,7 @@ func (obj *GitObject) ToCommit() (*Commit, error) {
func (obj *GitObject) ToTag() (*Tag, error) {
if obj.Type != "tag" {
- return nil, errors.Errorf("not a tag object")
+ return nil, errors.New("not a tag object")
}
t := &Tag{}
if objects, ok := obj.Headers["object"]; ok && len(objects) > 0 {
diff --git a/vendor/github.com/moby/buildkit/util/gitutil/gitsign/gitsign.go b/vendor/github.com/moby/buildkit/util/gitutil/gitsign/gitsign.go
index 9c7c80e07407..6e0e3ab70fcc 100644
--- a/vendor/github.com/moby/buildkit/util/gitutil/gitsign/gitsign.go
+++ b/vendor/github.com/moby/buildkit/util/gitutil/gitsign/gitsign.go
@@ -79,7 +79,7 @@ func parseSignatureBlock(data []byte) ([]byte, error) {
}
return block.Bytes, nil
}
- return nil, errors.Errorf("invalid signature format")
+ return nil, errors.New("invalid signature format")
}
func ParseSignature(data []byte) (*Signature, error) {
@@ -101,5 +101,5 @@ func ParseSignature(data []byte) (*Signature, error) {
}
return &Signature{SSHSignature: sig}, nil
}
- return nil, errors.Errorf("invalid signature format")
+ return nil, errors.New("invalid signature format")
}
diff --git a/vendor/github.com/moby/buildkit/util/leaseutil/manager.go b/vendor/github.com/moby/buildkit/util/leaseutil/manager.go
index 5ccb9eefcc21..c3f5f8086b7a 100644
--- a/vendor/github.com/moby/buildkit/util/leaseutil/manager.go
+++ b/vendor/github.com/moby/buildkit/util/leaseutil/manager.go
@@ -65,7 +65,7 @@ func (l *LeaseRef) Adopt(ctx context.Context) error {
}
currentID, ok := leases.FromContext(ctx)
if !ok {
- return errors.Errorf("missing lease requirement for adopt")
+ return errors.New("missing lease requirement for adopt")
}
for _, r := range l.resources {
if err := l.lm.AddResource(ctx, leases.Lease{ID: currentID}, r); err != nil {
diff --git a/vendor/github.com/moby/buildkit/util/resolver/limited/group.go b/vendor/github.com/moby/buildkit/util/resolver/limited/group.go
index 3c6e0585c84b..a7e5386d356b 100644
--- a/vendor/github.com/moby/buildkit/util/resolver/limited/group.go
+++ b/vendor/github.com/moby/buildkit/util/resolver/limited/group.go
@@ -23,11 +23,11 @@ var contextKey = contextKeyT("buildkit/util/resolver/limited")
// DefaultMaxConcurrency is the default number of concurrent connections per registry.
var DefaultMaxConcurrency int64 = 4
-var Default = New(int(DefaultMaxConcurrency))
+var Default = New(DefaultMaxConcurrency)
type Group struct {
mu sync.Mutex
- size int
+ size int64
sem map[string][2]*semaphore.Weighted
}
@@ -66,13 +66,18 @@ func (r *req) acquire(ctx context.Context, desc ocispecs.Descriptor) (context.Co
}, nil
}
-func New(size int) *Group {
+func New(size int64) *Group {
return &Group{
size: size,
sem: make(map[string][2]*semaphore.Weighted),
}
}
+// Size returns the maximum concurrency for the group.
+func (g *Group) Size() int64 {
+ return g.size
+}
+
func (g *Group) req(ref string) *req {
return &req{g: g, ref: domain(ref)}
}
@@ -84,8 +89,8 @@ func (g *Group) getOrInit(domain string) [2]*semaphore.Weighted {
s, ok := g.sem[domain]
if !ok {
s = [2]*semaphore.Weighted{
- semaphore.NewWeighted(int64(g.size)),
- semaphore.NewWeighted(int64(g.size + 1)),
+ semaphore.NewWeighted(g.size),
+ semaphore.NewWeighted(g.size + 1),
}
g.sem[domain] = s
}
@@ -93,7 +98,7 @@ func (g *Group) getOrInit(domain string) [2]*semaphore.Weighted {
}
// SetMaxConcurrency sets the default maximum concurrency for the default group.
-func SetMaxConcurrency(size int) {
+func SetMaxConcurrency(size int64) {
Default = New(size)
}
diff --git a/vendor/github.com/moby/buildkit/util/stack/stack.pb.go b/vendor/github.com/moby/buildkit/util/stack/stack.pb.go
index 55717609769c..20eb3590e7e6 100644
--- a/vendor/github.com/moby/buildkit/util/stack/stack.pb.go
+++ b/vendor/github.com/moby/buildkit/util/stack/stack.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.36.11-devel
+// protoc-gen-go v1.36.12
// protoc v3.14.0
// source: github.com/moby/buildkit/util/stack/stack.proto
diff --git a/vendor/github.com/moby/buildkit/util/system/path.go b/vendor/github.com/moby/buildkit/util/system/path.go
index fdd410386a2e..160fd585227e 100644
--- a/vendor/github.com/moby/buildkit/util/system/path.go
+++ b/vendor/github.com/moby/buildkit/util/system/path.go
@@ -188,7 +188,7 @@ func CheckSystemDriveAndRemoveDriveLetter(path string, inputOS string, keepSlash
// UNC paths should error out
if len(path) >= 2 && ToSlash(path[:2], inputOS) == "//" {
- return "", errors.Errorf("UNC paths are not supported")
+ return "", errors.New("UNC paths are not supported")
}
parts := strings.SplitN(path, ":", 2)
diff --git a/vendor/github.com/moby/buildkit/util/testutil/dockerd/client/request.go b/vendor/github.com/moby/buildkit/util/testutil/dockerd/client/request.go
index 1b81704a6224..1eb559c0b975 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/dockerd/client/request.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/dockerd/client/request.go
@@ -1,10 +1,8 @@
-//nolint:forbidigo
package client
import (
"context"
"encoding/json"
- "fmt"
"io"
"net"
"net/http"
@@ -127,11 +125,11 @@ func (cli *Client) checkResponseErr(serverResp *http.Response) error {
return err
}
if bodyR.N == 0 {
- return fmt.Errorf("request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version", statusMsg, bodyMax, reqURL)
+ return errors.Errorf("request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version", statusMsg, bodyMax, reqURL)
}
}
if len(body) == 0 {
- return fmt.Errorf("request returned %s for API route and version %s, check if the server supports the requested API version", statusMsg, reqURL)
+ return errors.Errorf("request returned %s for API route and version %s, check if the server supports the requested API version", statusMsg, reqURL)
}
var daemonErr error
diff --git a/vendor/github.com/moby/buildkit/util/testutil/dockerd/config.go b/vendor/github.com/moby/buildkit/util/testutil/dockerd/config.go
index de9ed4f3b70f..7e107721f5a2 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/dockerd/config.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/dockerd/config.go
@@ -6,6 +6,10 @@ type Config struct {
Builder BuilderConfig `json:"builder"`
}
+type BuilderHistoryConfig struct {
+ MaxEntries *int64 `json:"maxEntries,omitempty"`
+}
+
type BuilderEntitlements struct {
NetworkHost bool `json:"network-host,omitempty"`
SecurityInsecure bool `json:"security-insecure,omitempty"`
@@ -14,4 +18,5 @@ type BuilderEntitlements struct {
type BuilderConfig struct {
Entitlements BuilderEntitlements
+ History *BuilderHistoryConfig `json:"history,omitempty"`
}
diff --git a/vendor/github.com/moby/buildkit/util/testutil/integration/registry.go b/vendor/github.com/moby/buildkit/util/testutil/integration/registry.go
index 2c595a0146f5..ee611cd17c88 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/integration/registry.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/integration/registry.go
@@ -112,5 +112,5 @@ func detectPort(ctx context.Context, rc io.ReadCloser) (string, error) {
return "localhost:" + string(res[1]), nil
}
}
- return "", errors.Errorf("no listening address found")
+ return "", errors.New("no listening address found")
}
diff --git a/vendor/github.com/moby/buildkit/util/testutil/integration/run.go b/vendor/github.com/moby/buildkit/util/testutil/integration/run.go
index a2d4f8f3c8a8..2d0ba63b802c 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/integration/run.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/integration/run.go
@@ -230,13 +230,13 @@ func Run(t *testing.T, testCases []Test, opt ...TestOpt) {
if !strings.HasSuffix(fn, "NoParallel") && runtime.GOOS != "windows" {
t.Parallel()
}
- require.NoError(t, sandboxLimiter.Acquire(context.TODO(), 1))
+ require.NoError(t, sandboxLimiter.Acquire(t.Context(), 1))
defer sandboxLimiter.Release(1)
ctx, cancel := context.WithCancelCause(ctx)
defer func() { cancel(errors.WithStack(context.Canceled)) }()
- sb, closer, err := newSandbox(ctx, t, br, getMirror(), mv)
+ sb, closer, err := newSandbox(ctx, t, br, getMirror(ctx), mv)
require.NoError(t, err)
t.Cleanup(func() {
if closer != nil {
@@ -268,7 +268,7 @@ func getFunctionName(i any) string {
var localImageCache map[string]map[string]struct{}
var localImageCacheMu sync.Mutex
-func copyImagesLocal(t *testing.T, host string, images map[string]string) error {
+func copyImagesLocal(ctx context.Context, t *testing.T, host string, images map[string]string) error {
localImageCacheMu.Lock()
defer localImageCacheMu.Unlock()
for to, from := range images {
@@ -284,7 +284,7 @@ func copyImagesLocal(t *testing.T, host string, images map[string]string) error
localImageCache[host][to] = struct{}{}
// already exists check
- if _, _, err := docker.NewResolver(docker.ResolverOptions{}).Resolve(context.TODO(), host+"/"+to); err == nil {
+ if _, _, err := docker.NewResolver(docker.ResolverOptions{}).Resolve(ctx, host+"/"+to); err == nil {
continue
}
@@ -303,7 +303,7 @@ func copyImagesLocal(t *testing.T, host string, images map[string]string) error
} else {
dockerConfig := config.LoadDefaultConfigFile(os.Stderr)
- desc, provider, err = contentutil.ProviderFromRef(from, contentutil.WithCredentials(
+ desc, provider, err = contentutil.ProviderFromRef(ctx, from, contentutil.WithCredentials(
func(host string) (string, string, error) {
ac, err := dockerConfig.GetAuthConfig(host)
if err != nil {
@@ -316,16 +316,16 @@ func copyImagesLocal(t *testing.T, host string, images map[string]string) error
}
}
- desc, err = resolveDefaultPlatform(context.TODO(), provider, desc)
+ desc, err = resolveDefaultPlatform(ctx, provider, desc)
if err != nil {
return err
}
- ingester, err := contentutil.IngesterFromRef(host + "/" + to)
+ ingester, err := contentutil.IngesterFromRef(ctx, host+"/"+to)
if err != nil {
return err
}
- if err := contentutil.CopyChain(context.TODO(), ingester, provider, desc); err != nil {
+ if err := contentutil.CopyChain(ctx, ingester, provider, desc); err != nil {
return err
}
t.Logf("copied %s to local mirror %s", from, host+"/"+to)
@@ -402,14 +402,14 @@ func WriteConfig(updaters []ConfigUpdater) (_ string, _ func() error, err error)
return filepath.Join(tmpdir, buildkitdConfigFile), deferF.F(), nil
}
-func lazyMirrorRunnerFunc(t *testing.T, images map[string]string) func() string {
+func lazyMirrorRunnerFunc(t *testing.T, images map[string]string) func(context.Context) string {
var once sync.Once
var mirror string
- return func() string {
+ return func(ctx context.Context) string {
once.Do(func() {
m, err := RunMirror()
require.NoError(t, err)
- require.NoError(t, m.AddImages(t, images))
+ require.NoError(t, m.AddImages(ctx, t, images))
t.Cleanup(func() { _ = m.Close() })
mirror = m.Host
})
@@ -444,7 +444,7 @@ func (m *Mirror) Close() error {
return nil
}
-func (m *Mirror) AddImages(t *testing.T, images map[string]string) (err error) {
+func (m *Mirror) AddImages(ctx context.Context, t *testing.T, images map[string]string) (err error) {
lock, err := m.lock()
if err != nil {
return err
@@ -455,7 +455,7 @@ func (m *Mirror) AddImages(t *testing.T, images map[string]string) (err error) {
}
}()
- if err := copyImagesLocal(t, m.Host, images); err != nil {
+ if err := copyImagesLocal(ctx, t, m.Host, images); err != nil {
return err
}
return nil
diff --git a/vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go b/vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go
index b3f770186b77..6d0a7adf4e9c 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go
@@ -144,7 +144,7 @@ func newSandbox(ctx context.Context, t *testing.T, w Worker, mirror string, mv m
case <-ctx.Done():
return
default:
- t.Logf("sandbox timeout reached, stopping worker")
+ t.Log("sandbox timeout reached, stopping worker")
if addr := b.DebugAddress(); addr != "" {
printBuildkitdDebugLogs(t, addr)
}
diff --git a/vendor/github.com/moby/buildkit/util/testutil/integration/util.go b/vendor/github.com/moby/buildkit/util/testutil/integration/util.go
index 6d4da8209e4d..f38b62a306e5 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/integration/util.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/integration/util.go
@@ -39,7 +39,7 @@ func Tmpdir(t *testing.T, appliers ...fstest.Applier) *TmpDirWithName {
// appliers might contain fstest.CreateSocket. If the test name is too long,
// t.TempDir() could return a path that is longer than 108 characters. This
// would result in "bind: invalid argument" when we listen on the socket.
- tmpdir, err := os.MkdirTemp("", "buildkit")
+ tmpdir, err := os.MkdirTemp("", "buildkit") //nolint:usetesting // see comment above
require.NoError(t, err)
t.Cleanup(func() {
diff --git a/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go b/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go
index 79a48eeb00ee..5e9ff21bb81c 100644
--- a/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go
+++ b/vendor/github.com/moby/buildkit/util/testutil/workers/dockerd.go
@@ -133,6 +133,11 @@ func (c Moby) New(ctx context.Context, cfg *integration.BackendConfig) (b integr
}
}
}
+ if bkcfg.History != nil && bkcfg.History.MaxEntries != nil {
+ dcfg.Builder.History = &dockerd.BuilderHistoryConfig{
+ MaxEntries: bkcfg.History.MaxEntries,
+ }
+ }
dcfgdt, err := json.Marshal(dcfg)
if err != nil {
diff --git a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml b/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml
index 3e19ea710a98..3208f721b396 100644
--- a/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml
+++ b/vendor/github.com/pelletier/go-toml/v2/.goreleaser.yaml
@@ -74,39 +74,43 @@ universal_binaries:
name_template: jsontoml
archives:
- id: jsontoml
- format: tar.xz
- builds:
+ formats:
+ - tar.xz
+ ids:
- jsontoml
files:
- none*
name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
- id: tomljson
- format: tar.xz
- builds:
+ formats:
+ - tar.xz
+ ids:
- tomljson
files:
- none*
name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
- id: tomll
- format: tar.xz
- builds:
+ formats:
+ - tar.xz
+ ids:
- tomll
files:
- none*
name_template: "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}"
-dockers:
+dockers_v2:
- id: tools
- goos: linux
- goarch: amd64
ids:
- jsontoml
- tomljson
- tomll
- image_templates:
- - "ghcr.io/pelletier/go-toml:latest"
- - "ghcr.io/pelletier/go-toml:{{ .Tag }}"
- - "ghcr.io/pelletier/go-toml:v{{ .Major }}"
- skip_push: false
+ images:
+ - "ghcr.io/pelletier/go-toml"
+ tags:
+ - "latest"
+ - "{{ .Tag }}"
+ - "v{{ .Major }}"
+ platforms:
+ - linux/amd64
checksum:
name_template: 'sha256sums.txt'
snapshot:
diff --git a/vendor/github.com/pelletier/go-toml/v2/AGENTS.md b/vendor/github.com/pelletier/go-toml/v2/AGENTS.md
index dafe44d764b9..f495afd872d1 100644
--- a/vendor/github.com/pelletier/go-toml/v2/AGENTS.md
+++ b/vendor/github.com/pelletier/go-toml/v2/AGENTS.md
@@ -53,6 +53,14 @@ go-toml is a TOML library for Go. The goal is to provide an easy-to-use and effi
- Commit messages must explain **why** the change is needed
- Keep messages clear and informative even if details are in the PR description
+### Capabilities
+
+go-toml tracks system-level capabilities using [capslock](https://github.com/google/capslock). The baseline is in `capability_baseline.txt` and CI enforces that it does not grow.
+
+- **Do not introduce new capabilities.** PRs that increase the capability set (e.g., adding network access, subprocess execution, syscalls) are unlikely to be accepted.
+- If a change causes the capabilities check to fail, do not update the baseline to make it pass. Instead, rethink the approach to avoid requiring new capabilities.
+- To check locally: `./caps.sh check` (requires `capslock` installed via `go install github.com/google/capslock/cmd/capslock@latest`)
+
## Pull Request Checklist
Before submitting:
@@ -61,4 +69,5 @@ Before submitting:
2. No backward-incompatible changes (unless discussed)
3. Relevant documentation added/updated
4. No performance regression (verify with benchmarks)
-5. Title is clear and understandable for changelog
+5. Capabilities are not increasing (`./caps.sh check`)
+6. Title is clear and understandable for changelog
diff --git a/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md b/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md
index 28b88ec334b7..65a3ff494a85 100644
--- a/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md
+++ b/vendor/github.com/pelletier/go-toml/v2/CONTRIBUTING.md
@@ -180,6 +180,25 @@ description. Pull requests that lower performance will receive more scrutiny.
[benchstat]: https://pkg.go.dev/golang.org/x/perf/cmd/benchstat
+### Capabilities
+
+We use [capslock](https://github.com/google/capslock) to track what
+system-level capabilities (file access, network, syscalls, etc.) each package
+requires. The current baseline is in `capability_baseline.txt`. CI will fail if
+a change introduces a new capability.
+
+**Pull requests that increase the set of capabilities are unlikely to be
+accepted.** go-toml is a parsing library and should not need network access,
+subprocess execution, or other capabilities beyond what it already uses.
+
+If you believe a new capability is genuinely needed, discuss it in an issue
+first. To update the baseline after approval:
+
+```bash
+go install github.com/google/capslock/cmd/capslock@latest
+./caps.sh generate
+```
+
### Style
Try to look around and follow the same format and structure as the rest of the
diff --git a/vendor/github.com/pelletier/go-toml/v2/Dockerfile b/vendor/github.com/pelletier/go-toml/v2/Dockerfile
index b9e933237949..ebd9babaca13 100644
--- a/vendor/github.com/pelletier/go-toml/v2/Dockerfile
+++ b/vendor/github.com/pelletier/go-toml/v2/Dockerfile
@@ -1,5 +1,6 @@
FROM scratch
ENV PATH "$PATH:/bin"
-COPY tomll /bin/tomll
-COPY tomljson /bin/tomljson
-COPY jsontoml /bin/jsontoml
+ARG TARGETPLATFORM
+COPY $TARGETPLATFORM/tomll /bin/tomll
+COPY $TARGETPLATFORM/tomljson /bin/tomljson
+COPY $TARGETPLATFORM/jsontoml /bin/jsontoml
diff --git a/vendor/github.com/pelletier/go-toml/v2/README.md b/vendor/github.com/pelletier/go-toml/v2/README.md
index 14e65644963c..067ba3fd72dc 100644
--- a/vendor/github.com/pelletier/go-toml/v2/README.md
+++ b/vendor/github.com/pelletier/go-toml/v2/README.md
@@ -2,7 +2,7 @@
Go library for the [TOML](https://toml.io/en/) format.
-This library supports [TOML v1.0.0](https://toml.io/en/v1.0.0).
+This library supports [TOML v1.1.0](https://toml.io/en/v1.1.0).
[🐞 Bug Reports](https://github.com/pelletier/go-toml/issues)
@@ -28,6 +28,11 @@ import "github.com/pelletier/go-toml/v2"
As much as possible, this library is designed to behave similarly as the
standard library's `encoding/json`.
+When encoding structs, fields tagged with `omitempty` are omitted if they are
+empty. For `time.Time`, the zero value is considered empty, so timestamps such
+as `created_at` or `updated_at` are not written unless you remove `omitempty`
+from the struct tag or use a pointer type (`*time.Time`).
+
### Performance
While go-toml favors usability, it is written with performance in mind. Most
@@ -65,7 +70,7 @@ this use-case, go-toml provides [`LocalDate`][tld], [`LocalTime`][tlt], and
making them convenient yet unambiguous structures for their respective TOML
representation.
-[ldt]: https://toml.io/en/v1.0.0#local-date-time
+[ldt]: https://toml.io/en/v1.1.0#local-date-time
[tld]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalDate
[tlt]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalTime
[tldt]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#LocalDateTime
@@ -237,12 +242,12 @@ Execution time speedup compared to other Go TOML libraries:
| Benchmark | go-toml v1 | BurntSushi/toml |
- | Marshal/HugoFrontMatter-2 | 2.1x | 2.0x |
- | Marshal/ReferenceFile/map-2 | 2.0x | 2.0x |
- | Marshal/ReferenceFile/struct-2 | 2.3x | 2.5x |
- | Unmarshal/HugoFrontMatter-2 | 3.3x | 2.8x |
- | Unmarshal/ReferenceFile/map-2 | 2.9x | 3.0x |
- | Unmarshal/ReferenceFile/struct-2 | 4.8x | 5.0x |
+ | Marshal/HugoFrontMatter-2 | 2.3x | 2.4x |
+ | Marshal/ReferenceFile/map-2 | 2.2x | 2.6x |
+ | Marshal/ReferenceFile/struct-2 | 4.9x | 5.0x |
+ | Unmarshal/HugoFrontMatter-2 | 7.8x | 5.9x |
+ | Unmarshal/ReferenceFile/map-2 | 6.8x | 6.4x |
+ | Unmarshal/ReferenceFile/struct-2 | 6.8x | 6.3x |
See more
@@ -255,17 +260,17 @@ provided for completeness.
| Benchmark | go-toml v1 | BurntSushi/toml |
- | Marshal/SimpleDocument/map-2 | 2.0x | 2.9x |
- | Marshal/SimpleDocument/struct-2 | 2.5x | 3.6x |
- | Unmarshal/SimpleDocument/map-2 | 4.2x | 3.4x |
- | Unmarshal/SimpleDocument/struct-2 | 5.9x | 4.4x |
- | UnmarshalDataset/example-2 | 3.2x | 2.9x |
- | UnmarshalDataset/code-2 | 2.4x | 2.8x |
- | UnmarshalDataset/twitter-2 | 2.7x | 2.5x |
- | UnmarshalDataset/citm_catalog-2 | 2.3x | 2.3x |
- | UnmarshalDataset/canada-2 | 1.9x | 1.5x |
- | UnmarshalDataset/config-2 | 5.4x | 3.0x |
- | geomean | 2.9x | 2.8x |
+ | Marshal/SimpleDocument/map-2 | 2.1x | 3.1x |
+ | Marshal/SimpleDocument/struct-2 | 3.4x | 4.8x |
+ | Unmarshal/SimpleDocument/map-2 | 10.1x | 7.0x |
+ | Unmarshal/SimpleDocument/struct-2 | 12.4x | 8.0x |
+ | UnmarshalDataset/example-2 | 8.2x | 6.9x |
+ | UnmarshalDataset/code-2 | 7.5x | 8.3x |
+ | UnmarshalDataset/twitter-2 | 9.0x | 7.6x |
+ | UnmarshalDataset/citm_catalog-2 | 5.0x | 4.5x |
+ | UnmarshalDataset/canada-2 | 6.4x | 4.7x |
+ | UnmarshalDataset/config-2 | 10.2x | 6.1x |
+ | geomean | 5.8x | 5.3x |
This table can be generated with ./ci.sh benchmark -a -html.
@@ -309,304 +314,6 @@ Multiple versions are available on [ghcr.io][docker].
[docker]: https://github.com/pelletier/go-toml/pkgs/container/go-toml
-## Migrating from v1
-
-This section describes the differences between v1 and v2, with some pointers on
-how to get the original behavior when possible.
-
-### Decoding / Unmarshal
-
-#### Automatic field name guessing
-
-When unmarshaling to a struct, if a key in the TOML document does not exactly
-match the name of a struct field or any of the `toml`-tagged field, v1 tries
-multiple variations of the key ([code][v1-keys]).
-
-V2 instead does a case-insensitive matching, like `encoding/json`.
-
-This could impact you if you are relying on casing to differentiate two fields,
-and one of them is a not using the `toml` struct tag. The recommended solution
-is to be specific about tag names for those fields using the `toml` struct tag.
-
-[v1-keys]: https://github.com/pelletier/go-toml/blob/a2e52561804c6cd9392ebf0048ca64fe4af67a43/marshal.go#L775-L781
-
-#### Ignore preexisting value in interface
-
-When decoding into a non-nil `interface{}`, go-toml v1 uses the type of the
-element in the interface to decode the object. For example:
-
-```go
-type inner struct {
- B interface{}
-}
-type doc struct {
- A interface{}
-}
-
-d := doc{
- A: inner{
- B: "Before",
- },
-}
-
-data := `
-[A]
-B = "After"
-`
-
-toml.Unmarshal([]byte(data), &d)
-fmt.Printf("toml v1: %#v\n", d)
-
-// toml v1: main.doc{A:main.inner{B:"After"}}
-```
-
-In this case, field `A` is of type `interface{}`, containing a `inner` struct.
-V1 sees that type and uses it when decoding the object.
-
-When decoding an object into an `interface{}`, V2 instead disregards whatever
-value the `interface{}` may contain and replaces it with a
-`map[string]interface{}`. With the same data structure as above, here is what
-the result looks like:
-
-```go
-toml.Unmarshal([]byte(data), &d)
-fmt.Printf("toml v2: %#v\n", d)
-
-// toml v2: main.doc{A:map[string]interface {}{"B":"After"}}
-```
-
-This is to match `encoding/json`'s behavior. There is no way to make the v2
-decoder behave like v1.
-
-#### Values out of array bounds ignored
-
-When decoding into an array, v1 returns an error when the number of elements
-contained in the doc is superior to the capacity of the array. For example:
-
-```go
-type doc struct {
- A [2]string
-}
-d := doc{}
-err := toml.Unmarshal([]byte(`A = ["one", "two", "many"]`), &d)
-fmt.Println(err)
-
-// (1, 1): unmarshal: TOML array length (3) exceeds destination array length (2)
-```
-
-In the same situation, v2 ignores the last value:
-
-```go
-err := toml.Unmarshal([]byte(`A = ["one", "two", "many"]`), &d)
-fmt.Println("err:", err, "d:", d)
-// err: d: {[one two]}
-```
-
-This is to match `encoding/json`'s behavior. There is no way to make the v2
-decoder behave like v1.
-
-#### Support for `toml.Unmarshaler` has been dropped
-
-This method was not widely used, poorly defined, and added a lot of complexity.
-A similar effect can be achieved by implementing the `encoding.TextUnmarshaler`
-interface and use strings.
-
-#### Support for `default` struct tag has been dropped
-
-This feature adds complexity and a poorly defined API for an effect that can be
-accomplished outside of the library.
-
-It does not seem like other format parsers in Go support that feature (the
-project referenced in the original ticket #202 has not been updated since 2017).
-Given that go-toml v2 should not touch values not in the document, the same
-effect can be achieved by pre-filling the struct with defaults (libraries like
-[go-defaults][go-defaults] can help). Also, string representation is not well
-defined for all types: it creates issues like #278.
-
-The recommended replacement is pre-filling the struct before unmarshaling.
-
-[go-defaults]: https://github.com/mcuadros/go-defaults
-
-#### `toml.Tree` replacement
-
-This structure was the initial attempt at providing a document model for
-go-toml. It allows manipulating the structure of any document, encoding and
-decoding from their TOML representation. While a more robust feature was
-initially planned in go-toml v2, this has been ultimately [removed from
-scope][nodoc] of this library, with no plan to add it back at the moment. The
-closest equivalent at the moment would be to unmarshal into an `interface{}` and
-use type assertions and/or reflection to manipulate the arbitrary
-structure. However this would fall short of providing all of the TOML features
-such as adding comments and be specific about whitespace.
-
-
-#### `toml.Position` are not retrievable anymore
-
-The API for retrieving the position (line, column) of a specific TOML element do
-not exist anymore. This was done to minimize the amount of concepts introduced
-by the library (query path), and avoid the performance hit related to storing
-positions in the absence of a document model, for a feature that seemed to have
-little use. Errors however have gained more detailed position
-information. Position retrieval seems better fitted for a document model, which
-has been [removed from the scope][nodoc] of go-toml v2 at the moment.
-
-### Encoding / Marshal
-
-#### Default struct fields order
-
-V1 emits struct fields order alphabetically by default. V2 struct fields are
-emitted in order they are defined. For example:
-
-```go
-type S struct {
- B string
- A string
-}
-
-data := S{
- B: "B",
- A: "A",
-}
-
-b, _ := tomlv1.Marshal(data)
-fmt.Println("v1:\n" + string(b))
-
-b, _ = tomlv2.Marshal(data)
-fmt.Println("v2:\n" + string(b))
-
-// Output:
-// v1:
-// A = "A"
-// B = "B"
-
-// v2:
-// B = 'B'
-// A = 'A'
-```
-
-There is no way to make v2 encoder behave like v1. A workaround could be to
-manually sort the fields alphabetically in the struct definition, or generate
-struct types using `reflect.StructOf`.
-
-#### No indentation by default
-
-V1 automatically indents content of tables by default. V2 does not. However the
-same behavior can be obtained using [`Encoder.SetIndentTables`][sit]. For example:
-
-```go
-data := map[string]interface{}{
- "table": map[string]string{
- "key": "value",
- },
-}
-
-b, _ := tomlv1.Marshal(data)
-fmt.Println("v1:\n" + string(b))
-
-b, _ = tomlv2.Marshal(data)
-fmt.Println("v2:\n" + string(b))
-
-buf := bytes.Buffer{}
-enc := tomlv2.NewEncoder(&buf)
-enc.SetIndentTables(true)
-enc.Encode(data)
-fmt.Println("v2 Encoder:\n" + string(buf.Bytes()))
-
-// Output:
-// v1:
-//
-// [table]
-// key = "value"
-//
-// v2:
-// [table]
-// key = 'value'
-//
-//
-// v2 Encoder:
-// [table]
-// key = 'value'
-```
-
-[sit]: https://pkg.go.dev/github.com/pelletier/go-toml/v2#Encoder.SetIndentTables
-
-#### Keys and strings are single quoted
-
-V1 always uses double quotes (`"`) around strings and keys that cannot be
-represented bare (unquoted). V2 uses single quotes instead by default (`'`),
-unless a character cannot be represented, then falls back to double quotes. As a
-result of this change, `Encoder.QuoteMapKeys` has been removed, as it is not
-useful anymore.
-
-There is no way to make v2 encoder behave like v1.
-
-#### `TextMarshaler` emits as a string, not TOML
-
-Types that implement [`encoding.TextMarshaler`][tm] can emit arbitrary TOML in
-v1. The encoder would append the result to the output directly. In v2 the result
-is wrapped in a string. As a result, this interface cannot be implemented by the
-root object.
-
-There is no way to make v2 encoder behave like v1.
-
-[tm]: https://golang.org/pkg/encoding/#TextMarshaler
-
-#### `Encoder.CompactComments` has been removed
-
-Emitting compact comments is now the default behavior of go-toml. This option
-is not necessary anymore.
-
-#### Struct tags have been merged
-
-V1 used to provide multiple struct tags: `comment`, `commented`, `multiline`,
-`toml`, and `omitempty`. To behave more like the standard library, v2 has merged
-`toml`, `multiline`, `commented`, and `omitempty`. For example:
-
-```go
-type doc struct {
- // v1
- F string `toml:"field" multiline:"true" omitempty:"true" commented:"true"`
- // v2
- F string `toml:"field,multiline,omitempty,commented"`
-}
-```
-
-Has a result, the `Encoder.SetTag*` methods have been removed, as there is just
-one tag now.
-
-#### `Encoder.ArraysWithOneElementPerLine` has been renamed
-
-The new name is `Encoder.SetArraysMultiline`. The behavior should be the same.
-
-#### `Encoder.Indentation` has been renamed
-
-The new name is `Encoder.SetIndentSymbol`. The behavior should be the same.
-
-
-#### Embedded structs behave like stdlib
-
-V1 defaults to merging embedded struct fields into the embedding struct. This
-behavior was unexpected because it does not follow the standard library. To
-avoid breaking backward compatibility, the `Encoder.PromoteAnonymous` method was
-added to make the encoder behave correctly. Given backward compatibility is not
-a problem anymore, v2 does the right thing by default: it follows the behavior
-of `encoding/json`. `Encoder.PromoteAnonymous` has been removed.
-
-[nodoc]: https://github.com/pelletier/go-toml/discussions/506#discussioncomment-1526038
-
-### `query`
-
-go-toml v1 provided the [`go-toml/query`][query] package. It allowed to run
-JSONPath-style queries on TOML files. This feature is not available in v2. For a
-replacement, check out [dasel][dasel].
-
-This package has been removed because it was essentially not supported anymore
-(last commit May 2020), increased the complexity of the code base, and more
-complete solutions exist out there.
-
-[query]: https://github.com/pelletier/go-toml/tree/f99d6bbca119636aeafcf351ee52b3d202782627/query
-[dasel]: https://github.com/TomWright/dasel
-
## Versioning
Expect for parts explicitly marked otherwise, go-toml follows [Semantic
diff --git a/vendor/github.com/pelletier/go-toml/v2/capability_baseline.txt b/vendor/github.com/pelletier/go-toml/v2/capability_baseline.txt
new file mode 100644
index 000000000000..c556456c912c
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/capability_baseline.txt
@@ -0,0 +1 @@
+github.com/pelletier/go-toml/v2: CAPABILITY_REFLECT, CAPABILITY_UNANALYZED, CAPABILITY_UNSAFE_POINTER
diff --git a/vendor/github.com/pelletier/go-toml/v2/caps.sh b/vendor/github.com/pelletier/go-toml/v2/caps.sh
new file mode 100644
index 000000000000..31fec2b969c0
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/caps.sh
@@ -0,0 +1,101 @@
+#!/usr/bin/env bash
+#
+# Generates or checks the capability baseline for go-toml.
+#
+# Usage:
+# ./caps.sh generate # regenerate capability_baseline.txt
+# ./caps.sh check # check that capabilities haven't grown
+#
+# Requires: go, capslock (go install github.com/google/capslock/cmd/capslock@latest)
+
+set -euo pipefail
+
+BASELINE="capability_baseline.txt"
+CAPSLOCK="${CAPSLOCK:-capslock}"
+
+# Capabilities that must never appear in any package.
+FORBIDDEN_CAPS=(
+ CAPABILITY_NETWORK
+ CAPABILITY_CGO
+ CAPABILITY_EXEC
+)
+
+capslock_to_baseline() {
+ "$CAPSLOCK" -packages=. -output=package -granularity=package \
+ | jq -r 'to_entries | sort_by(.key) | .[] | .key + ": " + (.value | sort | join(", "))'
+}
+
+generate() {
+ capslock_to_baseline > "$BASELINE"
+ echo "Wrote $BASELINE"
+}
+
+check() {
+ if [ ! -f "$BASELINE" ]; then
+ echo "ERROR: $BASELINE not found. Run '$0 generate' first."
+ exit 1
+ fi
+
+ current=$(mktemp)
+ trap 'rm -f "$current"' EXIT
+
+ capslock_to_baseline > "$current"
+
+ failed=0
+
+ # Check for forbidden capabilities in current output.
+ for cap in "${FORBIDDEN_CAPS[@]}"; do
+ if grep -q "$cap" "$current"; then
+ echo "FORBIDDEN capability found: $cap"
+ grep "$cap" "$current"
+ failed=1
+ fi
+ done
+
+ # Extract all unique capability names from baseline and current.
+ baseline_caps=$(grep -oE 'CAPABILITY_[A-Z_]+' "$BASELINE" | sort -u)
+ current_caps=$(grep -oE 'CAPABILITY_[A-Z_]+' "$current" | sort -u)
+
+ # Check for new capability names not in the baseline.
+ new_caps=$(comm -13 <(echo "$baseline_caps") <(echo "$current_caps"))
+ if [ -n "$new_caps" ]; then
+ echo "NEW capabilities detected (not in baseline):"
+ echo "$new_caps"
+ failed=1
+ fi
+
+ # Check for new per-package capabilities (a package gained a capability it didn't have before).
+ while IFS=': ' read -r pkg caps; do
+ baseline_pkg_caps=$(grep "^${pkg}:" "$BASELINE" 2>/dev/null | sed 's/^[^:]*: //' || true)
+ if [ -z "$baseline_pkg_caps" ]; then
+ echo "NEW package with capabilities: $pkg: $caps"
+ failed=1
+ continue
+ fi
+ # Check each capability in current for this package
+ for cap in $(echo "$caps" | tr ', ' '\n' | grep -v '^$'); do
+ if ! echo "$baseline_pkg_caps" | grep -q "$cap"; then
+ echo "NEW capability for $pkg: $cap"
+ failed=1
+ fi
+ done
+ done < "$current"
+
+ if [ "$failed" -eq 1 ]; then
+ echo ""
+ echo "FAILED: capabilities have grown."
+ echo "If this is intentional, run '$0 generate' and commit the updated $BASELINE."
+ exit 1
+ fi
+
+ echo "OK: no new capabilities detected."
+}
+
+case "${1:-}" in
+ generate) generate ;;
+ check) check ;;
+ *)
+ echo "Usage: $0 {generate|check}"
+ exit 1
+ ;;
+esac
diff --git a/vendor/github.com/pelletier/go-toml/v2/ci.sh b/vendor/github.com/pelletier/go-toml/v2/ci.sh
index 30c23d1a176b..6b9723bf4a57 100644
--- a/vendor/github.com/pelletier/go-toml/v2/ci.sh
+++ b/vendor/github.com/pelletier/go-toml/v2/ci.sh
@@ -146,13 +146,17 @@ bench() {
pushd "$dir"
+ tags=""
if [ "${replace}" != "" ]; then
find ./benchmark/ -iname '*.go' -exec sed -i -E "s|github.com/pelletier/go-toml/v2\"|${replace}\"|g" {} \;
go get "${replace}"
+ # The realworld benchmarks use v2-only API and cannot compile against
+ # the other libraries; exclude them from cross-library comparisons.
+ tags="-tags cross_library_benchmark"
fi
export GOMAXPROCS=2
- go test '-bench=^Benchmark(Un)?[mM]arshal' -count=10 -run=Nothing ./... | tee "${out}"
+ go test ${tags} '-bench=^Benchmark(Un)?[mM]arshal' -count=10 -run=Nothing ./... | tee "${out}"
popd
if [ "${branch}" != "HEAD" ]; then
diff --git a/vendor/github.com/pelletier/go-toml/v2/decode.go b/vendor/github.com/pelletier/go-toml/v2/decode.go
index f3f14eff1889..46de2fb44104 100644
--- a/vendor/github.com/pelletier/go-toml/v2/decode.go
+++ b/vendor/github.com/pelletier/go-toml/v2/decode.go
@@ -1,6 +1,7 @@
package toml
import (
+ "bytes"
"fmt"
"math"
"strconv"
@@ -22,191 +23,340 @@ func parseInteger(b []byte) (int64, error) {
panic(fmt.Errorf("invalid base '%c', should have been checked by scanIntOrFloat", b[1]))
}
}
-
return parseIntDec(b)
}
-func parseLocalDate(b []byte) (LocalDate, error) {
- // full-date = date-fullyear "-" date-month "-" date-mday
- // date-fullyear = 4DIGIT
- // date-month = 2DIGIT ; 01-12
- // date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year
- var date LocalDate
-
- if len(b) != 10 || b[4] != '-' || b[7] != '-' {
- return date, unstable.NewParserError(b, "dates are expected to have the format YYYY-MM-DD")
+func parseIntHex(b []byte) (int64, error) {
+ var v uint64
+ for _, c := range b[2:] {
+ if c == '_' {
+ continue
+ }
+ var d byte
+ switch {
+ case c >= '0' && c <= '9':
+ d = c - '0'
+ case c >= 'a' && c <= 'f':
+ d = c - 'a' + 10
+ case c >= 'A' && c <= 'F':
+ d = c - 'A' + 10
+ }
+ if v > math.MaxInt64>>4 {
+ return 0, unstable.NewParserError(b, "hexadecimal number is too large to fit in a 64-bit signed integer")
+ }
+ v = v<<4 | uint64(d)
}
+ return int64(v), nil
+}
- var err error
-
- date.Year, err = parseDecimalDigits(b[0:4])
- if err != nil {
- return LocalDate{}, err
+func parseIntOct(b []byte) (int64, error) {
+ var v uint64
+ for _, c := range b[2:] {
+ if c == '_' {
+ continue
+ }
+ if v > math.MaxInt64>>3 {
+ return 0, unstable.NewParserError(b, "octal number is too large to fit in a 64-bit signed integer")
+ }
+ v = v<<3 | uint64(c-'0')
}
+ return int64(v), nil
+}
- date.Month, err = parseDecimalDigits(b[5:7])
- if err != nil {
- return LocalDate{}, err
+func parseIntBin(b []byte) (int64, error) {
+ var v uint64
+ for _, c := range b[2:] {
+ if c == '_' {
+ continue
+ }
+ if v > math.MaxInt64>>1 {
+ return 0, unstable.NewParserError(b, "binary number is too large to fit in a 64-bit signed integer")
+ }
+ v = v<<1 | uint64(c-'0')
}
+ return int64(v), nil
+}
- date.Day, err = parseDecimalDigits(b[8:10])
- if err != nil {
- return LocalDate{}, err
+func parseIntDec(b []byte) (int64, error) {
+ i := 0
+ neg := false
+ switch b[0] {
+ case '-':
+ neg = true
+ i++
+ case '+':
+ i++
}
- if !isValidDate(date.Year, date.Month, date.Day) {
- return LocalDate{}, unstable.NewParserError(b, "impossible date")
+ var limit uint64 = math.MaxInt64
+ if neg {
+ limit = math.MaxInt64 + 1
}
- return date, nil
+ var v uint64
+ for ; i < len(b); i++ {
+ c := b[i]
+ if c == '_' {
+ continue
+ }
+ if v > limit/10 {
+ return 0, unstable.NewParserError(b, "decimal number is too large to fit in a 64-bit signed integer")
+ }
+ v = v*10 + uint64(c-'0')
+ if v > limit {
+ return 0, unstable.NewParserError(b, "decimal number is too large to fit in a 64-bit signed integer")
+ }
+ }
+ if neg {
+ return -int64(v), nil //nolint:gosec // v <= MaxInt64+1, the conversion wraps to the intended negative value
+ }
+ return int64(v), nil //nolint:gosec // v <= MaxInt64
}
-func parseDecimalDigits(b []byte) (int, error) {
- v := 0
-
- for i, c := range b {
- if c < '0' || c > '9' {
- return 0, unstable.NewParserError(b[i:i+1], "expected digit (0-9)")
+func parseFloat(b []byte) (float64, error) {
+ i := 0
+ if len(b) > 0 && (b[0] == '+' || b[0] == '-') {
+ i = 1
+ }
+ if len(b) == i+3 {
+ switch b[i] {
+ case 'i':
+ // inf
+ if b[0] == '-' {
+ return math.Inf(-1), nil
+ }
+ return math.Inf(1), nil
+ case 'n':
+ // nan
+ return math.NaN(), nil
}
- v *= 10
- v += int(c - '0')
}
- return v, nil
-}
-
-func parseDateTime(b []byte) (time.Time, error) {
- // offset-date-time = full-date time-delim full-time
- // full-time = partial-time time-offset
- // time-offset = "Z" / time-numoffset
- // time-numoffset = ( "+" / "-" ) time-hour ":" time-minute
+ // Fast path: a plain decimal whose significand fits in 53 bits and whose
+ // base-10 exponent is within [-22, 22] is parsed exactly with a single
+ // rounding (Clinger's method) straight from the bytes, with no string
+ // allocation and no full strconv parse. This is the common shape for
+ // numeric data (e.g. coordinate lists). Anything outside those bounds, or
+ // with underscores, falls through to strconv, which is the reference.
+ if f, ok := fastParseFloat(b); ok {
+ return f, nil
+ }
+
+ // strconv.ParseFloat is the reference implementation for parsing
+ // floating point numbers. The position of underscores has already been
+ // validated by the parser; strip them so that they do not interfere with
+ // Go's own underscore rules.
+ cleaned := b
+ if bytes.IndexByte(b, '_') >= 0 {
+ cleaned = make([]byte, 0, len(b))
+ for _, c := range b {
+ if c != '_' {
+ cleaned = append(cleaned, c)
+ }
+ }
+ }
- dt, b, err := parseLocalDateTime(b)
+ f, err := strconv.ParseFloat(string(cleaned), 64)
if err != nil {
- return time.Time{}, err
+ return 0, unstable.NewParserError(b, "unable to parse float: %s", err)
}
+ return f, nil
+}
- var zone *time.Location
+// float64pow10 holds the powers of ten that are exactly representable as a
+// float64 (10^0 .. 10^22).
+var float64pow10 = [...]float64{
+ 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
+ 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
+}
- if len(b) == 0 {
- // parser should have checked that when assigning the date time node
- panic("date time should have a timezone")
+// fastParseFloat parses b as a float64 using Clinger's exact method and reports
+// whether it applied. It accepts only plain decimal numbers (optional sign,
+// digits, one optional '.', optional 'e'/'E' exponent) whose significand fits
+// in 53 bits and whose effective base-10 exponent is within [-22, 22]; under
+// those conditions float64(significand) * 10^exp (or / 10^-exp) is the exact,
+// correctly-rounded result, identical to strconv.ParseFloat. It returns
+// ok=false (deferring to strconv) for underscores, hexadecimal floats, large
+// significands or exponents, and any other shape.
+func fastParseFloat(b []byte) (float64, bool) {
+ i := 0
+ neg := false
+ if i < len(b) && (b[i] == '+' || b[i] == '-') {
+ neg = b[i] == '-'
+ i++
}
- if b[0] == 'Z' || b[0] == 'z' {
- b = b[1:]
- zone = time.UTC
- } else {
- const dateTimeByteLen = 6
- if len(b) != dateTimeByteLen {
- return time.Time{}, unstable.NewParserError(b, "invalid date-time timezone")
- }
- var direction int
- switch b[0] {
- case '-':
- direction = -1
- case '+':
- direction = +1
+ var mantissa uint64
+ digits := 0
+ fracDigits := 0
+ sawDot := false
+ sawDigit := false
+ for ; i < len(b); i++ {
+ c := b[i]
+ switch {
+ case c >= '0' && c <= '9':
+ if digits >= 19 {
+ // Too many significant digits to accumulate without risking a
+ // uint64 overflow (and well past the 53-bit exact range).
+ return 0, false
+ }
+ mantissa = mantissa*10 + uint64(c-'0')
+ digits++
+ if sawDot {
+ fracDigits++
+ }
+ sawDigit = true
+ case c == '.':
+ if sawDot {
+ return 0, false
+ }
+ sawDot = true
default:
- return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset character")
- }
-
- if b[3] != ':' {
- return time.Time{}, unstable.NewParserError(b[3:4], "expected a : separator")
+ goto exponent
}
-
- hours, err := parseDecimalDigits(b[1:3])
- if err != nil {
- return time.Time{}, err
- }
- if hours > 23 {
- return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset hours")
- }
-
- minutes, err := parseDecimalDigits(b[4:6])
- if err != nil {
- return time.Time{}, err
+ }
+exponent:
+ if !sawDigit {
+ return 0, false
+ }
+ exp := -fracDigits
+ if i < len(b) && (b[i] == 'e' || b[i] == 'E') {
+ i++
+ esign := 1
+ if i < len(b) && (b[i] == '+' || b[i] == '-') {
+ if b[i] == '-' {
+ esign = -1
+ }
+ i++
}
- if minutes > 59 {
- return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset minutes")
+ if i >= len(b) {
+ return 0, false
}
-
- seconds := direction * (hours*3600 + minutes*60)
- if seconds == 0 {
- zone = time.UTC
- } else {
- zone = time.FixedZone("", seconds)
+ eval := 0
+ for ; i < len(b); i++ {
+ c := b[i]
+ if c < '0' || c > '9' {
+ return 0, false
+ }
+ eval = eval*10 + int(c-'0')
+ if eval > 1000 {
+ return 0, false
+ }
}
- b = b[dateTimeByteLen:]
+ exp += esign * eval
}
-
- if len(b) > 0 {
- return time.Time{}, unstable.NewParserError(b, "extra bytes at the end of the timezone")
+ if i != len(b) {
+ // Trailing bytes (an underscore, a hexadecimal marker, ...).
+ return 0, false
+ }
+ if mantissa > 1<<53 {
+ return 0, false
}
- t := time.Date(
- dt.Year,
- time.Month(dt.Month),
- dt.Day,
- dt.Hour,
- dt.Minute,
- dt.Second,
- dt.Nanosecond,
- zone)
+ f := float64(mantissa)
+ switch {
+ case exp == 0:
+ case exp > 0 && exp <= 22:
+ f *= float64pow10[exp]
+ case exp < 0 && exp >= -22:
+ f /= float64pow10[-exp]
+ default:
+ return 0, false
+ }
+ if neg {
+ f = -f
+ }
+ return f, true
+}
- return t, nil
+func isDecimalDigit(c byte) bool {
+ return c >= '0' && c <= '9'
}
-func parseLocalDateTime(b []byte) (LocalDateTime, []byte, error) {
- var dt LocalDateTime
+// parseLocalDate parses a date of the exact form YYYY-MM-DD and validates
+// its components.
+func parseLocalDate(b []byte) (LocalDate, error) {
+ var date LocalDate
- const localDateTimeByteMinLen = 11
- if len(b) < localDateTimeByteMinLen {
- return dt, nil, unstable.NewParserError(b, "local datetimes are expected to have the format YYYY-MM-DDTHH:MM:SS[.NNNNNNNNN]")
+ if len(b) != 10 || b[4] != '-' || b[7] != '-' {
+ return date, unstable.NewParserError(b, "dates are expected to have the format YYYY-MM-DD")
}
- date, err := parseLocalDate(b[:10])
+ var err error
+ date.Year, err = parseDecimalDigits(b[0:4])
if err != nil {
- return dt, nil, err
+ return date, err
+ }
+ date.Month, err = parseDecimalDigits(b[5:7])
+ if err != nil {
+ return date, err
+ }
+ date.Day, err = parseDecimalDigits(b[8:10])
+ if err != nil {
+ return date, err
}
- dt.LocalDate = date
- sep := b[10]
- if sep != 'T' && sep != ' ' && sep != 't' {
- return dt, nil, unstable.NewParserError(b[10:11], "datetime separator is expected to be T or a space")
+ if date.Month < 1 || date.Month > 12 {
+ return date, unstable.NewParserError(b[5:7], "impossible date")
+ }
+ maxDay := daysIn(date.Month, date.Year)
+ if date.Day < 1 || date.Day > maxDay {
+ return date, unstable.NewParserError(b[8:10], "impossible date")
}
- t, rest, err := parseLocalTime(b[11:])
- if err != nil {
- return dt, nil, err
+ return date, nil
+}
+
+func daysIn(month int, year int) int {
+ switch month {
+ case 2:
+ if isLeapYear(year) {
+ return 29
+ }
+ return 28
+ case 4, 6, 9, 11:
+ return 30
+ default:
+ return 31
}
- dt.LocalTime = t
+}
- return dt, rest, nil
+func isLeapYear(year int) bool {
+ return year%4 == 0 && (year%100 != 0 || year%400 == 0)
+}
+
+// parseDecimalDigits parses a sequence of digits as a decimal number.
+func parseDecimalDigits(b []byte) (int, error) {
+ v := 0
+ for i, c := range b {
+ if !isDecimalDigit(c) {
+ return 0, unstable.NewParserError(b[i:i+1], "expected digit (0-9)")
+ }
+ v = v*10 + int(c-'0')
+ }
+ return v, nil
}
-// parseLocalTime is a bit different because it also returns the remaining
-// []byte that is didn't need. This is to allow parseDateTime to parse those
-// remaining bytes as a timezone.
+// parseLocalTime parses a time of the form HH:MM with optional seconds and an
+// optional fractional part (TOML v1.1.0). It returns the remaining bytes after
+// the time.
func parseLocalTime(b []byte) (LocalTime, []byte, error) {
var (
nspow = [10]int{0, 1e8, 1e7, 1e6, 1e5, 1e4, 1e3, 1e2, 1e1, 1e0}
t LocalTime
)
- // check if b matches to have expected format HH:MM:SS[.NNNNNN]
- const localTimeByteLen = 8
- if len(b) < localTimeByteLen {
- return t, nil, unstable.NewParserError(b, "times are expected to have the format HH:MM:SS[.NNNNNN]")
+ // check if b matches to have expected format HH:MM[:SS[.NNNNNN]]
+ const localTimeByteMinLen = 5
+ if len(b) < localTimeByteMinLen {
+ return t, nil, unstable.NewParserError(b, "times are expected to have the format HH:MM[:SS[.NNNNNN]]")
}
var err error
-
t.Hour, err = parseDecimalDigits(b[0:2])
if err != nil {
return t, nil, err
}
-
if t.Hour > 23 {
return t, nil, unstable.NewParserError(b[0:2], "hour cannot be greater 23")
}
@@ -221,54 +371,53 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) {
if t.Minute > 59 {
return t, nil, unstable.NewParserError(b[3:5], "minutes cannot be greater 59")
}
- if b[5] != ':' {
- return t, nil, unstable.NewParserError(b[5:6], "expecting colon between minutes and seconds")
- }
- t.Second, err = parseDecimalDigits(b[6:8])
- if err != nil {
- return t, nil, err
- }
+ b = b[5:]
- if t.Second > 59 {
- return t, nil, unstable.NewParserError(b[6:8], "seconds cannot be greater than 59")
- }
+ // Seconds are optional (TOML v1.1.0). Fractional seconds may only appear
+ // when seconds are present:
+ // partial-time = time-hour ":" time-minute [ ":" time-second [ time-secfrac ] ]
+ secondsPresent := false
+
+ if len(b) >= 1 && b[0] == ':' {
+ if len(b) < 3 {
+ return t, nil, unstable.NewParserError(b, "incomplete seconds")
+ }
+
+ t.Second, err = parseDecimalDigits(b[1:3])
+ if err != nil {
+ return t, nil, err
+ }
+
+ if t.Second > 59 {
+ return t, nil, unstable.NewParserError(b[1:3], "seconds cannot be greater than 59")
+ }
- b = b[8:]
+ b = b[3:]
+ secondsPresent = true
+ }
- if len(b) >= 1 && b[0] == '.' {
+ if secondsPresent && len(b) >= 1 && b[0] == '.' {
frac := 0
precision := 0
digits := 0
for i, c := range b[1:] {
- if !isDigit(c) {
+ if !isDecimalDigit(c) {
if i == 0 {
return t, nil, unstable.NewParserError(b[0:1], "need at least one digit after fraction point")
}
break
}
digits++
-
- const maxFracPrecision = 9
- if i >= maxFracPrecision {
- // go-toml allows decoding fractional seconds
- // beyond the supported precision of 9
- // digits. It truncates the fractional component
- // to the supported precision and ignores the
- // remaining digits.
- //
- // https://github.com/pelletier/go-toml/discussions/707
- continue
+ if i < 9 {
+ frac = frac*10 + int(c-'0')
+ precision++
}
-
- frac *= 10
- frac += int(c - '0')
- precision++
}
- if precision == 0 {
- return t, nil, unstable.NewParserError(b[:1], "nanoseconds need at least one digit")
+ if digits == 0 {
+ return t, nil, unstable.NewParserError(b[0:1], "need at least one digit after fraction point")
}
t.Nanosecond = frac * nspow[precision]
@@ -279,271 +428,111 @@ func parseLocalTime(b []byte) (LocalTime, []byte, error) {
return t, b, nil
}
-func parseFloat(b []byte) (float64, error) {
- if len(b) == 4 && (b[0] == '+' || b[0] == '-') && b[1] == 'n' && b[2] == 'a' && b[3] == 'n' {
- return math.NaN(), nil
- }
-
- cleaned, err := checkAndRemoveUnderscoresFloats(b)
- if err != nil {
- return 0, err
- }
-
- if cleaned[0] == '.' {
- return 0, unstable.NewParserError(b, "float cannot start with a dot")
- }
-
- if cleaned[len(cleaned)-1] == '.' {
- return 0, unstable.NewParserError(b, "float cannot end with a dot")
- }
-
- dotAlreadySeen := false
- for i, c := range cleaned {
- if c == '.' {
- if dotAlreadySeen {
- return 0, unstable.NewParserError(b[i:i+1], "float can have at most one decimal point")
- }
- if !isDigit(cleaned[i-1]) {
- return 0, unstable.NewParserError(b[i-1:i+1], "float decimal point must be preceded by a digit")
- }
- if !isDigit(cleaned[i+1]) {
- return 0, unstable.NewParserError(b[i:i+2], "float decimal point must be followed by a digit")
- }
- dotAlreadySeen = true
- }
- }
-
- start := 0
- if cleaned[0] == '+' || cleaned[0] == '-' {
- start = 1
- }
- if cleaned[start] == '0' && len(cleaned) > start+1 && isDigit(cleaned[start+1]) {
- return 0, unstable.NewParserError(b, "float integer part cannot have leading zeroes")
- }
-
- f, err := strconv.ParseFloat(string(cleaned), 64)
- if err != nil {
- return 0, unstable.NewParserError(b, "unable to parse float: %w", err)
- }
-
- return f, nil
-}
-
-func parseIntHex(b []byte) (int64, error) {
- cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:])
- if err != nil {
- return 0, err
- }
-
- i, err := strconv.ParseInt(string(cleaned), 16, 64)
- if err != nil {
- return 0, unstable.NewParserError(b, "couldn't parse hexadecimal number: %w", err)
- }
-
- return i, nil
-}
+// parseLocalDateTime parses a local date time of the form
+// YYYY-MM-DD(T| )HH:MM:SS[.NNNNNN]. It returns the remaining bytes after the
+// date-time.
+func parseLocalDateTime(b []byte) (LocalDateTime, []byte, error) {
+ var dt LocalDateTime
-func parseIntOct(b []byte) (int64, error) {
- cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:])
- if err != nil {
- return 0, err
+ const localDateTimeByteMinLen = 11
+ if len(b) < localDateTimeByteMinLen {
+ return dt, nil, unstable.NewParserError(b, "local datetimes are expected to have the format YYYY-MM-DDTHH:MM[:SS[.NNNNNNNNN]]")
}
- i, err := strconv.ParseInt(string(cleaned), 8, 64)
+ date, err := parseLocalDate(b[:10])
if err != nil {
- return 0, unstable.NewParserError(b, "couldn't parse octal number: %w", err)
+ return dt, nil, err
}
+ dt.LocalDate = date
- return i, nil
-}
-
-func parseIntBin(b []byte) (int64, error) {
- cleaned, err := checkAndRemoveUnderscoresIntegers(b[2:])
- if err != nil {
- return 0, err
+ sep := b[10]
+ if sep != 'T' && sep != ' ' && sep != 't' {
+ return dt, nil, unstable.NewParserError(b[10:11], "datetime separator is expected to be T or a space")
}
- i, err := strconv.ParseInt(string(cleaned), 2, 64)
+ t, rest, err := parseLocalTime(b[11:])
if err != nil {
- return 0, unstable.NewParserError(b, "couldn't parse binary number: %w", err)
+ return dt, nil, err
}
+ dt.LocalTime = t
- return i, nil
-}
-
-func isSign(b byte) bool {
- return b == '+' || b == '-'
+ return dt, rest, nil
}
-func parseIntDec(b []byte) (int64, error) {
- cleaned, err := checkAndRemoveUnderscoresIntegers(b)
- if err != nil {
- return 0, err
- }
-
- startIdx := 0
-
- if isSign(cleaned[0]) {
- startIdx++
- }
-
- if len(cleaned) > startIdx+1 && cleaned[startIdx] == '0' {
- return 0, unstable.NewParserError(b, "leading zero not allowed on decimal number")
- }
-
- i, err := strconv.ParseInt(string(cleaned), 10, 64)
+// parseDateTime parses a date-time with a timezone offset (Z or +/-HH:MM).
+func parseDateTime(b []byte) (time.Time, error) {
+ dt, b, err := parseLocalDateTime(b)
if err != nil {
- return 0, unstable.NewParserError(b, "couldn't parse decimal number: %w", err)
- }
-
- return i, nil
-}
-
-func checkAndRemoveUnderscoresIntegers(b []byte) ([]byte, error) {
- start := 0
- if b[start] == '+' || b[start] == '-' {
- start++
- }
-
- if len(b) == start {
- return b, nil
+ return time.Time{}, err
}
- if b[start] == '_' {
- return nil, unstable.NewParserError(b[start:start+1], "number cannot start with underscore")
- }
+ var zone *time.Location
- if b[len(b)-1] == '_' {
- return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore")
+ if len(b) == 0 {
+ // parser should have checked that there is a timezone
+ return time.Time{}, unstable.NewParserError(b, "date-time is missing timezone")
}
- // fast path
- i := 0
- for ; i < len(b); i++ {
- if b[i] == '_' {
- break
+ if b[0] == 'Z' || b[0] == 'z' {
+ b = b[1:]
+ zone = time.UTC
+ } else {
+ const dateTimeByteLen = 6
+ if len(b) != dateTimeByteLen {
+ return time.Time{}, unstable.NewParserError(b, "invalid date-time timezone")
}
- }
- if i == len(b) {
- return b, nil
- }
-
- before := false
- cleaned := make([]byte, i, len(b))
- copy(cleaned, b)
-
- for i++; i < len(b); i++ {
- c := b[i]
- if c == '_' {
- if !before {
- return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores")
- }
- before = false
- } else {
- before = true
- cleaned = append(cleaned, c)
+ var direction int
+ switch b[0] {
+ case '-':
+ direction = -1
+ case '+':
+ direction = +1
+ default:
+ return time.Time{}, unstable.NewParserError(b[:1], "invalid timezone offset character")
}
- }
-
- return cleaned, nil
-}
-
-func checkAndRemoveUnderscoresFloats(b []byte) ([]byte, error) {
- if b[0] == '_' {
- return nil, unstable.NewParserError(b[0:1], "number cannot start with underscore")
- }
- if b[len(b)-1] == '_' {
- return nil, unstable.NewParserError(b[len(b)-1:], "number cannot end with underscore")
- }
-
- // fast path
- i := 0
- for ; i < len(b); i++ {
- if b[i] == '_' {
- break
+ if b[3] != ':' {
+ return time.Time{}, unstable.NewParserError(b[3:4], "expected a : separator")
}
- }
- if i == len(b) {
- return b, nil
- }
- before := false
- cleaned := make([]byte, 0, len(b))
+ hours, err := parseDecimalDigits(b[1:3])
+ if err != nil {
+ return time.Time{}, err
+ }
+ if hours > 23 {
+ return time.Time{}, unstable.NewParserError(b[1:3], "invalid timezone offset hours")
+ }
- for i := 0; i < len(b); i++ {
- c := b[i]
+ minutes, err := parseDecimalDigits(b[4:6])
+ if err != nil {
+ return time.Time{}, err
+ }
+ if minutes > 59 {
+ return time.Time{}, unstable.NewParserError(b[4:6], "invalid timezone offset minutes")
+ }
- switch c {
- case '_':
- if !before {
- return nil, unstable.NewParserError(b[i-1:i+1], "number must have at least one digit between underscores")
- }
- if i < len(b)-1 && (b[i+1] == 'e' || b[i+1] == 'E') {
- return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore before exponent")
- }
- before = false
- case '+', '-':
- // signed exponents
- cleaned = append(cleaned, c)
- before = false
- case 'e', 'E':
- if i < len(b)-1 && b[i+1] == '_' {
- return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after exponent")
- }
- cleaned = append(cleaned, c)
- case '.':
- if i < len(b)-1 && b[i+1] == '_' {
- return nil, unstable.NewParserError(b[i+1:i+2], "cannot have underscore after decimal point")
- }
- if i > 0 && b[i-1] == '_' {
- return nil, unstable.NewParserError(b[i-1:i], "cannot have underscore before decimal point")
- }
- cleaned = append(cleaned, c)
- default:
- before = true
- cleaned = append(cleaned, c)
+ seconds := direction * (hours*3600 + minutes*60)
+ if seconds == 0 {
+ zone = time.UTC
+ } else {
+ zone = time.FixedZone("", seconds)
}
+ b = b[dateTimeByteLen:]
}
- return cleaned, nil
-}
-
-// isValidDate checks if a provided date is a date that exists.
-func isValidDate(year int, month int, day int) bool {
- return month > 0 && month < 13 && day > 0 && day <= daysIn(month, year)
-}
-
-// daysBefore[m] counts the number of days in a non-leap year
-// before month m begins. There is an entry for m=12, counting
-// the number of days before January of next year (365).
-var daysBefore = [...]int32{
- 0,
- 31,
- 31 + 28,
- 31 + 28 + 31,
- 31 + 28 + 31 + 30,
- 31 + 28 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30,
- 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31,
-}
-
-func daysIn(m int, year int) int {
- if m == 2 && isLeap(year) {
- return 29
+ if len(b) > 0 {
+ return time.Time{}, unstable.NewParserError(b, "extra bytes at the end of the timezone")
}
- return int(daysBefore[m] - daysBefore[m-1])
-}
-func isLeap(year int) bool {
- return year%4 == 0 && (year%100 != 0 || year%400 == 0)
-}
+ t := time.Date(
+ dt.Year,
+ time.Month(dt.Month),
+ dt.Day,
+ dt.Hour,
+ dt.Minute,
+ dt.Second,
+ dt.Nanosecond,
+ zone)
-func isDigit(r byte) bool {
- return r >= '0' && r <= '9'
+ return t, nil
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/decode_fused.go b/vendor/github.com/pelletier/go-toml/v2/decode_fused.go
new file mode 100644
index 000000000000..9de2d6522322
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/decode_fused.go
@@ -0,0 +1,362 @@
+package toml
+
+import (
+ "errors"
+ "reflect"
+ "strings"
+
+ "github.com/pelletier/go-toml/v2/internal/parserbridge"
+ "github.com/pelletier/go-toml/v2/unstable"
+)
+
+// unmarshalFused decodes a whole document into a native map[string]interface{}
+// tree with no reflection on the document structure, and without building an
+// AST for table headers and scalar key-values. Only container values (arrays
+// and inline tables) are parsed into the parser arena, so that the seen-tracker
+// can validate them and decodeAny can presize the resulting slices and maps —
+// the AST is what makes that cheap O(1) presizing possible.
+//
+// It is used when the target is a fully generic value (interface{} or
+// map[string]interface{}) and the unmarshaler interface is disabled. The
+// seen-tracker validates the document (duplicate keys, type consistency), so
+// the builder creates and merges containers without revalidating. Strict mode
+// never applies to a generic target (a map has no "unknown fields"), and
+// captures never apply (a generic value implements no Unmarshaler).
+func (d *decoder) unmarshalFused(root reflect.Value, data []byte) error {
+ var m map[string]interface{}
+ if !root.IsNil() {
+ // Decode into (merge with) an existing generic map when present.
+ if em, ok := root.Interface().(map[string]interface{}); ok {
+ m = em
+ }
+ }
+ if m == nil {
+ m = map[string]interface{}{}
+ }
+
+ if err := d.fusedDocument(m, data); err != nil {
+ return d.wrapFusedError(data, err)
+ }
+
+ if root.CanSet() {
+ root.Set(reflect.ValueOf(m))
+ }
+ return nil
+}
+
+// fusedDocument runs the top-level expression loop, mirroring
+// Parser.NextExpression but storing values directly into native maps.
+func (d *decoder) fusedDocument(m map[string]interface{}, b []byte) error {
+ cur := m
+ for {
+ b = fusedSkipWS(b)
+ if len(b) == 0 {
+ return nil
+ }
+ switch b[0] {
+ case '\n':
+ b = b[1:]
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ b = b[2:]
+ continue
+ }
+ return unstable.NewParserError(b[:1], "expected newline but got %#U", b[0])
+ case '#':
+ _, rest, err := parserbridge.ScanComment(b)
+ if err != nil {
+ return err
+ }
+ rest, err = fusedConsumeEOL(rest)
+ if err != nil {
+ return err
+ }
+ b = rest
+ case '[':
+ rest, err := d.fusedTable(b, m, &cur)
+ if err != nil {
+ return err
+ }
+ b = rest
+ default:
+ rest, err := d.fusedKeyVal(b, cur)
+ if err != nil {
+ return err
+ }
+ b = rest
+ }
+ }
+}
+
+// fusedTable handles a [table] or [[array table]] header. b starts at '['. It
+// updates *cur to the table the following key-values belong to.
+func (d *decoder) fusedTable(b []byte, root map[string]interface{}, cur *map[string]interface{}) ([]byte, error) {
+ arrayTable := len(b) > 1 && b[1] == '['
+
+ var start []byte
+ if arrayTable {
+ start = fusedSkipWS(b[2:])
+ } else {
+ start = fusedSkipWS(b[1:])
+ }
+
+ var err error
+ var rawKey []byte
+ d.keyParts, rawKey, b, err = parserbridge.ScanKey(&d.p, start, d.keyParts[:0])
+ if err != nil {
+ return nil, err
+ }
+
+ if arrayTable {
+ if len(b) < 2 || b[0] != ']' || b[1] != ']' {
+ return nil, unstable.NewParserError(fusedHL1(b), "expected ']]' to close array table name")
+ }
+ b = b[2:]
+ } else {
+ if len(b) == 0 || b[0] != ']' {
+ return nil, unstable.NewParserError(fusedHL1(b), "expected ']' to close table name")
+ }
+ b = b[1:]
+ }
+
+ // The whole expression (including its line termination) is parsed before
+ // it is validated, to keep error precedence identical to the AST path.
+ b, err = d.fusedFinishLine(b)
+ if err != nil {
+ return nil, err
+ }
+
+ if arrayTable {
+ first, err := d.seen.CheckArrayTable(d.keyParts)
+ if err != nil {
+ return nil, d.fusedSeenError(rawKey, d.keyParts, err)
+ }
+ *cur = d.anyArrayTableParts(root, d.keyParts, first)
+ } else {
+ if _, err := d.seen.CheckTable(d.keyParts); err != nil {
+ return nil, d.fusedSeenError(rawKey, d.keyParts, err)
+ }
+ *cur = d.anyTableParts(root, d.keyParts)
+ }
+ return b, nil
+}
+
+// fusedKeyVal handles a `key = value` expression relative to the current table
+// cur. b starts at the first character of the key.
+func (d *decoder) fusedKeyVal(b []byte, cur map[string]interface{}) ([]byte, error) {
+ var err error
+ var rawKey []byte
+ d.keyParts, rawKey, b, err = parserbridge.ScanKey(&d.p, b, d.keyParts[:0])
+ if err != nil {
+ return nil, err
+ }
+ if len(b) == 0 || b[0] != '=' {
+ return nil, unstable.NewParserError(fusedHL1(b), "expected '=' after key")
+ }
+ b = fusedSkipWS(b[1:])
+ if len(b) == 0 {
+ return nil, unstable.NewParserError(b, "expected value, not end of input")
+ }
+
+ if c := b[0]; c == '[' || c == '{' {
+ // Container value: build its AST so the seen-tracker can validate it
+ // and decodeAny can presize the resulting slices and maps.
+ nodeAny, rest, err := parserbridge.ParseValue(&d.p, b)
+ if err != nil {
+ return nil, err
+ }
+ node := nodeAny.(*unstable.Node)
+ rest, err = d.fusedFinishLine(rest)
+ if err != nil {
+ return nil, err
+ }
+ leafID, err := d.seen.CheckKeyValue(d.keyParts)
+ if err != nil {
+ return nil, d.fusedSeenError(rawKey, d.keyParts, err)
+ }
+ if err := d.seen.CheckValueUnder(leafID, node); err != nil {
+ return nil, d.fusedSeenError(rawKey, d.keyParts, err)
+ }
+ av, err := d.decodeAny(node)
+ if err != nil {
+ return nil, err
+ }
+ d.setFusedLeaf(cur, d.keyParts, av)
+ return rest, nil
+ }
+
+ // Scalar value: scan it without building a node, then validate and convert
+ // it natively.
+ k, _, value, rest, err := parserbridge.ScanScalar(&d.p, b)
+ if err != nil {
+ return nil, err
+ }
+ kind := unstable.Kind(k)
+ rest, err = d.fusedFinishLine(rest)
+ if err != nil {
+ return nil, err
+ }
+ if _, err := d.seen.CheckKeyValue(d.keyParts); err != nil {
+ return nil, d.fusedSeenError(rawKey, d.keyParts, err)
+ }
+ av, err := d.fusedScalar(kind, value)
+ if err != nil {
+ return nil, err
+ }
+ d.setFusedLeaf(cur, d.keyParts, av)
+ return rest, nil
+}
+
+// fusedSeenError turns a bare error returned by a SeenTracker parts-method
+// into a ParserError carrying the position (the raw key span) and key path of
+// the offending expression, so that it is reported as a DecodeError with
+// context. It mirrors decoder.wrapSeenError for the fused (AST-less) path.
+func (d *decoder) fusedSeenError(rawKey []byte, parts [][]byte, err error) error {
+ key := make(Key, len(parts))
+ for i, p := range parts {
+ key[i] = string(p)
+ }
+ return &unstable.ParserError{
+ Highlight: rawKey,
+ Message: strings.TrimPrefix(err.Error(), "toml: "),
+ Key: key,
+ }
+}
+
+// fusedScalar converts a scanned scalar value into the native Go value used
+// for generic targets. It mirrors the scalar cases of decodeAny.
+func (d *decoder) fusedScalar(kind unstable.Kind, value []byte) (interface{}, error) {
+ switch kind {
+ case unstable.String:
+ return string(value), nil
+ case unstable.Integer:
+ i, err := parseInteger(value)
+ return i, err
+ case unstable.Float:
+ f, err := parseFloat(value)
+ return f, err
+ case unstable.Bool:
+ return value[0] == 't', nil
+ case unstable.DateTime:
+ t, err := parseDateTime(value)
+ return t, err
+ case unstable.LocalDateTime:
+ dt, rest, err := parseLocalDateTime(value)
+ if err != nil {
+ return nil, err
+ }
+ if len(rest) > 0 {
+ return nil, unstable.NewParserError(rest, "extra characters at the end of a local date time")
+ }
+ return dt, nil
+ case unstable.LocalDate:
+ date, err := parseLocalDate(value)
+ return date, err
+ case unstable.LocalTime:
+ t, rest, err := parseLocalTime(value)
+ if err != nil {
+ return nil, err
+ }
+ if len(rest) > 0 {
+ return nil, unstable.NewParserError(rest, "extra characters at the end of a local time")
+ }
+ return t, nil
+ default:
+ return nil, unstable.NewParserError(value, "unsupported value kind %s", kind)
+ }
+}
+
+// anyTableParts navigates a [table] header (given its key parts) to the map it
+// designates, creating intermediate tables as needed.
+func (d *decoder) anyTableParts(m map[string]interface{}, parts [][]byte) map[string]interface{} {
+ cur := m
+ for _, p := range parts {
+ cur = d.anyChildTable(cur, d.intern(p))
+ }
+ return cur
+}
+
+// anyArrayTableParts navigates a [[array table]] header (given its key parts),
+// appends a fresh element to the designated array, and returns it. first is
+// true the first time this header is seen, in which case any pre-existing array
+// (from a reused target) is reset.
+func (d *decoder) anyArrayTableParts(m map[string]interface{}, parts [][]byte, first bool) map[string]interface{} {
+ cur := m
+ name := d.intern(parts[0])
+ for i := 1; i < len(parts); i++ {
+ cur = d.anyChildTable(cur, name)
+ name = d.intern(parts[i])
+ }
+ s, _ := cur[name].([]interface{})
+ if first {
+ s = s[:0]
+ }
+ elem := map[string]interface{}{}
+ cur[name] = append(s, elem)
+ return elem
+}
+
+// setFusedLeaf assigns av at the (possibly dotted) key parts within cur,
+// creating intermediate maps as needed.
+func (d *decoder) setFusedLeaf(cur map[string]interface{}, parts [][]byte, av interface{}) {
+ for i := 0; i < len(parts)-1; i++ {
+ cur = d.anyChildTable(cur, d.intern(parts[i]))
+ }
+ cur[d.intern(parts[len(parts)-1])] = av
+}
+
+// wrapFusedError gives document context to errors produced by the fused
+// decoder.
+func (d *decoder) wrapFusedError(data []byte, err error) error {
+ var perr *unstable.ParserError
+ if errors.As(err, &perr) && len(perr.Highlight) == 0 {
+ // Mirror NextExpression: give end-of-input errors a usable position by
+ // extending the empty highlight to the last byte of the document.
+ if offset := cap(data) - cap(perr.Highlight); offset > 0 && offset == len(data) {
+ perr.Highlight = data[offset-1 : offset]
+ }
+ }
+ return d.wrapError(data, err)
+}
+
+func fusedSkipWS(b []byte) []byte {
+ for len(b) > 0 && (b[0] == ' ' || b[0] == '\t') {
+ b = b[1:]
+ }
+ return b
+}
+
+func fusedConsumeEOL(b []byte) ([]byte, error) {
+ if len(b) == 0 {
+ return b, nil
+ }
+ switch b[0] {
+ case '\n':
+ return b[1:], nil
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ return b[2:], nil
+ }
+ }
+ return nil, unstable.NewParserError(b[:1], "expected newline but got %#U", b[0])
+}
+
+// fusedFinishLine consumes `ws [comment] (newline|eof)` after an expression.
+func (d *decoder) fusedFinishLine(b []byte) ([]byte, error) {
+ b = fusedSkipWS(b)
+ if len(b) > 0 && b[0] == '#' {
+ _, rest, err := parserbridge.ScanComment(b)
+ if err != nil {
+ return nil, err
+ }
+ b = rest
+ }
+ return fusedConsumeEOL(b)
+}
+
+func fusedHL1(b []byte) []byte {
+ if len(b) > 0 {
+ return b[:1]
+ }
+ return b
+}
diff --git a/vendor/github.com/pelletier/go-toml/v2/errors.go b/vendor/github.com/pelletier/go-toml/v2/errors.go
index d68835dfa600..8e10b128d909 100644
--- a/vendor/github.com/pelletier/go-toml/v2/errors.go
+++ b/vendor/github.com/pelletier/go-toml/v2/errors.go
@@ -1,8 +1,7 @@
package toml
import (
- "fmt"
- "reflect"
+ "errors"
"strconv"
"strings"
@@ -47,7 +46,6 @@ func (s *StrictMissingError) String() string {
if i > 0 {
buf.WriteString("\n---\n")
}
-
buf.WriteString(e.String())
}
@@ -73,7 +71,8 @@ func (e *DecodeError) Error() string {
return "toml: " + e.message
}
-// String returns the human-readable contextualized error. This string is multi-line.
+// String returns the human-readable contextualized error. This string is
+// multi-line.
func (e *DecodeError) String() string {
return e.human
}
@@ -84,200 +83,151 @@ func (e *DecodeError) Position() (row int, column int) {
return e.line, e.column
}
-// Key that was being processed when the error occurred. The key is present only
-// if this DecodeError is part of a StrictMissingError.
+// Key that was being processed when the error occurred.
func (e *DecodeError) Key() Key {
return e.key
}
-// wrapDecodeError creates a DecodeError referencing a highlighted
-// range of bytes from document.
-//
-// highlight needs to be a sub-slice of document, or this function panics.
-//
-// The function copies all bytes used in DecodeError, so that document and
-// highlight can be freely deallocated.
-//
-//nolint:funlen
+// wrapDecodeError creates a DecodeError from a ParserError. The highlight of
+// the ParserError needs to be a subslice of the document.
func wrapDecodeError(document []byte, de *unstable.ParserError) *DecodeError {
- offset := subsliceOffset(document, de.Highlight)
-
- errMessage := de.Error()
- errLine, errColumn := positionAtEnd(document[:offset])
- before, after := linesOfContext(document, de.Highlight, offset, 3)
-
- var buf strings.Builder
+ if de == nil {
+ return nil
+ }
+ return newDecodeError(document, de.Highlight, de.Key, de.Message)
+}
- maxLine := errLine + len(after) - 1
- lineColumnWidth := len(strconv.Itoa(maxLine))
+// newDecodeError creates a DecodeError pointing at the given highlight, which
+// needs to be a subslice of the document.
+func newDecodeError(document []byte, highlight []byte, key Key, message string) *DecodeError {
+ offset := subsliceOffset(document, highlight)
- // Write the lines of context strictly before the error.
- for i := len(before) - 1; i > 0; i-- {
- line := errLine - i
- buf.WriteString(formatLineNumber(line, lineColumnWidth))
- buf.WriteString("|")
+ errLineIdx, errColumn := positionAt(document, offset)
- if len(before[i]) > 0 {
- buf.WriteString(" ")
- buf.Write(before[i])
- }
+ human := buildHumanContext(document, errLineIdx, errColumn, len(highlight), message)
- buf.WriteRune('\n')
+ return &DecodeError{
+ message: message,
+ line: errLineIdx + 1,
+ column: errColumn,
+ key: key,
+ human: human,
}
+}
- // Write the document line that contains the error.
-
- buf.WriteString(formatLineNumber(errLine, lineColumnWidth))
- buf.WriteString("| ")
-
- if len(before) > 0 {
- buf.Write(before[0])
+// subsliceOffset returns the offset of the subslice b within the document.
+func subsliceOffset(document, b []byte) int {
+ // Highlights are subslices of the document, which means they share the
+ // same backing array, and their capacity counts the bytes between their
+ // start and the end of the backing array.
+ offset := cap(document) - cap(b)
+ if offset < 0 || offset+len(b) > len(document) {
+ panic(errors.New("highlight is not a subslice of the document"))
}
+ return offset
+}
- buf.Write(de.Highlight)
-
- if len(after) > 0 {
- buf.Write(after[0])
+// positionAt returns the 0-indexed line and the 1-indexed column of the given
+// offset in the document.
+func positionAt(document []byte, offset int) (lineIdx int, column int) {
+ lineStart := 0
+ for i := 0; i < offset; i++ {
+ if document[i] == '\n' {
+ lineIdx++
+ lineStart = i + 1
+ }
}
+ return lineIdx, offset - lineStart + 1
+}
- buf.WriteRune('\n')
-
- // Write the line with the error message itself (so it does not have a line
- // number).
-
- buf.WriteString(strings.Repeat(" ", lineColumnWidth))
- buf.WriteString("| ")
-
- if len(before) > 0 {
- buf.WriteString(strings.Repeat(" ", len(before[0])))
+// docLines splits the document into lines, removing the trailing newline
+// characters.
+func docLines(document []byte) []string {
+ s := string(document)
+ lines := strings.Split(s, "\n")
+ for i, l := range lines {
+ lines[i] = strings.TrimSuffix(l, "\r")
}
+ return lines
+}
- buf.WriteString(strings.Repeat("~", len(de.Highlight)))
+// buildHumanContext renders the human-readable multi-line context of an
+// error: a window of up to 3 lines before and after the error line, with
+// the error position underlined.
+func buildHumanContext(document []byte, errLineIdx, errColumn, highlightLen int, message string) string {
+ lines := docLines(document)
- if len(errMessage) > 0 {
- buf.WriteString(" ")
- buf.WriteString(errMessage)
+ const window = 3
+ firstIdx := errLineIdx - window
+ if firstIdx < 0 {
+ firstIdx = 0
}
-
- // Write the lines of context strictly after the error.
-
- for i := 1; i < len(after); i++ {
- buf.WriteRune('\n')
- line := errLine + i
- buf.WriteString(formatLineNumber(line, lineColumnWidth))
- buf.WriteString("|")
-
- if len(after[i]) > 0 {
- buf.WriteString(" ")
- buf.Write(after[i])
- }
+ lastIdx := errLineIdx + window
+ if lastIdx > len(lines)-1 {
+ lastIdx = len(lines) - 1
}
-
- return &DecodeError{
- message: errMessage,
- line: errLine,
- column: errColumn,
- key: de.Key,
- human: buf.String(),
+ // Empty lines at the edges of the window are dropped, unless the error
+ // is about that very position.
+ for firstIdx < errLineIdx && lines[firstIdx] == "" {
+ firstIdx++
+ }
+ for lastIdx > errLineIdx && lines[lastIdx] == "" {
+ lastIdx--
}
-}
-
-func formatLineNumber(line int, width int) string {
- format := "%" + strconv.Itoa(width) + "d"
- return fmt.Sprintf(format, line)
-}
+ // Width of the column of line numbers.
+ width := len(strconv.Itoa(lastIdx + 1))
-func linesOfContext(document []byte, highlight []byte, offset int, linesAround int) ([][]byte, [][]byte) {
- return beforeLines(document, offset, linesAround), afterLines(document, highlight, offset, linesAround)
-}
+ var buf strings.Builder
-func beforeLines(document []byte, offset int, linesAround int) [][]byte {
- var beforeLines [][]byte
-
- // Walk the document backward from the highlight to find previous lines
- // of context.
- rest := document[:offset]
-backward:
- for o := len(rest) - 1; o >= 0 && len(beforeLines) <= linesAround && len(rest) > 0; {
- switch {
- case rest[o] == '\n':
- // handle individual lines
- beforeLines = append(beforeLines, rest[o+1:])
- rest = rest[:o]
- o = len(rest) - 1
- case o == 0:
- // add the first line only if it's non-empty
- beforeLines = append(beforeLines, rest)
-
- break backward
- default:
- o--
+ writeLine := func(idx int) {
+ number := strconv.Itoa(idx + 1)
+ for i := len(number); i < width; i++ {
+ buf.WriteByte(' ')
}
- }
-
- return beforeLines
-}
-
-func afterLines(document []byte, highlight []byte, offset int, linesAround int) [][]byte {
- var afterLines [][]byte
-
- // Walk the document forward from the highlight to find the following
- // lines of context.
- rest := document[offset+len(highlight):]
-forward:
- for o := 0; o < len(rest) && len(afterLines) <= linesAround; {
- switch {
- case rest[o] == '\n':
- // handle individual lines
- afterLines = append(afterLines, rest[:o])
- rest = rest[o+1:]
- o = 0
-
- case o == len(rest)-1:
- // add last line only if it's non-empty
- afterLines = append(afterLines, rest)
-
- break forward
- default:
- o++
+ buf.WriteString(number)
+ buf.WriteByte('|')
+ if len(lines[idx]) > 0 {
+ buf.WriteByte(' ')
+ buf.WriteString(lines[idx])
}
+ buf.WriteByte('\n')
}
- return afterLines
-}
-
-func positionAtEnd(b []byte) (row int, column int) {
- row = 1
- column = 1
+ for idx := firstIdx; idx <= errLineIdx; idx++ {
+ writeLine(idx)
+ }
- for _, c := range b {
- if c == '\n' {
- row++
- column = 1
- } else {
- column++
+ // Underline the error.
+ for i := 0; i < width; i++ {
+ buf.WriteByte(' ')
+ }
+ buf.WriteString("| ")
+ for i := 1; i < errColumn; i++ {
+ buf.WriteByte(' ')
+ }
+ // The highlight cannot extend past the end of its line.
+ tildes := highlightLen
+ if errLineIdx < len(lines) {
+ if avail := len(lines[errLineIdx]) - errColumn + 1; tildes > avail {
+ tildes = avail
}
}
-
- return row, column
-}
-
-// subsliceOffset returns the byte offset of subslice within data.
-// subslice must share the same backing array as data.
-func subsliceOffset(data []byte, subslice []byte) int {
- if len(subslice) == 0 {
- return 0
+ if tildes < 1 {
+ tildes = 1
}
+ for i := 0; i < tildes; i++ {
+ buf.WriteByte('~')
+ }
+ if message != "" {
+ buf.WriteByte(' ')
+ buf.WriteString(message)
+ }
+ buf.WriteByte('\n')
- // Use reflect to get the data pointers of both slices.
- // This is safe because we're only reading the pointer values for comparison.
- dataPtr := reflect.ValueOf(data).Pointer()
- subPtr := reflect.ValueOf(subslice).Pointer()
-
- offset := int(subPtr - dataPtr)
- if offset < 0 || offset > len(data) {
- panic("subslice is not within data")
+ for idx := errLineIdx + 1; idx <= lastIdx; idx++ {
+ writeLine(idx)
}
- return offset
+
+ return strings.TrimSuffix(buf.String(), "\n")
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go
deleted file mode 100644
index 50a6d170298a..000000000000
--- a/vendor/github.com/pelletier/go-toml/v2/internal/characters/ascii.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package characters
-
-var invalidASCIITable = [256]bool{
- 0x00: true,
- 0x01: true,
- 0x02: true,
- 0x03: true,
- 0x04: true,
- 0x05: true,
- 0x06: true,
- 0x07: true,
- 0x08: true,
- // 0x09 TAB
- // 0x0A LF
- 0x0B: true,
- 0x0C: true,
- // 0x0D CR
- 0x0E: true,
- 0x0F: true,
- 0x10: true,
- 0x11: true,
- 0x12: true,
- 0x13: true,
- 0x14: true,
- 0x15: true,
- 0x16: true,
- 0x17: true,
- 0x18: true,
- 0x19: true,
- 0x1A: true,
- 0x1B: true,
- 0x1C: true,
- 0x1D: true,
- 0x1E: true,
- 0x1F: true,
- // 0x20 - 0x7E Printable ASCII characters
- 0x7F: true,
-}
-
-func InvalidASCII(b byte) bool {
- return invalidASCIITable[b]
-}
diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go b/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go
deleted file mode 100644
index 7c5cb55e4293..000000000000
--- a/vendor/github.com/pelletier/go-toml/v2/internal/characters/utf8.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Package characters provides functions for working with string encodings.
-package characters
-
-import (
- "unicode/utf8"
-)
-
-// Utf8TomlValidAlreadyEscaped verifies that a given string is only made of
-// valid UTF-8 characters allowed by the TOML spec:
-//
-// Any Unicode character may be used except those that must be escaped:
-// quotation mark, backslash, and the control characters other than tab (U+0000
-// to U+0008, U+000A to U+001F, U+007F).
-//
-// It is a copy of the Go 1.17 utf8.Valid implementation, tweaked to exit early
-// when a character is not allowed.
-//
-// The returned slice is empty if the string is valid, or contains the bytes
-// of the invalid character.
-//
-// quotation mark => already checked
-// backslash => already checked
-// 0-0x8 => invalid
-// 0x9 => tab, ok
-// 0xA - 0x1F => invalid
-// 0x7F => invalid
-func Utf8TomlValidAlreadyEscaped(p []byte) []byte {
- // Fast path. Check for and skip 8 bytes of ASCII characters per iteration.
- for len(p) >= 8 {
- // Combining two 32 bit loads allows the same code to be used
- // for 32 and 64 bit platforms.
- // The compiler can generate a 32bit load for first32 and second32
- // on many platforms. See test/codegen/memcombine.go.
- first32 := uint32(p[0]) | uint32(p[1])<<8 | uint32(p[2])<<16 | uint32(p[3])<<24
- second32 := uint32(p[4]) | uint32(p[5])<<8 | uint32(p[6])<<16 | uint32(p[7])<<24
- if (first32|second32)&0x80808080 != 0 {
- // Found a non ASCII byte (>= RuneSelf).
- break
- }
-
- for i, b := range p[:8] {
- if InvalidASCII(b) {
- return p[i : i+1]
- }
- }
-
- p = p[8:]
- }
- n := len(p)
- for i := 0; i < n; {
- pi := p[i]
- if pi < utf8.RuneSelf {
- if InvalidASCII(pi) {
- return p[i : i+1]
- }
- i++
- continue
- }
- x := first[pi]
- if x == xx {
- // Illegal starter byte.
- return p[i : i+1]
- }
- size := int(x & 7)
- if i+size > n {
- // Short or invalid.
- return p[i:n]
- }
- accept := acceptRanges[x>>4]
- if c := p[i+1]; c < accept.lo || accept.hi < c {
- return p[i : i+2]
- } else if size == 2 { //revive:disable:empty-block
- } else if c := p[i+2]; c < locb || hicb < c {
- return p[i : i+3]
- } else if size == 3 { //revive:disable:empty-block
- } else if c := p[i+3]; c < locb || hicb < c {
- return p[i : i+4]
- }
- i += size
- }
- return nil
-}
-
-// Utf8ValidNext returns the size of the next rune if valid, 0 otherwise.
-func Utf8ValidNext(p []byte) int {
- c := p[0]
-
- if c < utf8.RuneSelf {
- if InvalidASCII(c) {
- return 0
- }
- return 1
- }
-
- x := first[c]
- if x == xx {
- // Illegal starter byte.
- return 0
- }
- size := int(x & 7)
- if size > len(p) {
- // Short or invalid.
- return 0
- }
- accept := acceptRanges[x>>4]
- if c := p[1]; c < accept.lo || accept.hi < c {
- return 0
- } else if size == 2 { //nolint:revive
- } else if c := p[2]; c < locb || hicb < c {
- return 0
- } else if size == 3 { //nolint:revive
- } else if c := p[3]; c < locb || hicb < c {
- return 0
- }
-
- return size
-}
-
-// acceptRange gives the range of valid values for the second byte in a UTF-8
-// sequence.
-type acceptRange struct {
- lo uint8 // lowest value for second byte.
- hi uint8 // highest value for second byte.
-}
-
-// acceptRanges has size 16 to avoid bounds checks in the code that uses it.
-var acceptRanges = [16]acceptRange{
- 0: {locb, hicb},
- 1: {0xA0, hicb},
- 2: {locb, 0x9F},
- 3: {0x90, hicb},
- 4: {locb, 0x8F},
-}
-
-// first is information about the first byte in a UTF-8 sequence.
-var first = [256]uint8{
- // 1 2 3 4 5 6 7 8 9 A B C D E F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x00-0x0F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x10-0x1F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x20-0x2F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x30-0x3F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x40-0x4F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x50-0x5F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x60-0x6F
- as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, as, // 0x70-0x7F
- // 1 2 3 4 5 6 7 8 9 A B C D E F
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x80-0x8F
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0x90-0x9F
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xA0-0xAF
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xB0-0xBF
- xx, xx, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xC0-0xCF
- s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, s1, // 0xD0-0xDF
- s2, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s3, s4, s3, s3, // 0xE0-0xEF
- s5, s6, s6, s6, s7, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, // 0xF0-0xFF
-}
-
-const (
- // The default lowest and highest continuation byte.
- locb = 0b10000000
- hicb = 0b10111111
-
- // These names of these constants are chosen to give nice alignment in the
- // table below. The first nibble is an index into acceptRanges or F for
- // special one-byte cases. The second nibble is the Rune length or the
- // Status for the special one-byte case.
- xx = 0xF1 // invalid: size 1
- as = 0xF0 // ASCII: size 1
- s1 = 0x02 // accept 0, size 2
- s2 = 0x13 // accept 1, size 3
- s3 = 0x03 // accept 0, size 3
- s4 = 0x23 // accept 2, size 3
- s5 = 0x34 // accept 3, size 4
- s6 = 0x04 // accept 0, size 4
- s7 = 0x44 // accept 4, size 4
-)
diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/parserbridge/parserbridge.go b/vendor/github.com/pelletier/go-toml/v2/internal/parserbridge/parserbridge.go
new file mode 100644
index 000000000000..703aceea457c
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/internal/parserbridge/parserbridge.go
@@ -0,0 +1,37 @@
+// Package parserbridge exposes the unstable parser's non-AST scanners to the
+// root toml package without making them part of the unstable public API.
+//
+// The fused generic-decode fast path needs to scan keys, scalars and comments
+// (and parse container values into the arena) without going through the
+// AST-pushing NextExpression/Expression methods. Those scanners depend on
+// Parser internals (the string-unescape scratch buffer and the node arena), so
+// they have to live in the unstable package; but they are an implementation
+// detail of the decoder, not something we want to commit to in the public API.
+//
+// The unstable package populates these variables in its init; the toml package
+// reads them. The parser is passed as an any (it is always an *unstable.Parser)
+// and the scalar kind is an int (it is always an unstable.Kind) so that this
+// package imports neither unstable nor toml, avoiding an import cycle. Passing
+// a pointer through an interface does not allocate, so the fused path keeps its
+// allocation profile.
+package parserbridge
+
+var (
+ // ScanScalar scans a single scalar value (string, integer, float, bool or
+ // date/time) without building an AST node. kind is an unstable.Kind.
+ ScanScalar func(p any, b []byte) (kind int, raw, value, rest []byte, err error)
+
+ // ScanKey scans a (possibly dotted) key without building AST nodes,
+ // appending each decoded part to dst.
+ ScanKey func(p any, b []byte, dst [][]byte) (parts [][]byte, raw, rest []byte, err error)
+
+ // ScanComment scans a comment starting at '#', returning the comment bytes
+ // (including '#', excluding the line ending) and the rest of the input. It
+ // needs no parser state.
+ ScanComment func(b []byte) (comment, rest []byte, err error)
+
+ // ParseValue parses a single value (including arrays and inline tables) into
+ // the parser arena, returning the root *unstable.Node and the rest of the
+ // input.
+ ParseValue func(p any, b []byte) (node any, rest []byte, err error)
+)
diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go
index 6344fd047de9..661b11cf9d78 100644
--- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go
+++ b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/key.go
@@ -14,7 +14,8 @@ func (t *KeyTracker) UpdateTable(node *unstable.Node) {
t.Push(node)
}
-// UpdateArrayTable sets the state of the tracker with the AST array table node.
+// UpdateArrayTable sets the state of the tracker with the AST array table
+// node.
func (t *KeyTracker) UpdateArrayTable(node *unstable.Node) {
t.reset()
t.Push(node)
diff --git a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go
index 20623580012c..e88cd94151eb 100644
--- a/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go
+++ b/vendor/github.com/pelletier/go-toml/v2/internal/tracker/seen.go
@@ -3,7 +3,6 @@ package tracker
import (
"bytes"
"fmt"
- "sync"
"github.com/pelletier/go-toml/v2/unstable"
)
@@ -12,9 +11,21 @@ type keyKind uint8
const (
invalidKind keyKind = iota
+ // valueKind is a regular value (scalar, array, or inline table). It
+ // cannot be extended.
valueKind
+ // kvTableKind is a table created implicitly by a dotted key. It can only
+ // be extended by other dotted keys.
+ kvTableKind
+ // tableKind is a table created by a [header]. The explicit flag tells
+ // whether the table was created by its own header (true) or as an
+ // intermediate step of a longer key (false).
tableKind
+ // arrayTableKind is an array of tables created by [[header]].
arrayTableKind
+ // anonymousKind is an entry that cannot be looked up by name. It serves
+ // as the parent of the content of inline tables stored inside arrays.
+ anonymousKind
)
func (k keyKind) String() string {
@@ -23,22 +34,36 @@ func (k keyKind) String() string {
return "invalid"
case valueKind:
return "value"
+ case kvTableKind:
+ return "kv-table"
case tableKind:
return "table"
case arrayTableKind:
- return "array table"
+ return "array-table"
+ case anonymousKind:
+ return "anonymous"
}
panic("missing keyKind string mapping")
}
+// entry represents a node that has been seen in the document. Its size has a
+// direct impact on the performance of unmarshaling documents: keep it as
+// small as possible.
+type entry struct {
+ parent int32
+ kind keyKind
+ explicit bool
+ name []byte
+}
+
// SeenTracker tracks which keys have been seen with which TOML type to flag
// duplicates and mismatches according to the spec.
//
-// Each node in the visited tree is represented by an entry. Each entry has an
-// identifier, which is provided by a counter. Entries are stored in the array
-// entries. As new nodes are discovered (referenced for the first time in the
-// TOML document), entries are created and appended to the array. An entry
-// points to its parent using its id.
+// Each node in the visited tree is represented by an entry. Each entry has
+// an identifier, which is provided by a counter. Entries are stored in the
+// array entries. As new nodes are discovered (referenced for the first time
+// in the TOML document), entries are created and appended to the array. An
+// entry points to its parent using its id.
//
// To find whether a given key (sequence of []byte) has already been visited,
// the entries are linearly searched, looking for one with the right name and
@@ -53,307 +78,373 @@ func (k keyKind) String() string {
// invariant above, the deletion process needs to keep the order of entries.
// This results in more copies in that case.
type SeenTracker struct {
- entries []entry
- currentIdx int
-}
+ entries []entry
+ currentTable int32
-var pool = sync.Pool{
- New: func() interface{} {
- return &SeenTracker{}
- },
+ // scratch buffers for clear()
+ removedBuf []bool
+ remapBuf []int32
}
-func (s *SeenTracker) reset() {
- // Always contains a root element at index 0.
- s.currentIdx = 0
- if len(s.entries) == 0 {
- s.entries = make([]entry, 1, 2)
- } else {
- s.entries = s.entries[:1]
- }
- s.entries[0].child = -1
- s.entries[0].next = -1
+// Reset brings the tracker to its initial state, with just a root table, so
+// that it can be reused across documents.
+func (s *SeenTracker) Reset() {
+ s.reset()
}
-type entry struct {
- // Use -1 to indicate no child or no sibling.
- child int
- next int
-
- name []byte
- kind keyKind
- explicit bool
- kv bool
+// reset brings the tracker to its initial state, with just a root table.
+func (s *SeenTracker) reset() {
+ s.entries = append(s.entries[:0], entry{
+ parent: -1,
+ kind: tableKind,
+ })
+ s.currentTable = 0
}
-// Find the index of the child of parentIdx with key k. Returns -1 if
-// it does not exist.
-func (s *SeenTracker) find(parentIdx int, k []byte) int {
- for i := s.entries[parentIdx].child; i >= 0; i = s.entries[i].next {
- if bytes.Equal(s.entries[i].name, k) {
- return i
+// find returns the id of the entry with the given parent and name, or -1.
+// Anonymous entries are never returned.
+func (s *SeenTracker) find(parent int32, name []byte) int32 {
+ // Children always appear after their parent.
+ for i := int(parent) + 1; i < len(s.entries); i++ {
+ e := &s.entries[i]
+ if e.parent == parent && e.kind != anonymousKind && bytes.Equal(e.name, name) {
+ return int32(i) //nolint:gosec // entry counts are bounded by document size
}
}
return -1
}
-// Remove all descendants of node at position idx.
-func (s *SeenTracker) clear(idx int) {
- if idx >= len(s.entries) {
- return
- }
-
- for i := s.entries[idx].child; i >= 0; {
- next := s.entries[i].next
- n := s.entries[0].next
- s.entries[0].next = i
- s.entries[i].next = n
- s.entries[i].name = nil
- s.clear(i)
- i = next
- }
-
- s.entries[idx].child = -1
-}
-
-func (s *SeenTracker) create(parentIdx int, name []byte, kind keyKind, explicit bool, kv bool) int {
- e := entry{
- child: -1,
- next: s.entries[parentIdx].child,
-
- name: name,
+// create appends a new entry and returns its id.
+func (s *SeenTracker) create(parent int32, name []byte, kind keyKind, explicit bool) int32 {
+ id := int32(len(s.entries)) //nolint:gosec // entry counts are bounded by document size
+ s.entries = append(s.entries, entry{
+ parent: parent,
kind: kind,
explicit: explicit,
- kv: kv,
+ name: name,
+ })
+ return id
+}
+
+// clear removes all the descendants of the entry with the given id, keeping
+// the order of the remaining entries.
+func (s *SeenTracker) clear(id int32) {
+ // Compute which entries are removed. Given that children always appear
+ // after their parent, a single forward pass is enough.
+ if cap(s.removedBuf) < len(s.entries) {
+ s.removedBuf = make([]bool, len(s.entries))
+ s.remapBuf = make([]int32, len(s.entries))
}
- var idx int
- if s.entries[0].next >= 0 {
- idx = s.entries[0].next
- s.entries[0].next = s.entries[idx].next
- s.entries[idx] = e
- } else {
- idx = len(s.entries)
- s.entries = append(s.entries, e)
+ removed := s.removedBuf[:len(s.entries)]
+ remap := s.remapBuf[:len(s.entries)]
+ for i := range removed {
+ removed[i] = false
}
- s.entries[parentIdx].child = idx
-
- return idx
-}
-
-func (s *SeenTracker) setExplicitFlag(parentIdx int) {
- for i := s.entries[parentIdx].child; i >= 0; i = s.entries[i].next {
- if s.entries[i].kv {
- s.entries[i].explicit = true
- s.entries[i].kv = false
+ n := int32(0)
+ for i := 0; i < len(s.entries); i++ {
+ parent := s.entries[i].parent
+ if parent >= 0 && (parent == id && s.entries[i].kind != invalidKind || removed[parent]) {
+ removed[i] = true
+ continue
}
- s.setExplicitFlag(i)
+ remap[i] = n
+ if int32(i) != n { //nolint:gosec // entry counts are bounded by document size
+ e := s.entries[i]
+ e.parent = remap[e.parent]
+ s.entries[n] = e
+ }
+ n++
}
+ s.entries = s.entries[:n]
}
// CheckExpression takes a top-level node and checks that it does not contain
// keys that have been seen in previous calls, and validates that types are
-// consistent. It returns true if it is the first time this node's key is seen.
-// Useful to clear array tables on first use.
+// consistent. It returns true if it is the first time this node's key is
+// seen. Useful to clear array tables on first use.
func (s *SeenTracker) CheckExpression(node *unstable.Node) (bool, error) {
- if s.entries == nil {
+ if len(s.entries) == 0 {
s.reset()
}
switch node.Kind {
case unstable.KeyValue:
- return s.checkKeyValue(node)
+ return false, s.checkKeyValue(s.currentTable, node)
case unstable.Table:
return s.checkTable(node)
case unstable.ArrayTable:
return s.checkArrayTable(node)
default:
- panic(fmt.Errorf("this should not be a top level node type: %s", node.Kind))
+ return false, fmt.Errorf("toml: unexpected expression kind %s", node.Kind)
}
}
-func (s *SeenTracker) checkTable(node *unstable.Node) (bool, error) {
- if s.currentIdx >= 0 {
- s.setExplicitFlag(s.currentIdx)
- }
-
- it := node.Key()
-
- parentIdx := 0
-
- // This code is duplicated in checkArrayTable. This is because factoring
- // it in a function requires to copy the iterator, or allocate it to the
- // heap, which is not cheap.
- for it.Next() {
- if it.IsLast() {
- break
+// CheckTable validates a [table] header given the decoded parts of its key.
+// It mirrors checkTable but is driven directly from the key parts instead of
+// an AST, for callers that decode without building one. It returns whether the
+// table is seen for the first time.
+func (s *SeenTracker) CheckTable(parts [][]byte) (bool, error) {
+ parent := int32(0)
+ for k := 0; k < len(parts); k++ {
+ name := parts[k]
+ if k == len(parts)-1 {
+ // Final part of the key.
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, true)
+ s.currentTable = i
+ return true, nil
+ }
+ e := &s.entries[i]
+ switch e.kind {
+ case tableKind:
+ if e.explicit {
+ return false, fmt.Errorf("toml: table %s already exists", name)
+ }
+ e.explicit = true
+ s.currentTable = i
+ return false, nil
+ case kvTableKind:
+ return false, fmt.Errorf("toml: table %s already exists as defined by a dotted key", name)
+ case arrayTableKind:
+ return false, fmt.Errorf("toml: table %s already exists as an array of tables", name)
+ default:
+ return false, fmt.Errorf("toml: key %s should be a table, not a %s", name, e.kind)
+ }
}
- k := it.Node().Data
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, false)
+ } else {
+ switch s.entries[i].kind {
+ case tableKind, arrayTableKind, kvTableKind:
+ // Tables created by dotted keys can receive new sub-tables,
+ // but cannot be redefined (handled by the last-part case).
+ default:
+ return false, fmt.Errorf("toml: key %s already exists as a value", name)
+ }
+ }
+ parent = i
+ }
+ panic("unreachable: table expression without key")
+}
- idx := s.find(parentIdx, k)
+// CheckArrayTable validates a [[array table]] header given the decoded parts
+// of its key. It mirrors checkArrayTable but is driven directly from the key
+// parts. It returns whether the array table is seen for the first time.
+func (s *SeenTracker) CheckArrayTable(parts [][]byte) (bool, error) {
+ parent := int32(0)
+ for k := 0; k < len(parts); k++ {
+ name := parts[k]
+ if k == len(parts)-1 {
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, arrayTableKind, true)
+ s.currentTable = i
+ return true, nil
+ }
+ if s.entries[i].kind != arrayTableKind {
+ return false, fmt.Errorf("toml: key %s already exists as a %s, but should be an array table", name, s.entries[i].kind)
+ }
+ // Make the descendants of this array table re-discoverable for
+ // the new element.
+ s.clear(i)
+ s.currentTable = i
+ return false, nil
+ }
- if idx < 0 {
- idx = s.create(parentIdx, k, tableKind, false, false)
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, false)
} else {
- entry := s.entries[idx]
- if entry.kind == valueKind {
- return false, fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind)
+ switch s.entries[i].kind {
+ case tableKind, arrayTableKind, kvTableKind:
+ // Tables created by dotted keys can receive new sub-tables,
+ // but cannot be redefined (handled by the last-part case).
+ default:
+ return false, fmt.Errorf("toml: key %s already exists as a value", name)
}
}
- parentIdx = idx
+ parent = i
}
+ panic("unreachable: array table expression without key")
+}
- k := it.Node().Data
- idx := s.find(parentIdx, k)
-
- first := false
- if idx >= 0 {
- kind := s.entries[idx].kind
- if kind != tableKind {
- return false, fmt.Errorf("toml: key %s should be a table, not a %s", string(k), kind)
+// CheckKeyValue validates the (possibly dotted) key of a key-value under the
+// current table, WITHOUT validating its value. It returns the id of the leaf
+// entry, so the caller can validate a container value with CheckValueUnder.
+func (s *SeenTracker) CheckKeyValue(parts [][]byte) (int32, error) {
+ parent := s.currentTable
+ for k := 0; k < len(parts); k++ {
+ name := parts[k]
+ if k == len(parts)-1 {
+ if i := s.find(parent, name); i >= 0 {
+ return -1, fmt.Errorf("toml: key %s is already defined", name)
+ }
+ return s.create(parent, name, valueKind, false), nil
}
- if s.entries[idx].explicit {
- return false, fmt.Errorf("toml: table %s already exists", string(k))
+
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, kvTableKind, false)
+ } else if s.entries[i].kind != kvTableKind {
+ return -1, fmt.Errorf("toml: key %s is already defined", name)
}
- s.entries[idx].explicit = true
- } else {
- idx = s.create(parentIdx, k, tableKind, true, false)
- first = true
+ parent = i
}
+ panic("unreachable: key-value expression without key")
+}
- s.currentIdx = idx
-
- return first, nil
+// CheckValueUnder validates the content of a value stored under the given
+// entry (typically the leaf returned by CheckKeyValue): inline tables cannot
+// contain duplicate keys, including in the inline tables and arrays they
+// contain.
+func (s *SeenTracker) CheckValueUnder(parent int32, value *unstable.Node) error {
+ return s.checkValue(parent, value)
}
-func (s *SeenTracker) checkArrayTable(node *unstable.Node) (bool, error) {
- if s.currentIdx >= 0 {
- s.setExplicitFlag(s.currentIdx)
- }
+func (s *SeenTracker) checkTable(node *unstable.Node) (bool, error) {
+ parent := int32(0)
it := node.Key()
-
- parentIdx := 0
-
+ // Handle the intermediate parts of the key.
for it.Next() {
+ part := it.Node()
+ name := part.Data
if it.IsLast() {
- break
+ // Final part of the key.
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, true)
+ s.currentTable = i
+ return true, nil
+ }
+ e := &s.entries[i]
+ switch e.kind {
+ case tableKind:
+ if e.explicit {
+ return false, fmt.Errorf("toml: table %s already exists", name)
+ }
+ e.explicit = true
+ s.currentTable = i
+ return false, nil
+ case kvTableKind:
+ return false, fmt.Errorf("toml: table %s already exists as defined by a dotted key", name)
+ case arrayTableKind:
+ return false, fmt.Errorf("toml: table %s already exists as an array of tables", name)
+ default:
+ return false, fmt.Errorf("toml: key %s should be a table, not a %s", name, e.kind)
+ }
}
- k := it.Node().Data
-
- idx := s.find(parentIdx, k)
-
- if idx < 0 {
- idx = s.create(parentIdx, k, tableKind, false, false)
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, false)
} else {
- entry := s.entries[idx]
- if entry.kind == valueKind {
- return false, fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind)
+ switch s.entries[i].kind {
+ case tableKind, arrayTableKind, kvTableKind:
+ // Tables created by dotted keys can receive new sub-tables,
+ // but cannot be redefined (handled by the last-part case).
+ default:
+ return false, fmt.Errorf("toml: key %s already exists as a value", name)
}
}
-
- parentIdx = idx
+ parent = i
}
-
- k := it.Node().Data
- idx := s.find(parentIdx, k)
-
- firstTime := idx < 0
- if firstTime {
- idx = s.create(parentIdx, k, arrayTableKind, true, false)
- } else {
- kind := s.entries[idx].kind
- if kind != arrayTableKind {
- return false, fmt.Errorf("toml: key %s already exists as a %s, but should be an array table", kind, string(k))
- }
- s.clear(idx)
- }
-
- s.currentIdx = idx
-
- return firstTime, nil
+ panic("unreachable: table expression without key")
}
-func (s *SeenTracker) checkKeyValue(node *unstable.Node) (bool, error) {
- parentIdx := s.currentIdx
- it := node.Key()
+func (s *SeenTracker) checkArrayTable(node *unstable.Node) (bool, error) {
+ parent := int32(0)
+ it := node.Key()
for it.Next() {
- k := it.Node().Data
-
- idx := s.find(parentIdx, k)
+ part := it.Node()
+ name := part.Data
+ if it.IsLast() {
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, arrayTableKind, true)
+ s.currentTable = i
+ return true, nil
+ }
+ if s.entries[i].kind != arrayTableKind {
+ return false, fmt.Errorf("toml: key %s already exists as a %s, but should be an array table", name, s.entries[i].kind)
+ }
+ // Make the descendants of this array table re-discoverable for
+ // the new element.
+ s.clear(i)
+ // Note: clear cannot move i because i comes before all its
+ // descendants.
+ s.currentTable = i
+ return false, nil
+ }
- if idx < 0 {
- idx = s.create(parentIdx, k, tableKind, false, true)
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, tableKind, false)
} else {
- entry := s.entries[idx]
- switch {
- case it.IsLast():
- return false, fmt.Errorf("toml: key %s is already defined", string(k))
- case entry.kind != tableKind:
- return false, fmt.Errorf("toml: expected %s to be a table, not a %s", string(k), entry.kind)
- case entry.explicit:
- return false, fmt.Errorf("toml: cannot redefine table %s that has already been explicitly defined", string(k))
+ switch s.entries[i].kind {
+ case tableKind, arrayTableKind, kvTableKind:
+ // Tables created by dotted keys can receive new sub-tables,
+ // but cannot be redefined (handled by the last-part case).
+ default:
+ return false, fmt.Errorf("toml: key %s already exists as a value", name)
}
}
-
- parentIdx = idx
- }
-
- s.entries[parentIdx].kind = valueKind
-
- value := node.Value()
-
- switch value.Kind {
- case unstable.InlineTable:
- return s.checkInlineTable(value)
- case unstable.Array:
- return s.checkArray(value)
- default:
- return false, nil
+ parent = i
}
+ panic("unreachable: array table expression without key")
}
-func (s *SeenTracker) checkArray(node *unstable.Node) (first bool, err error) {
- it := node.Children()
+func (s *SeenTracker) checkKeyValue(parent int32, node *unstable.Node) error {
+ it := node.Key()
for it.Next() {
- n := it.Node()
- switch n.Kind { //nolint:exhaustive
- case unstable.InlineTable:
- first, err = s.checkInlineTable(n)
- if err != nil {
- return false, err
- }
- case unstable.Array:
- first, err = s.checkArray(n)
- if err != nil {
- return false, err
+ part := it.Node()
+ name := part.Data
+ if it.IsLast() {
+ if i := s.find(parent, name); i >= 0 {
+ return fmt.Errorf("toml: key %s is already defined", name)
}
+ id := s.create(parent, name, valueKind, false)
+ return s.checkValue(id, node.Value())
}
+
+ i := s.find(parent, name)
+ if i < 0 {
+ i = s.create(parent, name, kvTableKind, false)
+ } else if s.entries[i].kind != kvTableKind {
+ return fmt.Errorf("toml: key %s is already defined", name)
+ }
+ parent = i
}
- return first, nil
+ panic("unreachable: key-value expression without key")
}
-func (s *SeenTracker) checkInlineTable(node *unstable.Node) (first bool, err error) {
- s = pool.Get().(*SeenTracker)
- s.reset()
-
- it := node.Children()
- for it.Next() {
- n := it.Node()
- first, err = s.checkKeyValue(n)
- if err != nil {
- return false, err
+// checkValue verifies the content of a value: inline tables cannot contain
+// duplicate keys, including in the inline tables and arrays they contain.
+func (s *SeenTracker) checkValue(id int32, value *unstable.Node) error {
+ switch value.Kind {
+ case unstable.InlineTable:
+ it := value.Children()
+ for it.Next() {
+ if err := s.checkKeyValue(id, it.Node()); err != nil {
+ return err
+ }
+ }
+ case unstable.Array:
+ it := value.Children()
+ for it.Next() {
+ elem := it.Node()
+ if elem.Kind == unstable.InlineTable || elem.Kind == unstable.Array {
+ elemID := s.create(id, nil, anonymousKind, false)
+ if err := s.checkValue(elemID, elem); err != nil {
+ return err
+ }
+ }
}
+ default:
}
-
- // As inline tables are self-contained, the tracker does not
- // need to retain the details of what they contain. The
- // keyValue element that creates the inline table is kept to
- // mark the presence of the inline table and prevent
- // redefinition of its keys: check* functions cannot walk into
- // a value.
- pool.Put(s)
- return first, nil
+ return nil
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/localtime.go b/vendor/github.com/pelletier/go-toml/v2/localtime.go
index 502ef2f2f116..eb8c20e6d0c1 100644
--- a/vendor/github.com/pelletier/go-toml/v2/localtime.go
+++ b/vendor/github.com/pelletier/go-toml/v2/localtime.go
@@ -62,7 +62,7 @@ func (d LocalTime) String() string {
} else if d.Nanosecond > 0 {
// Nanoseconds are specified, but precision is not provided. Use the
// minimum.
- s += strings.Trim(fmt.Sprintf(".%09d", d.Nanosecond), "0")
+ s += strings.TrimRight(fmt.Sprintf(".%09d", d.Nanosecond), "0")
}
return s
@@ -77,7 +77,7 @@ func (d LocalTime) MarshalText() ([]byte, error) {
func (d *LocalTime) UnmarshalText(b []byte) error {
res, left, err := parseLocalTime(b)
if err == nil && len(left) != 0 {
- err = unstable.NewParserError(left, "extra characters")
+ err = unstable.NewParserError(left, "extra characters at the end of a local time")
}
if err != nil {
return err
@@ -111,12 +111,11 @@ func (d LocalDateTime) MarshalText() ([]byte, error) {
func (d *LocalDateTime) UnmarshalText(data []byte) error {
res, left, err := parseLocalDateTime(data)
if err == nil && len(left) != 0 {
- err = unstable.NewParserError(left, "extra characters")
+ err = unstable.NewParserError(left, "extra characters at the end of a local date time")
}
if err != nil {
return err
}
-
*d = res
return nil
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/marshaler.go
index ca462d40e039..7f6a9408e45c 100644
--- a/vendor/github.com/pelletier/go-toml/v2/marshaler.go
+++ b/vendor/github.com/pelletier/go-toml/v2/marshaler.go
@@ -12,25 +12,37 @@ import (
"slices"
"strconv"
"strings"
+ "sync"
"time"
- "unicode"
+ "unicode/utf8"
- "github.com/pelletier/go-toml/v2/internal/characters"
+ "github.com/pelletier/go-toml/v2/internal/parserbridge"
+ "github.com/pelletier/go-toml/v2/unstable"
)
// Marshal serializes a Go value as a TOML document.
//
// It is a shortcut for Encoder.Encode() with the default options.
func Marshal(v interface{}) ([]byte, error) {
- var buf bytes.Buffer
- enc := NewEncoder(&buf)
+ enc := Encoder{indentSymbol: " "}
- err := enc.Encode(v)
+ e := encoderStatePool.Get().(*encoderState)
+ e.Encoder = &enc
+ e.marshalerOn = enc.marshalerInterface
+ e.buf = e.buf[:0]
+ e.keyStack = e.keyStack[:0]
+ e.lastWasHeader = false
+
+ err := e.encodeRoot(v)
if err != nil {
+ encoderStatePool.Put(e)
return nil, err
}
- return buf.Bytes(), nil
+ out := make([]byte, len(e.buf))
+ copy(out, e.buf)
+ encoderStatePool.Put(e)
+ return out, nil
}
// Encoder writes a TOML document to an output stream.
@@ -44,6 +56,9 @@ type Encoder struct {
indentSymbol string
indentTables bool
marshalJSONNumbers bool
+
+ // toggles the unstable.Marshaler interface
+ marshalerInterface bool
}
// NewEncoder returns a new Encoder that writes to w.
@@ -56,8 +71,8 @@ func NewEncoder(w io.Writer) *Encoder {
// SetTablesInline forces the encoder to emit all tables inline.
//
-// This behavior can be controlled on an individual struct field basis with the
-// inline tag:
+// This behavior can be controlled on an individual struct field basis with
+// the inline tag:
//
// MyField `toml:",inline"`
func (enc *Encoder) SetTablesInline(inline bool) *Encoder {
@@ -65,10 +80,11 @@ func (enc *Encoder) SetTablesInline(inline bool) *Encoder {
return enc
}
-// SetArraysMultiline forces the encoder to emit all arrays with one element per
-// line.
+// SetArraysMultiline forces the encoder to emit all arrays with one element
+// per line.
//
-// This behavior can be controlled on an individual struct field basis with the multiline tag:
+// This behavior can be controlled on an individual struct field basis with
+// the multiline tag:
//
// MyField `multiline:"true"`
func (enc *Encoder) SetArraysMultiline(multiline bool) *Encoder {
@@ -101,6 +117,35 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder {
return enc
}
+// EnableMarshalerInterface enables the unstable.Marshaler interface.
+//
+// With this feature enabled, types implementing the unstable.Marshaler
+// interface emit their own raw TOML instead of being encoded structurally. It
+// is the encoding counterpart of Decoder.EnableUnmarshalerInterface, and allows
+// types such as unstable.RawMessage to round-trip raw TOML bytes.
+//
+// The bytes returned by MarshalTOML are spliced into the document verbatim. The
+// encoder parses them to decide between the valid positions:
+// - bytes forming a single value are emitted inline, as in `key = `;
+// - bytes forming key-value lines are emitted as the body of a `[key]` table;
+// - at the document root, the bytes are emitted as the whole document: the
+// encode counterpart of the decoder delivering the whole document to a
+// root unstable.Unmarshaler.
+//
+// An empty result is omitted from the output. Bytes that are not valid TOML
+// for their position result in an error, as do bytes forming table content in
+// a position where only a value is valid (an array element, an inline table,
+// or a table forced inline). MarshalTOML can be called more than once for the
+// same value during a single encode, so it must be deterministic.
+//
+// *Unstable:* This method does not follow the compatibility guarantees of
+// semver. It can be changed or removed without a new major version being
+// issued.
+func (enc *Encoder) EnableMarshalerInterface() *Encoder {
+ enc.marshalerInterface = true
+ return enc
+}
+
// Encode writes a TOML representation of v to the stream.
//
// If v cannot be represented to TOML it returns an error.
@@ -119,9 +164,9 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder {
//
// Intermediate tables are always printed.
//
-// By default, strings are encoded as literal string, unless they contain either
-// a newline character or a single quote. In that case they are emitted as
-// quoted strings.
+// By default, strings are encoded as literal string, unless they contain
+// either a newline character or a single quote. In that case they are emitted
+// as quoted strings.
//
// Unsigned integers larger than math.MaxInt64 cannot be encoded. Doing so
// results in an error. This rule exists because the TOML specification only
@@ -130,8 +175,8 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder {
// readable (at best) by other implementations. To encode such numbers, a
// solution is a custom type that implements encoding.TextMarshaler.
//
-// When encoding structs, fields are encoded in order of definition, with their
-// exact name.
+// When encoding structs, fields are encoded in order of definition, with
+// their exact name.
//
// Tables and array tables are separated by empty lines. However, consecutive
// subtables definitions are not. For example:
@@ -151,1052 +196,1502 @@ func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder {
// The encoding of each public struct field can be customized by the format
// string in the "toml" key of the struct field's tag. This follows
// encoding/json's convention. The format string starts with the name of the
-// field, optionally followed by a comma-separated list of options. The name may
-// be empty in order to provide options without overriding the default name.
+// field, optionally followed by a comma-separated list of options. The name
+// may be empty in order to provide options without overriding the default
+// name.
//
-// The "multiline" option emits strings as quoted multi-line TOML strings. It
-// has no effect on fields that would not be encoded as strings.
+// The "multiline" option emits strings as quoted multi-line TOML strings, and
+// arrays with one element per line. For strings, it only takes effect when the
+// value contains a newline; single-line values are emitted as regular strings.
+// It has no effect on fields that would not be encoded as strings or arrays.
//
-// The "inline" option turns fields that would be emitted as tables into inline
-// tables instead. It has no effect on other fields.
+// The "inline" option turns fields that would be emitted as tables into
+// inline tables instead. It has no effect on other fields.
//
// The "omitempty" option prevents empty values or groups from being emitted.
//
// The "omitzero" option prevents zero values or groups from being emitted.
//
-// The "commented" option prefixes the value and all its children with a comment
-// symbol.
+// The "commented" option prefixes the value and all its children with a
+// comment symbol.
//
-// In addition to the "toml" tag struct tag, a "comment" tag can be used to emit
-// a TOML comment before the value being annotated. Comments are ignored inside
-// inline tables. For array tables, the comment is only present before the first
-// element of the array.
+// In addition to the "toml" tag struct tag, a "comment" tag can be used to
+// emit a TOML comment before the value being annotated. Comments are ignored
+// inside inline tables. For array tables, the comment is only present before
+// the first element of the array.
func (enc *Encoder) Encode(v interface{}) error {
- var (
- b []byte
- ctx encoderCtx
- )
-
- ctx.inline = enc.tablesInline
-
- if v == nil {
- return errors.New("toml: cannot encode a nil interface")
- }
-
- b, err := enc.encode(b, ctx, reflect.ValueOf(v))
+ e := encoderStatePool.Get().(*encoderState)
+ e.Encoder = enc
+ e.marshalerOn = enc.marshalerInterface
+ e.buf = e.buf[:0]
+ e.keyStack = e.keyStack[:0]
+ e.lastWasHeader = false
+
+ err := e.encodeRoot(v)
if err != nil {
+ encoderStatePool.Put(e)
return err
}
- _, err = enc.w.Write(b)
+ _, err = enc.w.Write(e.buf)
+ encoderStatePool.Put(e)
if err != nil {
return fmt.Errorf("toml: cannot write: %w", err)
}
-
return nil
}
-type valueOptions struct {
- multiline bool
- omitempty bool
- omitzero bool
- commented bool
- comment string
+var encoderStatePool = sync.Pool{
+ New: func() interface{} { return &encoderState{} },
}
-type encoderCtx struct {
- // Current top-level key.
- parentKey []string
+type encoderState struct {
+ *Encoder
- // Key that should be used for a KV.
- key string
- // Extra flag to account for the empty string
- hasKey bool
+ buf []byte
- // Set to true to indicate that the encoder is inside a KV, so that all
- // tables need to be inlined.
- insideKv bool
+ // keyStack is the dotted key of the table being encoded, shared by the
+ // whole encode as a stack.
+ keyStack []string
- // Set to true to skip the first table header in an array table.
- skipTableHeader bool
+ // entriesPool recycles entry slices across tables of the same encode.
+ entriesPool [][]entry
- // Should the next table be encoded as inline
- inline bool
+ // lastWasHeader is true when the last line written was a table header,
+ // used to avoid empty lines between consecutive table definitions.
+ lastWasHeader bool
- // Indentation level
- indent int
+ // stringKeyBuf is a reusable buffer to read string map keys without
+ // allocating one per map.
+ stringKeyBuf reflect.Value
- // Prefix the current value with a comment.
- commented bool
-
- // Options coming from struct tags
- options valueOptions
-}
+ // parser classifies the bytes returned by unstable.Marshaler values as a
+ // single value or a table body. Only used when marshalerOn is set.
+ parser unstable.Parser
-func (ctx *encoderCtx) shiftKey() {
- if ctx.hasKey {
- ctx.parentKey = append(ctx.parentKey, ctx.key)
- ctx.clearKey()
- }
+ // marshalerOn mirrors Encoder.marshalerInterface, copied onto the state so
+ // the per-value hot path checks a direct field instead of dereferencing the
+ // embedded *Encoder on every value.
+ marshalerOn bool
}
-func (ctx *encoderCtx) setKey(k string) {
- ctx.key = k
- ctx.hasKey = true
+// valueOptions are the encoding options attached to one entry of a table.
+type valueOptions struct {
+ multiline bool
+ inline bool
+ omitempty bool
+ omitzero bool
+ commented bool
+ // rawShape is the unstable.Marshaler classification of the entry's value,
+ // resolved at encode time (not from tags). It lives here, in the byte of
+ // padding the booleans already leave, so that entry does not grow and the
+ // encoder's default (interface-disabled) path keeps its exact layout and
+ // performance. It stays shapeUnknown for everything that is not a Marshaler.
+ rawShape rawShape
+ comment string
}
-func (ctx *encoderCtx) clearKey() {
- ctx.key = ""
- ctx.hasKey = false
+// entry is a deferred key-value of a table being encoded.
+type entry struct {
+ key string
+ value reflect.Value
+ options valueOptions
}
-func (ctx *encoderCtx) isRoot() bool {
- return len(ctx.parentKey) == 0 && !ctx.hasKey
-}
+// rawShape classifies the bytes produced by an unstable.Marshaler.
+type rawShape uint8
+
+const (
+ // shapeUnknown is the default: not an unstable.Marshaler, or the interface
+ // is disabled.
+ shapeUnknown rawShape = iota
+ // shapeEmpty is whitespace-only content: it has no TOML representation and
+ // is omitted from the output.
+ shapeEmpty
+ // shapeValue is a single TOML value, emitted inline as `key = `.
+ shapeValue
+ // shapeTable is one or more key-value lines, emitted as a `[key]` body.
+ shapeTable
+)
-func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- i := v.Interface()
+func (e *encoderState) encodeRoot(v interface{}) error {
+ if v == nil {
+ return errors.New("toml: cannot encode a nil interface")
+ }
- switch x := i.(type) {
- case time.Time:
- if x.Nanosecond() > 0 {
- return x.AppendFormat(b, time.RFC3339Nano), nil
- }
- return x.AppendFormat(b, time.RFC3339), nil
- case LocalTime:
- return append(b, x.String()...), nil
- case LocalDate:
- return append(b, x.String()...), nil
- case LocalDateTime:
- return append(b, x.String()...), nil
- case json.Number:
- if enc.marshalJSONNumbers {
- if x == "" { /// Useful zero value.
- return append(b, "0"...), nil
- } else if v, err := x.Int64(); err == nil {
- return enc.encode(b, ctx, reflect.ValueOf(v))
- } else if f, err := x.Float64(); err == nil {
- return enc.encode(b, ctx, reflect.ValueOf(f))
- }
- return nil, fmt.Errorf("toml: unable to convert %q to int64 or float64", x)
- }
+ rv := reflect.ValueOf(v)
+ rv, ok := resolve(rv)
+ if !ok {
+ return errors.New("toml: cannot encode a nil pointer")
}
- hasTextMarshaler := v.Type().Implements(textMarshalerType)
- if hasTextMarshaler || (v.CanAddr() && reflect.PointerTo(v.Type()).Implements(textMarshalerType)) {
- if !hasTextMarshaler {
- v = v.Addr()
- }
+ if e.marshalerOn && encPropsForType(rv.Type()).marshaler != 0 {
+ return e.encodeMarshalerRoot(rv)
+ }
- if ctx.isRoot() {
- return nil, fmt.Errorf("toml: type %s implementing the TextMarshaler interface cannot be a root element", v.Type())
+ switch rv.Kind() {
+ case reflect.Map, reflect.Struct:
+ if isValueKind(rv) {
+ return fmt.Errorf("toml: cannot encode a %s as a document root", rv.Type())
}
+ return e.encodeTable(rv, false, 0)
+ default:
+ return fmt.Errorf("toml: cannot encode a %s as a document root", rv.Type())
+ }
+}
- text, err := v.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return nil, err
+// encodeMarshalerRoot emits the bytes of a root-level unstable.Marshaler as
+// the whole document: the encode counterpart of the decoder delivering the
+// whole document to a root Unmarshaler. The bytes must form a TOML document
+// (key-value lines and table headers); empty output produces an empty
+// document.
+func (e *encoderState) encodeMarshalerRoot(rv reflect.Value) error {
+ raw, err := e.marshalerBytes(rv)
+ if err != nil {
+ return err
+ }
+ trimmed := bytes.TrimSpace(raw)
+ if len(trimmed) == 0 {
+ return nil
+ }
+ if err := e.validateRawTableBody(rv.Type(), trimmed); err != nil {
+ // A single TOML value has no meaning at the document root; report it
+ // as such rather than as a syntax error.
+ if shape, _ := e.classifyRaw(trimmed); shape == shapeValue {
+ return fmt.Errorf("toml: cannot encode %s as a document root: MarshalTOML returned a single TOML value, not a document", rv.Type())
}
-
- b = enc.encodeString(b, string(text), ctx.options)
-
- return b, nil
+ return err
}
+ e.buf = append(e.buf, trimmed...)
+ e.buf = append(e.buf, '\n')
+ e.lastWasHeader = false
+ return nil
+}
- switch v.Kind() {
- // containers
- case reflect.Map:
- return enc.encodeMap(b, ctx, v)
- case reflect.Struct:
- return enc.encodeStruct(b, ctx, v)
- case reflect.Slice, reflect.Array:
- return enc.encodeSlice(b, ctx, v)
- case reflect.Interface:
- if v.IsNil() {
- return nil, errors.New("toml: encoding a nil interface is not supported")
+// resolve unwraps pointers and interfaces until a concrete value is found.
+// Returns false if it resolves to nil.
+func resolve(v reflect.Value) (reflect.Value, bool) {
+ for {
+ switch v.Kind() {
+ case reflect.Ptr:
+ if v.IsNil() {
+ return v, false
+ }
+ v = v.Elem()
+ case reflect.Interface:
+ if v.IsNil() {
+ return v, false
+ }
+ v = v.Elem()
+ default:
+ return v, true
}
+ }
+}
- return enc.encode(b, ctx, v.Elem())
- case reflect.Ptr:
- if v.IsNil() {
- return enc.encode(b, ctx, reflect.Zero(v.Type().Elem()))
- }
+// typeEncProps caches the per-type facts used on every value encode.
+type typeEncProps struct {
+ // 0: not a TextMarshaler, 1: the type implements it, 2: its pointer does
+ text uint8
+ // 0: not an unstable.Marshaler, 1: the type implements it, 2: its pointer
+ // does. Only consulted when Encoder.marshalerInterface is set.
+ marshaler uint8
+ // encoded as a TOML value (as opposed to a table)
+ isValue bool
+}
- return enc.encode(b, ctx, v.Elem())
+var marshalerType = reflect.TypeOf(new(unstable.Marshaler)).Elem()
- // values
- case reflect.String:
- b = enc.encodeString(b, v.String(), ctx.options)
- case reflect.Float32:
- f := v.Float()
+var typeEncPropsCache sync.Map // reflect.Type -> typeEncProps
- switch {
- case math.IsNaN(f):
- b = append(b, "nan"...)
- case f > math.MaxFloat32:
- b = append(b, "inf"...)
- case f < -math.MaxFloat32:
- b = append(b, "-inf"...)
- case math.Trunc(f) == f:
- b = strconv.AppendFloat(b, f, 'f', 1, 32)
- default:
- b = strconv.AppendFloat(b, f, 'f', -1, 32)
- }
- case reflect.Float64:
- f := v.Float()
- switch {
- case math.IsNaN(f):
- b = append(b, "nan"...)
- case f > math.MaxFloat64:
- b = append(b, "inf"...)
- case f < -math.MaxFloat64:
- b = append(b, "-inf"...)
- case math.Trunc(f) == f:
- b = strconv.AppendFloat(b, f, 'f', 1, 64)
- default:
- b = strconv.AppendFloat(b, f, 'f', -1, 64)
- }
- case reflect.Bool:
- if v.Bool() {
- b = append(b, "true"...)
+func encPropsForType(t reflect.Type) typeEncProps {
+ if p, ok := typeEncPropsCache.Load(t); ok {
+ return p.(typeEncProps)
+ }
+ var p typeEncProps
+ switch {
+ case t.Implements(textMarshalerType):
+ p.text = 1
+ case reflect.PtrTo(t).Implements(textMarshalerType):
+ p.text = 2
+ }
+ switch {
+ case t.Implements(marshalerType):
+ p.marshaler = 1
+ case reflect.PtrTo(t).Implements(marshalerType):
+ p.marshaler = 2
+ }
+ switch t {
+ case timeType, localDateType, localTimeType, localDateTimeType:
+ p.isValue = true
+ default:
+ if p.text != 0 {
+ p.isValue = true
} else {
- b = append(b, "false"...)
- }
- case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint:
- x := v.Uint()
- if x > uint64(math.MaxInt64) {
- return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, int64(math.MaxInt64))
+ switch t.Kind() {
+ case reflect.Map, reflect.Struct:
+ p.isValue = false
+ default:
+ p.isValue = true
+ }
}
- b = strconv.AppendUint(b, x, 10)
- case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
- b = strconv.AppendInt(b, v.Int(), 10)
- default:
- return nil, fmt.Errorf("toml: cannot encode value of type %s", v.Kind())
}
+ typeEncPropsCache.Store(t, p)
+ return p
+}
- return b, nil
+// isValueKind returns true when the resolved value is encoded as a TOML
+// value (as opposed to a table).
+func isValueKind(v reflect.Value) bool {
+ return encPropsForType(v.Type()).isValue
}
-func isNil(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Ptr, reflect.Interface, reflect.Map:
- return v.IsNil()
- default:
+// isTableLike returns true when the value should be encoded as a table (or
+// an array of tables for slices).
+func (e *encoderState) isTableLike(v reflect.Value) bool {
+ v, ok := resolve(v)
+ if !ok {
+ // Unresolvable values (interface-held nil pointers) are encoded as
+ // the zero value of their element type by the value path.
return false
}
+ return !isValueKind(v)
}
-func shouldOmitEmpty(options valueOptions, v reflect.Value) bool {
- return options.omitempty && isEmptyValue(v)
-}
-
-func shouldOmitZero(options valueOptions, v reflect.Value) bool {
- if !options.omitzero {
+// isArrayOfTables returns true when the value is a non-empty slice or array
+// containing only table-like values.
+func (e *encoderState) isArrayOfTables(v reflect.Value) bool {
+ v, ok := resolve(v)
+ if !ok {
return false
}
-
- // Check if the type implements isZeroer interface (has a custom IsZero method).
- if v.Type().Implements(isZeroerType) {
- return v.Interface().(isZeroer).IsZero()
+ if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
+ return false
}
-
- // Check if pointer type implements isZeroer.
- if reflect.PointerTo(v.Type()).Implements(isZeroerType) {
- if v.CanAddr() {
- return v.Addr().Interface().(isZeroer).IsZero()
+ if v.Len() == 0 {
+ return false
+ }
+ // The Marshaler-aware classification lives in a separate method, hoisted out
+ // of this loop, so the default path keeps its exact original shape.
+ if e.marshalerOn {
+ return e.isMarshalerArrayOfTables(v)
+ }
+ for i := 0; i < v.Len(); i++ {
+ elem, ok := resolve(v.Index(i))
+ if !ok || isValueKind(elem) {
+ return false
}
- // Create a temporary addressable copy to call the pointer receiver method.
- pv := reflect.New(v.Type())
- pv.Elem().Set(v)
- return pv.Interface().(isZeroer).IsZero()
}
-
- // Fall back to reflect's IsZero for types without custom IsZero method.
- return v.IsZero()
+ return true
}
-func (enc *Encoder) encodeKv(b []byte, ctx encoderCtx, options valueOptions, v reflect.Value) ([]byte, error) {
- var err error
-
- if !ctx.inline {
- b = enc.encodeComment(ctx.indent, options.comment, b)
- b = enc.commented(ctx.commented, b)
- b = enc.indent(ctx.indent, b)
+// isMarshalerArrayOfTables is the EnableMarshalerInterface variant of
+// isArrayOfTables: a Marshaler element counts as a table only when its raw
+// content is table shaped (key-value lines); one holding a single value makes
+// the whole slice a plain array instead.
+func (e *encoderState) isMarshalerArrayOfTables(v reflect.Value) bool {
+ for i := 0; i < v.Len(); i++ {
+ elem, ok := resolve(v.Index(i))
+ if !ok {
+ return false
+ }
+ if encPropsForType(elem.Type()).marshaler != 0 {
+ raw, err := e.marshalerBytes(elem)
+ if err != nil {
+ return false
+ }
+ if shape, _ := e.classifyRaw(raw); shape != shapeTable {
+ return false
+ }
+ continue
+ }
+ if isValueKind(elem) {
+ return false
+ }
}
+ return true
+}
- b = enc.encodeKey(b, ctx.key)
- b = append(b, " = "...)
-
- // create a copy of the context because the value of a KV shouldn't
- // modify the global context.
- subctx := ctx
- subctx.insideKv = true
- subctx.shiftKey()
- subctx.options = options
-
- b, err = enc.encode(b, subctx, v)
+// marshalerBytes returns the raw TOML produced by v's unstable.Marshaler
+// implementation. The caller guarantees v implements the interface
+// (encPropsForType(v.Type()).marshaler != 0).
+func (e *encoderState) marshalerBytes(v reflect.Value) ([]byte, error) {
+ t := v.Type()
+ var m unstable.Marshaler
+ switch {
+ case encPropsForType(t).marshaler == 1:
+ // The type itself implements Marshaler (e.g. a value receiver).
+ m = v.Interface().(unstable.Marshaler)
+ case v.CanAddr():
+ // Only the pointer implements it, and v is addressable.
+ m = v.Addr().Interface().(unstable.Marshaler)
+ default:
+ // Only the pointer implements it, but v is not addressable: take the
+ // address of a copy.
+ tmp := reflect.New(t)
+ tmp.Elem().Set(v)
+ m = tmp.Interface().(unstable.Marshaler)
+ }
+ b, err := m.MarshalTOML()
if err != nil {
- return nil, err
+ return nil, fmt.Errorf("toml: error calling MarshalTOML for type %s: %w", t, err)
}
-
return b, nil
}
-func (enc *Encoder) commented(commented bool, b []byte) []byte {
- if commented {
- return append(b, "# "...)
+// validateRawTableBody checks that trimmed — table-shaped Marshaler output
+// about to be spliced verbatim — is syntactically valid TOML, so a Marshaler
+// cannot silently corrupt the document. It reuses e.parser, like classifyRaw.
+func (e *encoderState) validateRawTableBody(t reflect.Type, trimmed []byte) error {
+ e.parser.Reset(trimmed)
+ for e.parser.NextExpression() {
}
- return b
+ if err := e.parser.Error(); err != nil {
+ return fmt.Errorf("toml: error calling MarshalTOML for type %s: invalid TOML: %w", t, err)
+ }
+ return nil
}
-func isEmptyValue(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Struct:
- return isEmptyStruct(v)
- case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
- return v.Len() == 0
- case reflect.Bool:
- return !v.Bool()
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return v.Int() == 0
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- return v.Uint() == 0
- case reflect.Float32, reflect.Float64:
- return v.Float() == 0
- case reflect.Interface, reflect.Ptr:
- return v.IsNil()
- default:
- return false
+// classifyRaw decides whether b (the output of an unstable.Marshaler) is empty,
+// a single TOML value, or a table body. It returns the trimmed bytes that
+// should be spliced into the document. It reuses e.parser, so it is not safe
+// for concurrent use (encoderState is not shared).
+func (e *encoderState) classifyRaw(b []byte) (rawShape, []byte) {
+ trimmed := bytes.TrimSpace(b)
+ if len(trimmed) == 0 {
+ return shapeEmpty, trimmed
+ }
+ e.parser.Reset(trimmed)
+ _, rest, err := parserbridge.ParseValue(&e.parser, trimmed)
+ if err == nil && len(bytes.TrimSpace(rest)) == 0 {
+ return shapeValue, trimmed
}
+ return shapeTable, trimmed
}
-func isEmptyStruct(v reflect.Value) bool {
- // TODO: merge with walkStruct and cache.
- typ := v.Type()
- for i := 0; i < typ.NumField(); i++ {
- fieldType := typ.Field(i)
-
- // only consider exported fields
- if fieldType.PkgPath != "" {
- continue
- }
-
- tag := fieldType.Tag.Get("toml")
-
- // special field name to skip field
- if tag == "-" {
+// resolveMarshalerEntries classifies every entry whose value implements
+// unstable.Marshaler, recording the shape on the entry so the two table passes
+// can route it without re-classifying. Any error from MarshalTOML is surfaced
+// eagerly. The marshaled bytes themselves are produced again at emit time by
+// marshalerValue; that keeps entry small on the encoder's hot path, and only
+// runs when the (opt-in) interface is enabled.
+func (e *encoderState) resolveMarshalerEntries(entries []entry) error {
+ for i := range entries {
+ ent := &entries[i]
+ v, ok := resolve(ent.value)
+ if !ok || encPropsForType(v.Type()).marshaler == 0 {
continue
}
-
- f := v.Field(i)
-
- if !isEmptyValue(f) {
- return false
+ raw, err := e.marshalerBytes(v)
+ if err != nil {
+ return err
}
+ ent.options.rawShape, _ = e.classifyRaw(raw)
}
-
- return true
+ return nil
}
-const literalQuote = '\''
-
-func (enc *Encoder) encodeString(b []byte, v string, options valueOptions) []byte {
- if needsQuoting(v) {
- return enc.encodeQuotedString(options.multiline, b, v)
+// marshalerValue returns the trimmed bytes to splice for an entry already known
+// to be an unstable.Marshaler (ent.options.rawShape != shapeUnknown).
+func (e *encoderState) marshalerValue(ent *entry) ([]byte, error) {
+ v, _ := resolve(ent.value)
+ raw, err := e.marshalerBytes(v)
+ if err != nil {
+ return nil, err
}
-
- return enc.encodeLiteralString(b, v)
+ return bytes.TrimSpace(raw), nil
}
-func needsQuoting(v string) bool {
- // TODO: vectorize
- for _, b := range []byte(v) {
- if b == '\'' || b == '\r' || b == '\n' || characters.InvalidASCII(b) {
- return true
- }
+// appendMarshalerInline emits an unstable.Marshaler value in a value position
+// (array element or inline-table member), where only a single TOML value is
+// valid. done is false when t is not a Marshaler, so appendValue falls through
+// to its normal handling. It is split out of appendValue (type check included)
+// to keep that hot path lean.
+func (e *encoderState) appendMarshalerInline(b []byte, v reflect.Value, t reflect.Type) (out []byte, done bool, err error) {
+ if encPropsForType(t).marshaler == 0 {
+ return b, false, nil
+ }
+ raw, err := e.marshalerBytes(v)
+ if err != nil {
+ return nil, true, err
+ }
+ shape, trimmed := e.classifyRaw(raw)
+ switch shape {
+ case shapeValue:
+ return append(b, trimmed...), true, nil
+ case shapeEmpty:
+ return nil, true, fmt.Errorf("toml: cannot encode an empty %s as an inline value", t)
+ default:
+ return nil, true, fmt.Errorf("toml: cannot encode %s as an inline value: %q is not a single TOML value", t, trimmed)
}
- return false
-}
-
-// caller should have checked that the string does not contain new lines or ' .
-func (enc *Encoder) encodeLiteralString(b []byte, v string) []byte {
- b = append(b, literalQuote)
- b = append(b, v...)
- b = append(b, literalQuote)
-
- return b
}
-func (enc *Encoder) encodeQuotedString(multiline bool, b []byte, v string) []byte {
- stringQuote := `"`
-
- if multiline {
- stringQuote = `"""`
+// encodeTable writes the content of a table at the given key path.
+func (e *encoderState) encodeTable(v reflect.Value, commented bool, indent int) error {
+ entries, err := e.collectEntries(v)
+ if err != nil {
+ return err
}
- b = append(b, stringQuote...)
- if multiline {
- b = append(b, '\n')
+ // Marshaler routing is hoisted behind a single local flag. When the (opt-in)
+ // interface is off, mOn is false and both passes run the exact baseline
+ // code, so the default Marshal path keeps its performance.
+ mOn := e.marshalerOn
+ if mOn {
+ // Classify Marshaler entries once, up front, so the passes can route
+ // them by shape and surface MarshalTOML errors eagerly.
+ if err := e.resolveMarshalerEntries(entries); err != nil {
+ return err
+ }
}
- const (
- hextable = "0123456789ABCDEF"
- // U+0000 to U+0008, U+000A to U+001F, U+007F
- nul = 0x0
- bs = 0x8
- lf = 0xa
- us = 0x1f
- del = 0x7f
- )
-
- bv := []byte(v)
- for i := 0; i < len(bv); i++ {
- r := bv[i]
- switch r {
- case '\\':
- b = append(b, `\\`...)
- case '"':
- if multiline {
- // Quotation marks do not need to be quoted in multiline strings unless
- // it contains 3 consecutive. If 3+ quotes appear, quote all of them
- // because it's visually better
- if i+2 > len(bv) || bv[i+1] != '"' || bv[i+2] != '"' {
- b = append(b, r)
- } else {
- b = append(b, `\"\"\"`...)
- i += 2
+ // First pass: emit all key-values; tables are handled by the second
+ // pass.
+ for i := range entries {
+ ent := &entries[i]
+ if mOn {
+ switch ent.options.rawShape {
+ case shapeUnknown:
+ // Not a Marshaler: handled by the baseline logic below.
+ case shapeEmpty:
+ // No TOML representation: omit the key.
+ continue
+ case shapeValue:
+ if err := e.encodeKeyValue(*ent, commented, indent); err != nil {
+ return err
}
- } else {
- b = append(b, `\"`...)
- }
- case '\b':
- b = append(b, `\b`...)
- case '\f':
- b = append(b, `\f`...)
- case '\n':
- if multiline {
- b = append(b, r)
- } else {
- b = append(b, `\n`...)
- }
- case '\r':
- b = append(b, `\r`...)
- case '\t':
- b = append(b, `\t`...)
- default:
- switch {
- case r >= nul && r <= bs, r >= lf && r <= us, r == del:
- b = append(b, `\u00`...)
- b = append(b, hextable[r>>4])
- b = append(b, hextable[r&0x0f])
- default:
- b = append(b, r)
+ continue
+ case shapeTable:
+ // A table body is emitted in the second pass, unless it is
+ // forced inline (SetTablesInline / inline tag), which has no
+ // valid inline form and is reported as an error by
+ // encodeKeyValue.
+ if e.tablesInline || ent.options.inline {
+ if err := e.encodeKeyValue(*ent, commented, indent); err != nil {
+ return err
+ }
+ }
+ continue
}
}
+ if e.entryIsTable(ent) {
+ continue
+ }
+ if err := e.encodeKeyValue(*ent, commented, indent); err != nil {
+ return err
+ }
}
- b = append(b, stringQuote...)
-
- return b
-}
-
-// caller should have checked that the string is in A-Z / a-z / 0-9 / - / _ .
-func (enc *Encoder) encodeUnquotedKey(b []byte, v string) []byte {
- return append(b, v...)
-}
-
-func (enc *Encoder) encodeTableHeader(ctx encoderCtx, b []byte) []byte {
- if len(ctx.parentKey) == 0 {
- return b
- }
+ // Second pass: emit the sub-tables, extending the shared key stack.
+ for i := range entries {
+ ent := entries[i]
+ if mOn {
+ switch ent.options.rawShape {
+ case shapeUnknown:
+ // Not a Marshaler: handled by the baseline logic below.
+ case shapeValue, shapeEmpty:
+ // Not a table: already handled (or omitted) in the first pass.
+ continue
+ case shapeTable:
+ // Emit the raw body verbatim under the freshly pushed header.
+ // (The forced-inline case already errored in the first pass.)
+ entCommented := commented || ent.options.commented
+ e.keyStack = append(e.keyStack, ent.key)
+ if err := e.encodeMarshalerTable(&ent, entCommented, indent); err != nil {
+ return err
+ }
+ e.keyStack = e.keyStack[:len(e.keyStack)-1]
+ continue
+ }
+ }
+ if !e.entryIsTable(&ent) {
+ continue
+ }
+ entCommented := commented || ent.options.commented
+ e.keyStack = append(e.keyStack, ent.key)
- b = enc.encodeComment(ctx.indent, ctx.options.comment, b)
+ if e.isArrayOfTables(ent.value) {
+ err := e.encodeArrayTable(ent, entCommented, indent)
+ if err != nil {
+ return err
+ }
+ e.keyStack = e.keyStack[:len(e.keyStack)-1]
+ continue
+ }
- b = enc.commented(ctx.commented, b)
+ // The value is resolvable: entryIsTable already resolved it.
+ tv, _ := resolve(ent.value)
- b = enc.indent(ctx.indent, b)
+ e.writeTableHeader(ent.options.comment, entCommented, false, indent)
- b = append(b, '[')
+ err := e.encodeTable(tv, entCommented, indent+1)
+ if err != nil {
+ return err
+ }
+ e.keyStack = e.keyStack[:len(e.keyStack)-1]
+ }
- b = enc.encodeKey(b, ctx.parentKey[0])
+ e.putEntries(entries)
+ return nil
+}
- for _, k := range ctx.parentKey[1:] {
- b = append(b, '.')
- b = enc.encodeKey(b, k)
+// encodeMarshalerTable emits a table-shaped unstable.Marshaler entry: the
+// header for the key currently on the stack, then the raw body verbatim.
+func (e *encoderState) encodeMarshalerTable(ent *entry, commented bool, indent int) error {
+ raw, err := e.marshalerValue(ent)
+ if err != nil {
+ return err
+ }
+ // Validate the bytes actually being spliced: MarshalTOML is called again
+ // for the emit, so this both rejects invalid TOML and guards against an
+ // implementation that returned different content than during
+ // classification.
+ if err := e.validateRawTableBody(ent.value.Type(), raw); err != nil {
+ return err
}
+ e.writeTableHeader(ent.options.comment, commented, false, indent)
+ e.spliceRawTableBody(raw, commented)
+ return nil
+}
- b = append(b, "]\n"...)
+// spliceRawTableBody appends a raw table body verbatim after its header. When
+// the table is commented, every physical line is prefixed with the comment
+// marker so the body does not leak into the document as live keys.
+func (e *encoderState) spliceRawTableBody(raw []byte, commented bool) {
+ if len(raw) == 0 {
+ return
+ }
+ if commented {
+ e.buf = append(e.buf, "# "...)
+ e.buf = append(e.buf, bytes.ReplaceAll(raw, []byte("\n"), []byte("\n# "))...)
+ } else {
+ e.buf = append(e.buf, raw...)
+ }
+ e.buf = append(e.buf, '\n')
+ e.lastWasHeader = false
+}
- return b
+// entryIsTable reports whether the entry is emitted as a (sub-)table rather
+// than a key-value. Marshaler entries are routed by encodeTable before this is
+// reached, so it carries no marshaler-specific cost.
+func (e *encoderState) entryIsTable(ent *entry) bool {
+ return !e.tablesInline && !ent.options.inline && (e.isTableLike(ent.value) || e.isArrayOfTables(ent.value))
}
-func (enc *Encoder) encodeKey(b []byte, k string) []byte {
- needsQuotation := false
- cannotUseLiteral := false
+// getEntries returns a reusable entry slice.
+func (e *encoderState) getEntries() []entry {
+ if n := len(e.entriesPool); n > 0 {
+ s := e.entriesPool[n-1]
+ e.entriesPool = e.entriesPool[:n-1]
+ return s[:0]
+ }
+ return nil
+}
- if len(k) == 0 {
- return append(b, "''"...)
+// putEntries returns an entry slice to the pool.
+func (e *encoderState) putEntries(s []entry) {
+ if cap(s) > 0 {
+ e.entriesPool = append(e.entriesPool, s)
}
+}
- for _, c := range k {
- if (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' {
+// encodeArrayTable writes all the elements of an array of tables.
+func (e *encoderState) encodeArrayTable(ent entry, commented bool, indent int) error {
+ v, _ := resolve(ent.value)
+ comment := ent.options.comment
+ for i := 0; i < v.Len(); i++ {
+ // Elements are resolvable: isArrayOfTables already resolved them.
+ elem, _ := resolve(v.Index(i))
+
+ e.writeTableHeader(comment, commented, true, indent)
+ // The comment is only present before the first element.
+ comment = ""
+
+ // A Marshaler element splices its raw table body verbatim. The shape
+ // was checked by isArrayOfTables, but MarshalTOML is called again for
+ // the emit, so the spliced bytes are validated here.
+ if e.marshalerOn && encPropsForType(elem.Type()).marshaler != 0 {
+ raw, err := e.marshalerBytes(elem)
+ if err != nil {
+ return err
+ }
+ trimmed := bytes.TrimSpace(raw)
+ if err := e.validateRawTableBody(elem.Type(), trimmed); err != nil {
+ return err
+ }
+ e.spliceRawTableBody(trimmed, commented)
continue
}
- if c == literalQuote {
- cannotUseLiteral = true
+ err := e.encodeTable(elem, commented, indent+1)
+ if err != nil {
+ return err
}
-
- needsQuotation = true
}
+ return nil
+}
- if needsQuotation && needsQuoting(k) {
- cannotUseLiteral = true
+// writeTableHeader emits a [table] or [[array table]] header line, preceded
+// by an empty line and comments as needed.
+func (e *encoderState) writeTableHeader(comment string, commented bool, array bool, indent int) {
+ key := e.keyStack
+ if len(e.buf) > 0 && !e.lastWasHeader {
+ e.buf = append(e.buf, '\n')
}
- switch {
- case cannotUseLiteral:
- return enc.encodeQuotedString(false, b, k)
- case needsQuotation:
- return enc.encodeLiteralString(b, k)
- default:
- return enc.encodeUnquotedKey(b, k)
+ headerIndent := indent
+
+ e.writeComment(comment, headerIndent)
+
+ // The "commented" marker is emitted at column zero, ahead of any table
+ // indentation, so that the indentation appears inside the comment
+ // (e.g. `# [a.b]`). This matches the historical v2.3 layout.
+ if commented {
+ e.buf = append(e.buf, "# "...)
+ }
+ e.writeIndent(headerIndent)
+ e.buf = append(e.buf, '[')
+ if array {
+ e.buf = append(e.buf, '[')
+ }
+ for i, part := range key {
+ if i > 0 {
+ e.buf = append(e.buf, '.')
+ }
+ e.buf = e.appendKey(e.buf, part)
}
+ e.buf = append(e.buf, ']')
+ if array {
+ e.buf = append(e.buf, ']')
+ }
+ e.buf = append(e.buf, '\n')
+ e.lastWasHeader = true
}
-func (enc *Encoder) keyToString(k reflect.Value) (string, error) {
- keyType := k.Type()
- if keyType.Implements(textMarshalerType) {
- keyB, err := k.Interface().(encoding.TextMarshaler).MarshalText()
- if err != nil {
- return "", fmt.Errorf("toml: error marshalling key %v from text: %w", k, err)
- }
- return string(keyB), nil
+func (e *encoderState) writeIndent(indent int) {
+ if !e.indentTables {
+ return
}
+ for i := 0; i < indent; i++ {
+ e.buf = append(e.buf, e.indentSymbol...)
+ }
+}
- switch keyType.Kind() {
- case reflect.String:
- return k.String(), nil
+// writeComment emits the comment lines attached to an entry.
+func (e *encoderState) writeComment(comment string, indent int) {
+ if comment == "" {
+ return
+ }
+ for _, line := range strings.Split(comment, "\n") {
+ e.writeIndent(indent)
+ e.buf = append(e.buf, "# "...)
+ e.buf = append(e.buf, line...)
+ e.buf = append(e.buf, '\n')
+ }
+}
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- return strconv.FormatInt(k.Int(), 10), nil
+// encodeKeyValue writes one `key = value` line of a table.
+func (e *encoderState) encodeKeyValue(ent entry, commented bool, indent int) error {
+ commented = commented || ent.options.commented
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- return strconv.FormatUint(k.Uint(), 10), nil
+ e.writeComment(ent.options.comment, indent)
- case reflect.Float32:
- return strconv.FormatFloat(k.Float(), 'f', -1, 32), nil
+ // The "commented" marker is emitted at column zero, ahead of any table
+ // indentation, so that the indentation appears inside the comment
+ // (e.g. `# key = value`). This matches the historical v2.3 layout.
+ lineStart := len(e.buf)
+ if commented {
+ e.buf = append(e.buf, "# "...)
+ }
+ e.writeIndent(indent)
+ e.buf = e.appendKey(e.buf, ent.key)
+ e.buf = append(e.buf, " = "...)
+
+ // When tables are not indented, the key is emitted at column zero
+ // regardless of its nesting depth. Value continuation lines (most
+ // notably the elements of a multiline array) must line up with that key,
+ // so the value indentation starts from zero as well rather than from the
+ // table nesting depth.
+ valueIndent := indent
+ if !e.indentTables {
+ valueIndent = 0
+ }
- case reflect.Float64:
- return strconv.FormatFloat(k.Float(), 'f', -1, 64), nil
+ // A Marshaler value is delegated, keeping this hot function lean for the
+ // default path (rawShape stays shapeUnknown when the interface is off). It
+ // shares the commented/newline handling below.
+ var err error
+ if ent.options.rawShape != shapeUnknown {
+ e.buf, err = e.appendMarshalerInlineValue(e.buf, &ent)
+ } else {
+ e.buf, err = e.appendValue(e.buf, ent.value, ent.options, valueIndent)
+ }
+ if err != nil {
+ return err
+ }
- default:
- return "", fmt.Errorf("toml: type %s is not supported as a map key", keyType.Kind())
+ // A commented value that renders across multiple lines (a multiline string
+ // or a multiline array) must have every physical line prefixed with the
+ // comment marker, not just the first; otherwise the continuation lines are
+ // emitted as live, syntactically invalid TOML.
+ if commented {
+ if bytes.IndexByte(e.buf[lineStart:], '\n') >= 0 {
+ region := bytes.ReplaceAll(
+ append([]byte(nil), e.buf[lineStart:]...),
+ []byte("\n"), []byte("\n# "),
+ )
+ e.buf = append(e.buf[:lineStart], region...)
+ }
}
+ e.buf = append(e.buf, '\n')
+ e.lastWasHeader = false
+ return nil
}
-func (enc *Encoder) encodeMap(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- var (
- t table
- emptyValueOptions valueOptions
- )
+// appendMarshalerInlineValue appends the value part of a `key = ` line for an
+// unstable.Marshaler entry, leaving the trailing newline and commented handling
+// to encodeKeyValue. Empty entries are filtered out before this point, so the
+// value is either a single value (spliced verbatim) or, when forced inline by
+// SetTablesInline or an inline tag, table content (an error).
+func (e *encoderState) appendMarshalerInlineValue(b []byte, ent *entry) ([]byte, error) {
+ errNotValue := func() error {
+ return fmt.Errorf("toml: cannot encode %s as an inline value: not a single TOML value", ent.value.Type())
+ }
+ if ent.options.rawShape != shapeValue {
+ return nil, errNotValue()
+ }
+ raw, err := e.marshalerValue(ent)
+ if err != nil {
+ return nil, err
+ }
+ // Classify the just-returned bytes rather than trusting the earlier pass:
+ // MarshalTOML is called again for the emit, and an implementation that
+ // returns different content must not splice non-value bytes into a
+ // `key = ` position.
+ if shape, trimmed := e.classifyRaw(raw); shape == shapeValue {
+ return append(b, trimmed...), nil
+ }
+ return nil, errNotValue()
+}
- iter := v.MapRange()
- for iter.Next() {
- v := iter.Value()
+// collectEntries builds the ordered list of the entries of a table,
+// applying tags and omission rules.
+func (e *encoderState) collectEntries(v reflect.Value) ([]entry, error) {
+ switch v.Kind() {
+ case reflect.Map:
+ return e.collectMapEntries(v)
+ case reflect.Struct:
+ entries := e.getEntries()
+ e.collectStructEntries(&entries, v)
+ return entries, nil
+ default:
+ return nil, fmt.Errorf("toml: cannot encode a %s as a table", v.Type())
+ }
+}
- // Handle nil values: convert nil pointers to zero value,
- // skip nil interfaces and nil maps.
- switch v.Kind() {
- case reflect.Ptr:
- if v.IsNil() {
- v = reflect.Zero(v.Type().Elem())
- }
- case reflect.Interface, reflect.Map:
- if v.IsNil() {
- continue
- }
- default:
+func (e *encoderState) collectMapEntries(v reflect.Value) ([]entry, error) {
+ entries := e.getEntries()
+
+ // Keys are converted to strings right away: read them into a reusable
+ // buffer to avoid one allocation per key.
+ var kbuf reflect.Value
+ if v.Type().Key() == stringType {
+ if !e.stringKeyBuf.IsValid() {
+ e.stringKeyBuf = reflect.New(stringType).Elem()
}
+ kbuf = e.stringKeyBuf
+ } else {
+ kbuf = reflect.New(v.Type().Key()).Elem()
+ }
- k, err := enc.keyToString(iter.Key())
+ iter := v.MapRange()
+ for iter.Next() {
+ kbuf.SetIterKey(iter)
+ key, err := mapKeyString(kbuf)
if err != nil {
return nil, err
}
-
- if willConvertToTableOrArrayTable(ctx, v) {
- t.pushTable(k, v, emptyValueOptions)
- } else {
- t.pushKV(k, v, emptyValueOptions)
+ value := iter.Value()
+ if value.Kind() == reflect.Interface && value.IsNil() {
+ // nil interface values are skipped
+ continue
+ }
+ if value.Kind() == reflect.Ptr && value.IsNil() {
+ // nil pointers in maps are encoded as their zero value
+ value = reflect.New(value.Type().Elem()).Elem()
}
+ entries = append(entries, entry{key: key, value: value})
}
- sortEntriesByKey(t.kvs)
- sortEntriesByKey(t.tables)
+ if len(entries) > 1 {
+ // slices.SortFunc avoids boxing the slice into a sort.Interface (an
+ // allocation that sort.Sort incurs for every table).
+ slices.SortFunc(entries, func(a, b entry) int {
+ return strings.Compare(a.key, b.key)
+ })
+ }
- return enc.encodeTable(b, ctx, t)
+ return entries, nil
}
-func sortEntriesByKey(e []entry) {
- slices.SortFunc(e, func(a, b entry) int {
- return strings.Compare(a.Key, b.Key)
- })
+// mapKeyString converts a map key to its string representation.
+func mapKeyString(k reflect.Value) (string, error) {
+ kr, ok := resolve(k)
+ if !ok {
+ return "", errors.New("toml: cannot encode a nil map key")
+ }
+ if kr.Type().Implements(textMarshalerType) {
+ b, err := kr.Interface().(encoding.TextMarshaler).MarshalText()
+ if err != nil {
+ return "", fmt.Errorf("toml: cannot marshal map key: %w", err)
+ }
+ return string(b), nil
+ }
+ if kr.CanAddr() && reflect.PtrTo(kr.Type()).Implements(textMarshalerType) {
+ b, err := kr.Addr().Interface().(encoding.TextMarshaler).MarshalText()
+ if err != nil {
+ return "", fmt.Errorf("toml: cannot marshal map key: %w", err)
+ }
+ return string(b), nil
+ }
+ switch kr.Kind() {
+ case reflect.String:
+ return kr.String(), nil
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return strconv.FormatInt(kr.Int(), 10), nil
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ return strconv.FormatUint(kr.Uint(), 10), nil
+ case reflect.Float32:
+ return strconv.FormatFloat(kr.Float(), 'f', -1, 32), nil
+ case reflect.Float64:
+ return strconv.FormatFloat(kr.Float(), 'f', -1, 64), nil
+ default:
+ return "", fmt.Errorf("toml: cannot encode a map with key type %s", k.Type())
+ }
}
-type entry struct {
- Key string
- Value reflect.Value
- Options valueOptions
+// encPlanField is the static encoding information of one field of a struct.
+type encPlanField struct {
+ name string
+ index []int
+ depth int
+ options valueOptions
}
-type table struct {
- kvs []entry
- tables []entry
+// encPlan caches the per-type information needed to encode a struct:
+// flattened fields with parsed tags, in order of definition, with shadowed
+// duplicates already removed.
+type encPlan struct {
+ fields []encPlanField
}
-func (t *table) pushKV(k string, v reflect.Value, options valueOptions) {
- for _, e := range t.kvs {
- if e.Key == k {
- return
- }
- }
+var encPlans sync.Map // reflect.Type -> *encPlan
- t.kvs = append(t.kvs, entry{Key: k, Value: v, Options: options})
-}
-
-func (t *table) pushTable(k string, v reflect.Value, options valueOptions) {
- for _, e := range t.tables {
- if e.Key == k {
- return
- }
+func encPlanForType(t reflect.Type) *encPlan {
+ if plan, ok := encPlans.Load(t); ok {
+ return plan.(*encPlan)
}
- t.tables = append(t.tables, entry{Key: k, Value: v, Options: options})
+ plan := &encPlan{}
+ visited := map[reflect.Type]bool{}
+ buildEncPlan(plan, t, nil, 0, visited)
+ dedupEncPlan(plan)
+ encPlans.Store(t, plan)
+ return plan
}
-func walkStruct(ctx encoderCtx, t *table, v reflect.Value) {
- // TODO: cache this
- typ := v.Type()
- for i := 0; i < typ.NumField(); i++ {
- fieldType := typ.Field(i)
-
- // only consider exported fields
- if fieldType.PkgPath != "" {
- continue
- }
+func buildEncPlan(plan *encPlan, t reflect.Type, prefix []int, depth int, visited map[reflect.Type]bool) {
+ if visited[t] {
+ return
+ }
+ visited[t] = true
+ defer delete(visited, t)
- tag := fieldType.Tag.Get("toml")
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
- // special field name to skip field
+ tag, tagged := f.Tag.Lookup("toml")
if tag == "-" {
continue
}
- k, opts := parseTag(tag)
- if !isValidName(k) {
- k = ""
- }
-
- f := v.Field(i)
-
- if k == "" {
- if fieldType.Anonymous {
- if fieldType.Type.Kind() == reflect.Struct {
- walkStruct(ctx, t, f)
- } else if fieldType.Type.Kind() == reflect.Ptr && !f.IsNil() && f.Elem().Kind() == reflect.Struct {
- walkStruct(ctx, t, f.Elem())
+ name := f.Name
+ var opts valueOptions
+ if tagged {
+ parts := strings.Split(tag, ",")
+ if parts[0] != "" {
+ name = parts[0]
+ }
+ for _, opt := range parts[1:] {
+ switch opt {
+ case "multiline":
+ opts.multiline = true
+ case "inline":
+ opts.inline = true
+ case "omitempty":
+ opts.omitempty = true
+ case "omitzero":
+ opts.omitzero = true
+ case "commented":
+ opts.commented = true
}
- continue
}
- k = fieldType.Name
}
-
- if isNil(f) {
- continue
+ // Standalone boolean tags, e.g. multiline:"true".
+ const tagTrue = "true"
+ if f.Tag.Get("multiline") == tagTrue {
+ opts.multiline = true
}
-
- options := valueOptions{
- multiline: opts.multiline,
- omitempty: opts.omitempty,
- omitzero: opts.omitzero,
- commented: opts.commented,
- comment: fieldType.Tag.Get("comment"),
+ if f.Tag.Get("inline") == tagTrue {
+ opts.inline = true
}
-
- if opts.inline || !willConvertToTableOrArrayTable(ctx, f) {
- t.pushKV(k, f, options)
- } else {
- t.pushTable(k, f, options)
+ if f.Tag.Get("commented") == tagTrue {
+ opts.commented = true
}
- }
-}
-
-func (enc *Encoder) encodeStruct(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- var t table
+ opts.comment = f.Tag.Get("comment")
- walkStruct(ctx, &t, v)
-
- return enc.encodeTable(b, ctx, t)
-}
+ index := make([]int, 0, len(prefix)+1)
+ index = append(index, prefix...)
+ index = append(index, i)
-func (enc *Encoder) encodeComment(indent int, comment string, b []byte) []byte {
- for len(comment) > 0 {
- var line string
- idx := strings.IndexByte(comment, '\n')
- if idx >= 0 {
- line = comment[:idx]
- comment = comment[idx+1:]
- } else {
- line = comment
- comment = ""
+ if f.Anonymous {
+ ft := f.Type
+ if ft.Kind() == reflect.Ptr {
+ ft = ft.Elem()
+ }
+ if ft.Kind() == reflect.Struct && (!tagged || tagName(tag) == "") {
+ buildEncPlan(plan, ft, index, depth+1, visited)
+ continue
+ }
+ if f.PkgPath != "" && ft.Kind() != reflect.Interface {
+ continue
+ }
+ } else if f.PkgPath != "" {
+ // unexported
+ continue
}
- b = enc.indent(indent, b)
- b = append(b, "# "...)
- b = append(b, line...)
- b = append(b, '\n')
- }
- return b
-}
-func isValidName(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- case !unicode.IsLetter(c) && !unicode.IsDigit(c):
- return false
- }
+ plan.fields = append(plan.fields, encPlanField{
+ name: name,
+ index: index,
+ depth: depth,
+ options: opts,
+ })
}
- return true
}
-type tagOptions struct {
- multiline bool
- inline bool
- omitempty bool
- omitzero bool
- commented bool
-}
-
-func parseTag(tag string) (string, tagOptions) {
- opts := tagOptions{}
-
- idx := strings.Index(tag, ",")
- if idx == -1 {
- return tag, opts
- }
-
- raw := tag[idx+1:]
- tag = tag[:idx]
- for raw != "" {
- var o string
- i := strings.Index(raw, ",")
- if i >= 0 {
- o, raw = raw[:i], raw[i+1:]
+// dedupEncPlan removes the fields shadowed by another one with the same
+// name (the shallowest wins), keeping the order of first appearance.
+func dedupEncPlan(plan *encPlan) {
+ byName := make(map[string]int, len(plan.fields))
+ drop := false
+ for i := range plan.fields {
+ f := &plan.fields[i]
+ j, seen := byName[f.name]
+ if !seen {
+ byName[f.name] = i
+ continue
+ }
+ drop = true
+ // Shallowest wins; on equal depth, the first in order wins.
+ if f.depth < plan.fields[j].depth {
+ plan.fields[j].name = ""
+ byName[f.name] = i
} else {
- o, raw = raw, ""
+ f.name = ""
}
- switch o {
- case "multiline":
- opts.multiline = true
- case "inline":
- opts.inline = true
- case "omitempty":
- opts.omitempty = true
- case "omitzero":
- opts.omitzero = true
- case "commented":
- opts.commented = true
+ }
+ if !drop {
+ return
+ }
+ out := plan.fields[:0]
+ for _, f := range plan.fields {
+ if f.name != "" {
+ out = append(out, f)
}
}
-
- return tag, opts
+ plan.fields = out
}
-func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, error) {
- var err error
-
- ctx.shiftKey()
-
- if ctx.insideKv || (ctx.inline && !ctx.isRoot()) {
- return enc.encodeTableInline(b, ctx, t)
- }
+// collectStructEntries appends the entries of a struct, flattening embedded
+// structs in place.
+func (e *encoderState) collectStructEntries(entries *[]entry, v reflect.Value) {
+ plan := encPlanForType(v.Type())
- if !ctx.skipTableHeader {
- b = enc.encodeTableHeader(ctx, b)
-
- if enc.indentTables && len(ctx.parentKey) > 0 {
- ctx.indent++
+ for i := range plan.fields {
+ f := &plan.fields[i]
+ fv, ok := fieldByIndexSkipNil(v, f.index)
+ if !ok {
+ // nil embedded pointer on the way: skipped
+ continue
}
- }
- ctx.skipTableHeader = false
- hasNonEmptyKV := false
- for _, kv := range t.kvs {
- if shouldOmitEmpty(kv.Options, kv.Value) {
+ // Anonymous interface fields that are nil are skipped.
+ if fv.Kind() == reflect.Interface && fv.IsNil() {
continue
}
- if kv.Options.omitzero && shouldOmitZero(kv.Options, kv.Value) {
+ // nil values in struct fields are skipped
+ if (fv.Kind() == reflect.Ptr || fv.Kind() == reflect.Map) && fv.IsNil() {
continue
}
- hasNonEmptyKV = true
- ctx.setKey(kv.Key)
- ctx2 := ctx
- ctx2.commented = kv.Options.commented || ctx2.commented
-
- b, err = enc.encodeKv(b, ctx2, kv.Options, kv.Value)
- if err != nil {
- return nil, err
- }
-
- b = append(b, '\n')
- }
-
- first := true
- for _, table := range t.tables {
- if shouldOmitEmpty(table.Options, table.Value) {
+ if f.options.omitempty && isEmptyValue(fv) {
continue
}
- if table.Options.omitzero && shouldOmitZero(table.Options, table.Value) {
+ if f.options.omitzero && isZeroValue(fv) {
continue
}
- if first {
- first = false
- if hasNonEmptyKV {
- b = append(b, '\n')
- }
- } else {
- b = append(b, "\n"...)
- }
- ctx.setKey(table.Key)
-
- ctx.options = table.Options
- ctx2 := ctx
- ctx2.commented = ctx2.commented || ctx.options.commented
+ *entries = append(*entries, entry{key: f.name, value: fv, options: f.options})
+ }
+}
- b, err = enc.encode(b, ctx2, table.Value)
- if err != nil {
- return nil, err
+// fieldByIndexSkipNil returns the field at the given index path, reporting
+// false if a nil embedded pointer is found on the way.
+func fieldByIndexSkipNil(v reflect.Value, index []int) (reflect.Value, bool) {
+ for i, x := range index {
+ if i > 0 {
+ for v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ return v, false
+ }
+ v = v.Elem()
+ }
}
+ v = v.Field(x)
}
-
- return b, nil
+ return v, true
}
-func (enc *Encoder) encodeTableInline(b []byte, ctx encoderCtx, t table) ([]byte, error) {
- var err error
-
- b = append(b, '{')
+func tagName(tag string) string {
+ if idx := strings.IndexByte(tag, ','); idx >= 0 {
+ return tag[:idx]
+ }
+ return tag
+}
- first := true
- for _, kv := range t.kvs {
- if shouldOmitEmpty(kv.Options, kv.Value) {
- continue
- }
- if kv.Options.omitzero && shouldOmitZero(kv.Options, kv.Value) {
- continue
+// isEmptyValue implements the omitempty rules.
+func isEmptyValue(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.String:
+ return v.Len() == 0
+ case reflect.Bool:
+ return !v.Bool()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return v.Int() == 0
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ return v.Uint() == 0
+ case reflect.Float32, reflect.Float64:
+ return v.Float() == 0
+ case reflect.Map, reflect.Slice, reflect.Array:
+ return v.Len() == 0
+ case reflect.Ptr, reflect.Interface:
+ return v.IsNil()
+ case reflect.Struct:
+ // Structs that encode as a scalar value (time.Time, the local
+ // date/time types, or any TextMarshaler) are empty only when they
+ // equal their zero value; their fields are typically unexported, so
+ // recursing into them would be meaningless.
+ if encPropsForType(v.Type()).isValue {
+ return v.IsZero()
}
+ // Plain structs encode as tables and are empty when every field that
+ // would be encoded is itself empty. This matches the recursive rule
+ // used before the encoder rewrite and, in particular, treats a
+ // non-nil but empty map or slice as empty (reflect.Value.IsZero does
+ // not, which would otherwise emit an empty table header).
+ return isEmptyStruct(v)
+ default:
+ return false
+ }
+}
- if first {
- first = false
- } else {
- b = append(b, `, `...)
+// isEmptyStruct reports whether all of a table-valued struct's encodable
+// fields are empty per isEmptyValue. It mirrors the field selection done by
+// collectStructEntries (embedded flattening, shadowing, and "-" skips) so the
+// emptiness decision matches what would actually be encoded.
+func isEmptyStruct(v reflect.Value) bool {
+ plan := encPlanForType(v.Type())
+ for i := range plan.fields {
+ fv, ok := fieldByIndexSkipNil(v, plan.fields[i].index)
+ if !ok {
+ // A nil embedded pointer along the path contributes nothing.
+ continue
}
-
- ctx.setKey(kv.Key)
-
- b, err = enc.encodeKv(b, ctx, kv.Options, kv.Value)
- if err != nil {
- return nil, err
+ if !isEmptyValue(fv) {
+ return false
}
}
+ return true
+}
- if len(t.tables) > 0 {
- panic("inline table cannot contain nested tables, only key-values")
+// isZeroValue implements the omitzero rules: the type's own IsZero() when
+// implemented, the reflect zero value otherwise.
+func isZeroValue(v reflect.Value) bool {
+ if v.Type().Implements(isZeroerType) {
+ return v.Interface().(isZeroer).IsZero()
}
-
- b = append(b, "}"...)
-
- return b, nil
+ if v.CanAddr() && reflect.PtrTo(v.Type()).Implements(isZeroerType) {
+ return v.Addr().Interface().(isZeroer).IsZero()
+ }
+ if !v.CanAddr() && reflect.PtrTo(v.Type()).Implements(isZeroerType) {
+ tmp := reflect.New(v.Type())
+ tmp.Elem().Set(v)
+ return tmp.Interface().(isZeroer).IsZero()
+ }
+ return v.IsZero()
}
-func willConvertToTable(ctx encoderCtx, v reflect.Value) bool {
- if !v.IsValid() {
- return false
- }
- t := v.Type()
- if t == timeType || t.Implements(textMarshalerType) {
- return false
+// appendKey emits a key, quoted only if necessary.
+func (e *encoderState) appendKey(b []byte, key string) []byte {
+ if isBareKey(key) {
+ return append(b, key...)
}
- if v.Kind() != reflect.Ptr && v.CanAddr() && reflect.PointerTo(t).Implements(textMarshalerType) {
+ return e.appendString(b, key)
+}
+
+func isBareKey(key string) bool {
+ if len(key) == 0 {
return false
}
-
- switch t.Kind() {
- case reflect.Map, reflect.Struct:
- return !ctx.inline
- case reflect.Interface:
- return willConvertToTable(ctx, v.Elem())
- case reflect.Ptr:
- if v.IsNil() {
+ for _, c := range []byte(key) {
+ if !isUnquotedKeyByte(c) {
return false
}
-
- return willConvertToTable(ctx, v.Elem())
- default:
- return false
}
+ return true
}
-func willConvertToTableOrArrayTable(ctx encoderCtx, v reflect.Value) bool {
- if ctx.insideKv {
- return false
- }
+func isUnquotedKeyByte(c byte) bool {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_'
+}
+
+// appendValue emits a TOML value.
+func (e *encoderState) appendValue(b []byte, v reflect.Value, opts valueOptions, indent int) ([]byte, error) {
t := v.Type()
- if t.Kind() == reflect.Interface {
- return willConvertToTableOrArrayTable(ctx, v.Elem())
+ // Special types take precedence over their kind.
+ switch t {
+ case timeType:
+ return v.Interface().(time.Time).AppendFormat(b, "2006-01-02T15:04:05.999999999Z07:00"), nil
+ case localDateType:
+ return append(b, v.Interface().(LocalDate).String()...), nil
+ case localTimeType:
+ return append(b, v.Interface().(LocalTime).String()...), nil
+ case localDateTimeType:
+ return append(b, v.Interface().(LocalDateTime).String()...), nil
+ case jsonNumberType:
+ if e.marshalJSONNumbers {
+ return appendJSONNumber(b, v.Interface().(json.Number))
+ }
}
- if t.Kind() == reflect.Slice || t.Kind() == reflect.Array {
- if v.Len() == 0 {
- // An empty slice should be a kv = [].
- return false
+ // A Marshaler reached through a value position (an array element or inline
+ // table member) splices its bytes verbatim. Everything (including the type
+ // check) lives in a separate method so this hot function keeps its default
+ // layout: when the opt-in interface is off, only the bool test runs here.
+ if e.marshalerOn {
+ if b2, done, err := e.appendMarshalerInline(b, v, t); done {
+ return b2, err
}
+ }
- for i := 0; i < v.Len(); i++ {
- t := willConvertToTable(ctx, v.Index(i))
-
- if !t {
- return false
- }
+ switch encPropsForType(t).text {
+ case 1:
+ if t.Kind() != reflect.String {
+ return e.appendTextMarshaler(b, v.Interface().(encoding.TextMarshaler))
}
-
- return true
+ case 2:
+ if v.CanAddr() {
+ return e.appendTextMarshaler(b, v.Addr().Interface().(encoding.TextMarshaler))
+ }
+ tmp := reflect.New(t)
+ tmp.Elem().Set(v)
+ return e.appendTextMarshaler(b, tmp.Interface().(encoding.TextMarshaler))
}
- return willConvertToTable(ctx, v)
+ switch v.Kind() {
+ case reflect.Ptr:
+ if v.IsNil() {
+ // nil pointers are encoded as the zero value of their element
+ // type.
+ return e.appendValue(b, reflect.Zero(t.Elem()), opts, indent)
+ }
+ return e.appendValue(b, v.Elem(), opts, indent)
+ case reflect.Interface:
+ if v.IsNil() {
+ return nil, errors.New("toml: cannot encode a nil interface")
+ }
+ return e.appendValue(b, v.Elem(), opts, indent)
+ case reflect.String:
+ s := v.String()
+ // The "multiline" option only takes effect when the string actually
+ // contains a newline. Wrapping a single-line value such as "2" in a
+ // """...""" block adds noise without improving readability, so it is
+ // emitted as a regular single-line string instead.
+ if opts.multiline && strings.IndexByte(s, '\n') >= 0 {
+ return e.appendMultilineString(b, s), nil
+ }
+ return e.appendString(b, s), nil
+ case reflect.Bool:
+ if v.Bool() {
+ return append(b, "true"...), nil
+ }
+ return append(b, "false"...), nil
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return strconv.AppendInt(b, v.Int(), 10), nil
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ u := v.Uint()
+ if u > math.MaxInt64 {
+ return nil, fmt.Errorf("toml: cannot encode an unsigned integer above math.MaxInt64: %d", u)
+ }
+ return strconv.AppendUint(b, u, 10), nil
+ case reflect.Float32:
+ return appendFloat(b, v.Float(), 32), nil
+ case reflect.Float64:
+ return appendFloat(b, v.Float(), 64), nil
+ case reflect.Slice, reflect.Array:
+ return e.appendArray(b, v, opts, indent)
+ case reflect.Map:
+ return e.appendInlineTable(b, v, indent)
+ case reflect.Struct:
+ return e.appendInlineTable(b, v, indent)
+ default:
+ return nil, fmt.Errorf("toml: cannot encode value of type %s", v.Type())
+ }
}
-func (enc *Encoder) encodeSlice(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- if v.Len() == 0 {
- b = append(b, "[]"...)
+var jsonNumberType = reflect.TypeOf(json.Number(""))
- return b, nil
+func appendJSONNumber(b []byte, n json.Number) ([]byte, error) {
+ if n == "" {
+ return append(b, '0'), nil
}
-
- if willConvertToTableOrArrayTable(ctx, v) {
- return enc.encodeSliceAsArrayTable(b, ctx, v)
+ if i, err := n.Int64(); err == nil {
+ return strconv.AppendInt(b, i, 10), nil
}
-
- return enc.encodeSliceAsArray(b, ctx, v)
+ f, err := n.Float64()
+ if err != nil {
+ return nil, fmt.Errorf("toml: cannot encode json.Number %q: %w", string(n), err)
+ }
+ return appendFloat(b, f, 64), nil
}
-// caller should have checked that v is a slice that only contains values that
-// encode into tables.
-func (enc *Encoder) encodeSliceAsArrayTable(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- ctx.shiftKey()
-
- scratch := make([]byte, 0, 64)
-
- scratch = enc.commented(ctx.commented, scratch)
+func appendFloat(b []byte, f float64, bitSize int) []byte {
+ switch {
+ case math.IsNaN(f):
+ return append(b, "nan"...)
+ case math.IsInf(f, 1):
+ return append(b, "inf"...)
+ case math.IsInf(f, -1):
+ return append(b, "-inf"...)
+ }
+ start := len(b)
+ b = strconv.AppendFloat(b, f, 'f', -1, bitSize)
+ // TOML floats must have a fractional part or an exponent.
+ if !bytes.ContainsAny(b[start:], ".eE") {
+ b = append(b, ".0"...)
+ }
+ return b
+}
- if enc.indentTables {
- scratch = enc.indent(ctx.indent, scratch)
+func (e *encoderState) appendTextMarshaler(b []byte, m encoding.TextMarshaler) ([]byte, error) {
+ text, err := m.MarshalText()
+ if err != nil {
+ return nil, fmt.Errorf("toml: error calling MarshalText: %w", err)
}
+ return e.appendString(b, string(text)), nil
+}
- scratch = append(scratch, "[["...)
+// appendArray encodes a slice or array value.
+func (e *encoderState) appendArray(b []byte, v reflect.Value, opts valueOptions, indent int) ([]byte, error) {
+ multiline := opts.multiline || e.arraysMultiline
- for i, k := range ctx.parentKey {
- if i > 0 {
- scratch = append(scratch, '.')
+ b = append(b, '[')
+ if multiline && v.Len() > 0 {
+ for i := 0; i < v.Len(); i++ {
+ if i > 0 {
+ b = append(b, ',')
+ }
+ b = append(b, '\n')
+ for j := 0; j <= indent; j++ {
+ b = append(b, e.indentSymbol...)
+ }
+ var err error
+ b, err = e.appendValue(b, v.Index(i), valueOptions{}, indent+1)
+ if err != nil {
+ return nil, err
+ }
+ }
+ b = append(b, '\n')
+ for j := 0; j < indent; j++ {
+ b = append(b, e.indentSymbol...)
+ }
+ } else {
+ for i := 0; i < v.Len(); i++ {
+ if i > 0 {
+ b = append(b, ", "...)
+ }
+ var err error
+ b, err = e.appendValue(b, v.Index(i), valueOptions{}, indent)
+ if err != nil {
+ return nil, err
+ }
}
-
- scratch = enc.encodeKey(scratch, k)
}
+ return append(b, ']'), nil
+}
- scratch = append(scratch, "]]\n"...)
- ctx.skipTableHeader = true
-
- b = enc.encodeComment(ctx.indent, ctx.options.comment, b)
-
- if enc.indentTables {
- ctx.indent++
+// appendInlineTable encodes a map or a struct as an inline table.
+func (e *encoderState) appendInlineTable(b []byte, v reflect.Value, indent int) ([]byte, error) {
+ entries, err := e.collectEntries(v)
+ if err != nil {
+ return nil, err
}
- for i := 0; i < v.Len(); i++ {
- if i != 0 {
- b = append(b, "\n"...)
+ b = append(b, '{')
+ for i, ent := range entries {
+ if i > 0 {
+ b = append(b, ", "...)
}
-
- b = append(b, scratch...)
-
- var err error
- b, err = enc.encode(b, ctx, v.Index(i))
+ b = e.appendKey(b, ent.key)
+ b = append(b, " = "...)
+ // multiline strings are not allowed inside inline tables: they
+ // would break the single-line requirement.
+ opts := ent.options
+ opts.multiline = false
+ b, err = e.appendValue(b, ent.value, opts, indent)
if err != nil {
return nil, err
}
}
-
- return b, nil
+ e.putEntries(entries)
+ return append(b, '}'), nil
}
-func (enc *Encoder) encodeSliceAsArray(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) {
- multiline := ctx.options.multiline || enc.arraysMultiline
- separator := ", "
-
- b = append(b, '[')
-
- subCtx := ctx
- subCtx.options = valueOptions{}
-
- if multiline {
- separator = ",\n"
-
- b = append(b, '\n')
-
- subCtx.indent++
+// appendString encodes a string, using a literal string when possible and a
+// basic string otherwise.
+func (e *encoderState) appendString(b []byte, s string) []byte {
+ if canBeLiteral(s) {
+ b = append(b, '\'')
+ b = append(b, s...)
+ return append(b, '\'')
}
+ return appendBasicString(b, s)
+}
- var err error
- first := true
-
- for i := 0; i < v.Len(); i++ {
- if first {
- first = false
- } else {
- b = append(b, separator...)
- }
-
- if multiline {
- b = enc.indent(subCtx.indent, b)
- }
-
- b, err = enc.encode(b, subCtx, v.Index(i))
- if err != nil {
- return nil, err
+// canBeLiteral returns true when the string can be represented as a TOML
+// literal string: no control characters, no single quote, no newline.
+func canBeLiteral(s string) bool {
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if c == '\'' || c == 0x7f || c < 0x20 {
+ return false
}
}
+ return utf8.ValidString(s)
+}
- if multiline {
- b = append(b, '\n')
- b = enc.indent(ctx.indent, b)
+// appendBasicString encodes a string as a TOML basic (double-quoted) string.
+func appendBasicString(b []byte, s string) []byte {
+ b = append(b, '"')
+ for i := 0; i < len(s); {
+ c := s[i]
+ switch {
+ case c == '"':
+ b = append(b, '\\', '"')
+ i++
+ case c == '\\':
+ b = append(b, '\\', '\\')
+ i++
+ case c == '\b':
+ b = append(b, '\\', 'b')
+ i++
+ case c == '\f':
+ b = append(b, '\\', 'f')
+ i++
+ case c == '\n':
+ b = append(b, '\\', 'n')
+ i++
+ case c == '\r':
+ b = append(b, '\\', 'r')
+ i++
+ case c == '\t':
+ b = append(b, '\\', 't')
+ i++
+ case c < 0x20 || c == 0x7f:
+ b = append(b, fmt.Sprintf("\\u%04X", c)...)
+ i++
+ default:
+ r, size := utf8.DecodeRuneInString(s[i:])
+ if r == utf8.RuneError && size == 1 {
+ // Replace invalid bytes by the replacement character.
+ b = append(b, fmt.Sprintf("\\u%04X", c)...)
+ i++
+ continue
+ }
+ b = append(b, s[i:i+size]...)
+ i += size
+ }
}
-
- b = append(b, ']')
-
- return b, nil
+ return append(b, '"')
}
-func (enc *Encoder) indent(level int, b []byte) []byte {
- for i := 0; i < level; i++ {
- b = append(b, enc.indentSymbol...)
+// appendMultilineString encodes a string as a TOML multi-line basic string.
+func appendMultilineString(b []byte, s string) []byte {
+ b = append(b, `"""`...)
+ b = append(b, '\n')
+ for i := 0; i < len(s); {
+ c := s[i]
+ switch {
+ case c == '"':
+ // Runs of three or more quotes must be escaped.
+ j := i
+ for j < len(s) && s[j] == '"' {
+ j++
+ }
+ if j-i >= 3 {
+ for ; i < j; i++ {
+ b = append(b, '\\', '"')
+ }
+ } else {
+ b = append(b, s[i:j]...)
+ i = j
+ }
+ case c == '\\':
+ b = append(b, '\\', '\\')
+ i++
+ case c == '\n':
+ b = append(b, '\n')
+ i++
+ case c == '\b':
+ b = append(b, '\\', 'b')
+ i++
+ case c == '\f':
+ b = append(b, '\\', 'f')
+ i++
+ case c == '\r':
+ b = append(b, '\\', 'r')
+ i++
+ case c == '\t':
+ b = append(b, '\t')
+ i++
+ case c < 0x20 || c == 0x7f:
+ b = append(b, fmt.Sprintf("\\u%04X", c)...)
+ i++
+ default:
+ r, size := utf8.DecodeRuneInString(s[i:])
+ if r == utf8.RuneError && size == 1 {
+ b = append(b, fmt.Sprintf("\\u%04X", c)...)
+ i++
+ continue
+ }
+ b = append(b, s[i:i+size]...)
+ i += size
+ }
}
+ return append(b, `"""`...)
+}
- return b
+func (e *encoderState) appendMultilineString(b []byte, s string) []byte {
+ return appendMultilineString(b, s)
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/strict.go b/vendor/github.com/pelletier/go-toml/v2/strict.go
index e9a4be2c32c9..b58571df17e2 100644
--- a/vendor/github.com/pelletier/go-toml/v2/strict.go
+++ b/vendor/github.com/pelletier/go-toml/v2/strict.go
@@ -11,69 +11,63 @@ type strict struct {
// Tracks the current key being processed.
key tracker.KeyTracker
- missing []unstable.ParserError
-
- // Reference to the document for computing key ranges.
- doc []byte
-}
-
-func (s *strict) EnterTable(node *unstable.Node) {
- if !s.Enabled {
- return
- }
-
- s.key.UpdateTable(node)
+ missing []decodeError
}
-func (s *strict) EnterArrayTable(node *unstable.Node) {
- if !s.Enabled {
- return
- }
-
- s.key.UpdateArrayTable(node)
+// decodeError is the information needed to materialize a DecodeError once the
+// whole document is available.
+type decodeError struct {
+ highlight unstable.Range
+ key Key
+ message string
}
-func (s *strict) EnterKeyValue(node *unstable.Node) {
- if !s.Enabled {
- return
- }
-
- s.key.Push(node)
+// Reset clears the state of the tracker so it can be reused for another
+// document.
+func (s *strict) Reset() {
+ s.key = tracker.KeyTracker{}
+ s.missing = s.missing[:0]
}
-func (s *strict) ExitKeyValue(node *unstable.Node) {
+// EnterTable is called when a new table or array table expression starts
+// being processed.
+func (s *strict) EnterTable(node *unstable.Node) {
if !s.Enabled {
return
}
-
- s.key.Pop(node)
+ s.key.UpdateTable(node)
}
+// MissingTable is called when a table is present in the document but has no
+// corresponding field in the target.
func (s *strict) MissingTable(node *unstable.Node) {
if !s.Enabled {
return
}
-
- s.missing = append(s.missing, unstable.ParserError{
- Highlight: s.keyLocation(node),
- Message: "missing table",
- Key: s.key.Key(),
+ s.missing = append(s.missing, decodeError{
+ highlight: keyLocation(node),
+ key: s.key.Key(),
+ message: "missing table",
})
}
+// MissingField is called when a key-value is present in the document but has
+// no corresponding field in the target.
func (s *strict) MissingField(node *unstable.Node) {
if !s.Enabled {
return
}
-
- s.missing = append(s.missing, unstable.ParserError{
- Highlight: s.keyLocation(node),
- Message: "unknown field",
- Key: s.key.Key(),
+ s.key.Push(node)
+ s.missing = append(s.missing, decodeError{
+ highlight: keyLocation(node),
+ key: s.key.Key(),
+ message: "unknown field",
})
+ s.key.Pop(node)
}
-func (s *strict) Error(doc []byte) error {
+// Error returns the cumulated StrictMissingError for the document, or nil.
+func (s *strict) Error(document []byte) error {
if !s.Enabled || len(s.missing) == 0 {
return nil
}
@@ -83,14 +77,16 @@ func (s *strict) Error(doc []byte) error {
}
for _, derr := range s.missing {
- derr := derr
- err.Errors = append(err.Errors, *wrapDecodeError(doc, &derr))
+ highlight := document[derr.highlight.Offset : derr.highlight.Offset+derr.highlight.Length]
+ err.Errors = append(err.Errors, *newDecodeError(document, highlight, derr.key, derr.message))
}
return err
}
-func (s *strict) keyLocation(node *unstable.Node) []byte {
+// keyLocation returns the range of the document covering all the parts of
+// the key of the given node.
+func keyLocation(node *unstable.Node) unstable.Range {
k := node.Key()
hasOne := k.Next()
@@ -98,17 +94,15 @@ func (s *strict) keyLocation(node *unstable.Node) []byte {
panic("should not be called with empty key")
}
- // Get the range from the first key to the last key.
- firstRaw := k.Node().Raw
- lastRaw := firstRaw
+ start := k.Node().Raw
+ end := start
for k.Next() {
- lastRaw = k.Node().Raw
+ end = k.Node().Raw
}
- // Compute the slice from the document using the ranges.
- start := firstRaw.Offset
- end := lastRaw.Offset + lastRaw.Length
-
- return s.doc[start:end]
+ return unstable.Range{
+ Offset: start.Offset,
+ Length: end.Offset + end.Length - start.Offset,
+ }
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/toml.abnf b/vendor/github.com/pelletier/go-toml/v2/toml.abnf
index 473f3749e8b0..7647c4bed6f9 100644
--- a/vendor/github.com/pelletier/go-toml/v2/toml.abnf
+++ b/vendor/github.com/pelletier/go-toml/v2/toml.abnf
@@ -36,7 +36,7 @@ newline =/ %x0D.0A ; CRLF
comment-start-symbol = %x23 ; #
non-ascii = %x80-D7FF / %xE000-10FFFF
-non-eol = %x09 / %x20-7F / non-ascii
+non-eol = %x09 / %x20-7E / non-ascii
comment = comment-start-symbol *non-eol
@@ -74,12 +74,14 @@ escape = %x5C ; \
escape-seq-char = %x22 ; " quotation mark U+0022
escape-seq-char =/ %x5C ; \ reverse solidus U+005C
escape-seq-char =/ %x62 ; b backspace U+0008
+escape-seq-char =/ %x65 ; e escape U+001B
escape-seq-char =/ %x66 ; f form feed U+000C
escape-seq-char =/ %x6E ; n line feed U+000A
escape-seq-char =/ %x72 ; r carriage return U+000D
escape-seq-char =/ %x74 ; t tab U+0009
-escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX
-escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX
+escape-seq-char =/ %x78 2HEXDIG ; xHH U+00HH
+escape-seq-char =/ %x75 4HEXDIG ; uHHHH U+HHHH
+escape-seq-char =/ %x55 8HEXDIG ; UHHHHHHHH U+HHHHHHHH
;; Multiline Basic String
@@ -174,7 +176,7 @@ time-secfrac = "." 1*DIGIT
time-numoffset = ( "+" / "-" ) time-hour ":" time-minute
time-offset = "Z" / time-numoffset
-partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ]
+partial-time = time-hour ":" time-minute [ ":" time-second [ time-secfrac ] ]
full-date = date-fullyear "-" date-month "-" date-mday
full-time = partial-time time-offset
@@ -221,13 +223,14 @@ std-table-close = ws %x5D ; ] Right square bracket
;; Inline Table
-inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close
+inline-table = inline-table-open [ inline-table-keyvals ] ws-comment-newline inline-table-close
-inline-table-open = %x7B ws ; {
-inline-table-close = ws %x7D ; }
-inline-table-sep = ws %x2C ws ; , Comma
+inline-table-open = %x7B ; {
+inline-table-close = %x7D ; }
+inline-table-sep = %x2C ; , Comma
-inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ]
+inline-table-keyvals = ws-comment-newline keyval ws-comment-newline inline-table-sep inline-table-keyvals
+inline-table-keyvals =/ ws-comment-newline keyval ws-comment-newline [ inline-table-sep ]
;; Array Table
diff --git a/vendor/github.com/pelletier/go-toml/v2/types.go b/vendor/github.com/pelletier/go-toml/v2/types.go
index 6d12fe5802c2..420f1982fa2d 100644
--- a/vendor/github.com/pelletier/go-toml/v2/types.go
+++ b/vendor/github.com/pelletier/go-toml/v2/types.go
@@ -6,17 +6,18 @@ import (
"time"
)
-// isZeroer is used to check if a type has a custom IsZero method.
-// This allows custom types to define their own zero-value semantics.
+// isZeroer is used to check whether a value is the zero value for its type,
+// as defined by the type itself.
type isZeroer interface {
IsZero() bool
}
+var isZeroerType = reflect.TypeOf(new(isZeroer)).Elem()
+
var (
- timeType = reflect.TypeOf((*time.Time)(nil)).Elem()
- textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem()
- textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
- isZeroerType = reflect.TypeOf((*isZeroer)(nil)).Elem()
+ timeType = reflect.TypeOf(time.Time{})
+ textMarshalerType = reflect.TypeOf(new(encoding.TextMarshaler)).Elem()
+ textUnmarshalerType = reflect.TypeOf(new(encoding.TextUnmarshaler)).Elem()
mapStringInterfaceType = reflect.TypeOf(map[string]interface{}(nil))
sliceInterfaceType = reflect.TypeOf([]interface{}(nil))
stringType = reflect.TypeOf("")
diff --git a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go
index e7db8128cebc..d110243f49ad 100644
--- a/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go
+++ b/vendor/github.com/pelletier/go-toml/v2/unmarshaler.go
@@ -9,20 +9,70 @@ import (
"reflect"
"strconv"
"strings"
- "sync/atomic"
+ "sync"
"time"
"github.com/pelletier/go-toml/v2/internal/tracker"
"github.com/pelletier/go-toml/v2/unstable"
)
+// decoderPool recycles decoders (and their internal buffers: parser arena,
+// seen-tracker entries, scratch buffers) across calls to Unmarshal and
+// Decode.
+var decoderPool = sync.Pool{
+ New: func() interface{} { return &decoder{} },
+}
+
+func getDecoder(strictMode, unmarshalerInterface bool) *decoder {
+ d := decoderPool.Get().(*decoder)
+ d.reset()
+ d.strict.Enabled = strictMode
+ d.unmarshalerInterface = unmarshalerInterface
+ return d
+}
+
+func putDecoder(d *decoder) {
+ decoderPool.Put(d)
+}
+
+// reset clears the per-document state of the decoder, keeping the allocated
+// buffers for reuse.
+func (d *decoder) reset() {
+ d.seen.Reset()
+ d.tableKey = d.tableKey[:0]
+ d.skipUntilTable = false
+ d.path = d.path[:0]
+ d.captures = d.captures[:0]
+ d.captureIdx = -1
+ d.segIdx = d.segIdx[:0]
+ // Reuse the array-table counter slots across documents instead of
+ // deleting them: a zeroed slot is indistinguishable from an absent one,
+ // and keeping it alive means setArrayCount does not have to allocate a new
+ // *int every time the same path reappears. A safety valve bounds the table
+ // for adversarial inputs that introduce unboundedly many distinct paths.
+ if len(d.arrayCounts) > 1<<14 {
+ d.arrayCounts = nil
+ } else {
+ for _, p := range d.arrayCounts {
+ *p = 0
+ }
+ }
+ d.tableTarget = reflect.Value{}
+ d.tableTargetValid = false
+ d.tableFlush = d.tableFlush[:0]
+ d.tableParentSlot = slotWriter{}
+ d.keyParts = d.keyParts[:0]
+ d.strict.Reset()
+}
+
// Unmarshal deserializes a TOML document into a Go value.
//
// It is a shortcut for Decoder.Decode() with the default options.
func Unmarshal(data []byte, v interface{}) error {
- d := decoder{}
- d.p.Reset(data)
- return d.FromParser(v)
+ d := getDecoder(false, false)
+ err := d.unmarshal(data, v)
+ putDecoder(d)
+ return err
}
// Decoder reads and decode a TOML document from an input stream.
@@ -124,1335 +174,2223 @@ func (d *Decoder) Decode(v interface{}) error {
return fmt.Errorf("toml: %w", err)
}
- dec := decoder{
- strict: strict{
- Enabled: d.strict,
- doc: b,
- },
- unmarshalerInterface: d.unmarshalerInterface,
+ dec := getDecoder(d.strict, d.unmarshalerInterface)
+ err = dec.unmarshal(b, v)
+ putDecoder(dec)
+ return err
+}
+
+// pathPart is one part of the key path leading to a value. Parts that come
+// from the current table header only carry a name; parts that come from the
+// key of the current key-value expression also carry the AST node, and their
+// name is materialized lazily to avoid allocations.
+type pathPart struct {
+ name string
+ node *unstable.Node
+}
+
+// bytes returns the raw bytes of the key part.
+func (p *pathPart) bytes() []byte {
+ if p.node != nil {
+ return p.node.Data
+ }
+ return []byte(p.name)
+}
+
+// str returns the key part as a string, possibly allocating.
+func (p *pathPart) str() string {
+ if p.node != nil {
+ return string(p.node.Data)
}
- dec.p.Reset(b)
+ return p.name
+}
- return dec.FromParser(v)
+// rawCapture accumulates the raw bytes fed to a type implementing
+// unstable.Unmarshaler for a table target. The target is identified by the
+// parts of its key and the array-table indexes in effect when the capture
+// was created, so that it can be located again once the whole document has
+// been processed (the address of the target may change as slices grow).
+type rawCapture struct {
+ names []string
+ // indexes[i] is the index to use when reaching a slice or array right
+ // before consuming names[i]. indexes[len(names)] is the index of the
+ // element when the target is an element of an array table. -1 when not
+ // relevant.
+ indexes []int
+ buf []byte
}
type decoder struct {
- // Which parser instance in use for this decoding session.
p unstable.Parser
- // Flag indicating that the current expression is stashed.
- // If set to true, calling nextExpr will not actually pull a new expression
- // but turn off the flag instead.
- stashedExpr bool
-
- // Skip expressions until a table is found. This is set to true when a
- // table could not be created (missing field in map), so all KV expressions
- // need to be skipped.
- skipUntilTable bool
-
- // Flag indicating that the current array/slice table should be cleared because
- // it is the first encounter of an array table.
- clearArrayTable bool
+ // strict mode
+ strict strict
- // Tracks position in Go arrays.
- // This is used when decoding [[array tables]] into Go arrays. Given array
- // tables are separate TOML expression, we need to keep track of where we
- // are at in the Go array, as we can't just introspect its size.
- arrayIndexes map[reflect.Value]int
+ // toggles unmarshaler interface
+ unmarshalerInterface bool
- // Tracks keys that have been seen, with which type.
+ // tracks the duplicate and type consistency of the keys
seen tracker.SeenTracker
- // Strict mode
- strict strict
-
- // Flag that enables/disables unmarshaler interface.
- unmarshalerInterface bool
+ // path of the current table header, as copied strings
+ tableKey []string
- // Current context for the error.
- errorContext *errorContext
-}
+ // true when the expressions under the current table header cannot be
+ // stored anywhere and should be skipped
+ skipUntilTable bool
-type errorContext struct {
- Struct reflect.Type
- Field []int
+ // scratch buffer for the key path of the current expression
+ path []pathPart
+
+ // raw captures for the unmarshaler interface, in order of first
+ // appearance. captureIdx is the index of the capture the current table
+ // belongs to, or -1.
+ captures []rawCapture
+ captureIdx int
+
+ // segIdx[i] records the array element index used when traversing a
+ // slice or array right before consuming the i-th part of the current
+ // table key. Reset for each table expression.
+ segIdx []int
+
+ // arrayCounts tracks the number of elements appended to fixed-size
+ // arrays used as array tables, keyed by the NUL-joined key parts.
+ // Values are pointer slots so that updating an existing path does not
+ // allocate a new key string.
+ arrayCounts map[string]*int
+
+ // Cached target of the current table, so that key-values do not need to
+ // walk the document structure from the root for every expression.
+ // tableFlush holds the write-backs to perform when leaving the table
+ // (for targets reached through map values, which are copies).
+ // tableParentSlot stores a replacement of the target itself (e.g. a nil
+ // map that was allocated) into its parent.
+ tableTarget reflect.Value
+ tableTargetValid bool
+ tableFlush []flushOp
+ tableParentSlot slotWriter
+
+ // strKey is a reusable string value used as map key, so that map
+ // operations with string keys do not need to allocate a boxed key for
+ // every access. It must be refreshed with stringMapKey immediately
+ // before each use: any recursive call may overwrite it.
+ strKey reflect.Value
+
+ // interned de-duplicates key strings: documents repeat the same keys
+ // over and over, and the table survives pooling, so repeated decodes
+ // of similar documents stop allocating key strings altogether.
+ interned map[string]string
+
+ // pathScratch is the buffer used by joinPath.
+ pathScratch []byte
+
+ // keyParts is the reusable buffer holding the decoded parts of the key of
+ // the current expression in the fused generic decode path.
+ keyParts [][]byte
}
-func (d *decoder) typeMismatchError(toml string, target reflect.Type) error {
- return fmt.Errorf("toml: %s", d.typeMismatchString(toml, target))
+// slotWriter remembers how to store a value at some location of the target
+// structure. Implemented as a struct instead of a closure to avoid
+// allocations.
+type slotWriter struct {
+ kind uint8 // 0: none, 1: slot.Set, 2: m.SetMapIndex(k, ...), 3: m.SetMapIndex(string key ks, ...)
+ slot reflect.Value
+ m reflect.Value
+ k reflect.Value
+ ks string
}
-func (d *decoder) typeMismatchString(toml string, target reflect.Type) string {
- if d.errorContext != nil && d.errorContext.Struct != nil {
- ctx := d.errorContext
- f := ctx.Struct.FieldByIndex(ctx.Field)
- return fmt.Sprintf("cannot decode TOML %s into struct field %s.%s of type %s", toml, ctx.Struct, f.Name, f.Type)
+func (d *decoder) storeSlot(s *slotWriter, nv reflect.Value) {
+ switch s.kind {
+ case 1:
+ if s.slot.CanSet() {
+ s.slot.Set(nv)
+ }
+ case 2:
+ s.m.SetMapIndex(s.k, nv)
+ case 3:
+ s.m.SetMapIndex(d.stringMapKey(s.ks), nv)
}
- return fmt.Sprintf("cannot decode TOML %s into a Go value of type %s", toml, target)
}
-func (d *decoder) expr() *unstable.Node {
- return d.p.Expression()
+// flushOp stores val using w when the table is flushed.
+type flushOp struct {
+ w slotWriter
+ val reflect.Value
}
-func (d *decoder) nextExpr() bool {
- if d.stashedExpr {
- d.stashedExpr = false
- return true
+// flushTable performs the pending write-backs of the cached table target, in
+// reverse order so that inner copies land before their parents are stored.
+func (d *decoder) flushTable() {
+ for i := len(d.tableFlush) - 1; i >= 0; i-- {
+ d.storeSlot(&d.tableFlush[i].w, d.tableFlush[i].val)
}
- return d.p.NextExpression()
+ d.tableFlush = d.tableFlush[:0]
+ d.tableTargetValid = false
+ d.tableParentSlot = slotWriter{}
+ d.tableTarget = reflect.Value{}
}
-func (d *decoder) stashExpr() {
- d.stashedExpr = true
+// intern returns the string corresponding to the given bytes, reusing a
+// previous allocation when the same key has been seen before.
+func (d *decoder) intern(b []byte) string {
+ if s, ok := d.interned[string(b)]; ok { // does not allocate
+ return s
+ }
+ if d.interned == nil {
+ d.interned = make(map[string]string, 64)
+ } else if len(d.interned) >= 1<<14 {
+ // Safety valve for adversarial inputs: do not let the table grow
+ // without bounds.
+ for k := range d.interned {
+ delete(d.interned, k)
+ }
+ }
+ s := string(b)
+ d.interned[s] = s
+ return s
}
-func (d *decoder) arrayIndex(shouldAppend bool, v reflect.Value) int {
- if d.arrayIndexes == nil {
- d.arrayIndexes = make(map[reflect.Value]int, 1)
+// partString returns the name of a path part, interning it when it comes
+// from the document.
+func (d *decoder) partString(p *pathPart) string {
+ if p.node != nil {
+ return d.intern(p.node.Data)
}
+ return p.name
+}
- idx, ok := d.arrayIndexes[v]
-
- if !ok {
- d.arrayIndexes[v] = 0
- } else if shouldAppend {
- idx++
- d.arrayIndexes[v] = idx
+// stringMapKey returns a reflect.Value holding the given string, reusing the
+// same allocation every time. The result must be used (the map operation
+// performed) before any recursive call, which may overwrite the buffer.
+func (d *decoder) stringMapKey(s string) reflect.Value {
+ if !d.strKey.IsValid() {
+ d.strKey = reflect.New(stringType).Elem()
}
-
- return idx
+ d.strKey.SetString(s)
+ return d.strKey
}
-func (d *decoder) FromParser(v interface{}) error {
- r := reflect.ValueOf(v)
- if r.Kind() != reflect.Ptr {
- return fmt.Errorf("toml: decoding can only be performed into a pointer, not %s", r.Kind())
+// joinPath builds the NUL-joined representation of a key path in the
+// decoder's scratch buffer. The result is only valid until the next call.
+func (d *decoder) joinPath(parts []string) []byte {
+ d.pathScratch = d.pathScratch[:0]
+ for i, p := range parts {
+ if i > 0 {
+ d.pathScratch = append(d.pathScratch, 0)
+ }
+ d.pathScratch = append(d.pathScratch, p...)
}
+ return d.pathScratch
+}
- if r.IsNil() {
- return errors.New("toml: decoding pointer target cannot be nil")
+// arrayCount returns the number of elements appended so far to the array
+// table at the given path.
+func (d *decoder) arrayCount(key []byte) int {
+ if d.arrayCounts == nil {
+ return 0
}
-
- r = r.Elem()
- if r.Kind() == reflect.Interface && r.IsNil() {
- newMap := map[string]interface{}{}
- r.Set(reflect.ValueOf(newMap))
+ if p := d.arrayCounts[string(key)]; p != nil { // does not allocate
+ return *p
}
+ return 0
+}
- err := d.fromParser(r)
- if err == nil {
- return d.strict.Error(d.p.Data())
+func (d *decoder) setArrayCount(key []byte, n int) {
+ if d.arrayCounts == nil {
+ d.arrayCounts = map[string]*int{}
}
-
- var e *unstable.ParserError
- if errors.As(err, &e) {
- return wrapDecodeError(d.p.Data(), e)
+ if p := d.arrayCounts[string(key)]; p != nil { // does not allocate
+ *p = n
+ return
}
-
- return err
+ v := n
+ d.arrayCounts[string(key)] = &v
}
-func (d *decoder) fromParser(root reflect.Value) error {
- for d.nextExpr() {
- err := d.handleRootExpression(d.expr(), root)
- if err != nil {
- return err
+// resetChildArrayCounts forgets the counts of all the array tables under
+// the given path, so that a new element starts fresh.
+func (d *decoder) resetChildArrayCounts(key []byte) {
+ if len(d.arrayCounts) == 0 {
+ return
+ }
+ for k, p := range d.arrayCounts {
+ // Prefix match without building the prefix string: same bytes as
+ // key, followed by the NUL separator.
+ if len(k) > len(key) && k[len(key)] == 0 && k[:len(key)] == string(key) {
+ // Zero instead of delete: the next element of the parent table
+ // will reuse the slot without allocating a new key.
+ *p = 0
}
}
-
- return d.p.Error()
}
-/*
-Rules for the unmarshal code:
-
-- The stack is used to keep track of which values need to be set where.
-- handle* functions <=> switch on a given unstable.Kind.
-- unmarshalX* functions need to unmarshal a node of kind X.
-- An "object" is either a struct or a map.
-*/
+func (d *decoder) typeMismatchError(toml string, target reflect.Type, highlight []byte) error {
+ return &typeMismatchError{
+ toml: toml,
+ target: target,
+ highlight: highlight,
+ }
+}
-func (d *decoder) handleRootExpression(expr *unstable.Node, v reflect.Value) error {
- var x reflect.Value
- var err error
- var first bool // used for to clear array tables on first use
+type typeMismatchError struct {
+ toml string
+ target reflect.Type
+ highlight []byte
+ // key is the TOML key being processed when the mismatch occurred. It is
+ // populated lazily as the error propagates back up to the key-value
+ // handler (see contextualizeError).
+ key Key
+}
- if !d.skipUntilTable || expr.Kind != unstable.KeyValue {
- first, err = d.seen.CheckExpression(expr)
- if err != nil {
- return err
- }
- }
+func (e *typeMismatchError) Error() string {
+ return fmt.Sprintf("cannot decode TOML %s into %s", e.toml, e.target)
+}
- switch expr.Kind {
- case unstable.KeyValue:
- if d.skipUntilTable {
- return nil
+// contextualizeError attaches the TOML key currently being processed to errors
+// raised while decoding a key-value expression, so that DecodeError.Key()
+// reports the offending key (e.g. on type mismatch errors). The current key is
+// reconstructed from d.path; when the table target is cached, d.path holds only
+// the key-value parts, so the table key prefix is prepended. This only runs on
+// the error path and adds no cost to successful decodes.
+func (d *decoder) contextualizeError(err error, withTableKey bool) error {
+ var mm *typeMismatchError
+ if errors.As(err, &mm) {
+ if mm.key == nil {
+ mm.key = d.currentKey(withTableKey)
}
- x, err = d.handleKeyValue(expr, v)
- case unstable.Table:
- d.skipUntilTable = false
- d.strict.EnterTable(expr)
- x, err = d.handleTable(expr.Key(), v)
- case unstable.ArrayTable:
- d.skipUntilTable = false
- d.strict.EnterArrayTable(expr)
- d.clearArrayTable = first
- x, err = d.handleArrayTable(expr.Key(), v)
- default:
- panic(fmt.Errorf("parser should not permit expression of kind %s at document root", expr.Kind))
+ return err
}
-
- if d.skipUntilTable {
- if expr.Kind == unstable.Table || expr.Kind == unstable.ArrayTable {
- d.strict.MissingTable(expr)
+ var perr *unstable.ParserError
+ if errors.As(err, &perr) {
+ if perr.Key == nil {
+ perr.Key = d.currentKey(withTableKey)
}
- } else if err == nil && x.IsValid() {
- v.Set(x)
}
-
return err
}
-func (d *decoder) handleArrayTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- if key.Next() {
- return d.handleArrayTablePart(key, v)
+// currentKey reconstructs the full TOML key being processed from the decoder's
+// path. When withTableKey is true, d.path contains only the key-value parts
+// (the table target is cached) and the table key is prepended.
+func (d *decoder) currentKey(withTableKey bool) Key {
+ n := len(d.path)
+ if withTableKey {
+ n += len(d.tableKey)
+ }
+ key := make(Key, 0, n)
+ if withTableKey {
+ key = append(key, d.tableKey...)
+ }
+ for i := range d.path {
+ key = append(key, d.path[i].str())
}
- return d.handleKeyValues(v)
+ return key
}
-func (d *decoder) handleArrayTableCollectionLast(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- switch v.Kind() {
- case reflect.Interface:
- elem := v.Elem()
- if !elem.IsValid() {
- elem = reflect.New(sliceInterfaceType).Elem()
- elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16))
- } else if elem.Kind() == reflect.Slice {
- if elem.Type() != sliceInterfaceType {
- elem = reflect.New(sliceInterfaceType).Elem()
- elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16))
- } else if !elem.CanSet() {
- nelem := reflect.New(sliceInterfaceType).Elem()
- nelem.Set(reflect.MakeSlice(sliceInterfaceType, elem.Len(), elem.Cap()))
- reflect.Copy(nelem, elem)
- elem = nelem
- }
- if d.clearArrayTable && elem.Len() > 0 {
- elem.SetLen(0)
- d.clearArrayTable = false
- }
- }
- return d.handleArrayTableCollectionLast(key, elem)
- case reflect.Ptr:
- elem := v.Elem()
- if !elem.IsValid() {
- ptr := reflect.New(v.Type().Elem())
- v.Set(ptr)
- elem = ptr.Elem()
- }
+func (d *decoder) unmarshal(data []byte, v interface{}) error {
+ r := reflect.ValueOf(v)
+ if r.Kind() != reflect.Ptr {
+ return fmt.Errorf("toml: decoding can only be performed into a pointer, not %s", r.Kind())
+ }
+ if r.IsNil() {
+ return errors.New("toml: decoding pointer target cannot be nil")
+ }
- elem, err := d.handleArrayTableCollectionLast(key, elem)
- if err != nil {
- return reflect.Value{}, err
- }
- v.Elem().Set(elem)
+ root := r.Elem()
- return v, nil
- case reflect.Slice:
- if d.clearArrayTable && v.Len() > 0 {
- v.SetLen(0)
- d.clearArrayTable = false
- }
- elemType := v.Type().Elem()
- var elem reflect.Value
- if elemType.Kind() == reflect.Interface {
- elem = makeMapStringInterface()
- } else {
- elem = reflect.New(elemType).Elem()
- }
- elem2, err := d.handleArrayTable(key, elem)
- if err != nil {
- return reflect.Value{}, err
- }
- if elem2.IsValid() {
- elem = elem2
- }
- return reflect.Append(v, elem), nil
- case reflect.Array:
- idx := d.arrayIndex(true, v)
- if idx >= v.Len() {
- return v, fmt.Errorf("%w at position %d", d.typeMismatchError("array table", v.Type()), idx)
+ d.captureIdx = -1
+ d.p.Reset(data)
+
+ // Fully generic targets (interface{} or map[string]interface{}) are
+ // decoded straight into native Go maps and slices, with no reflection on
+ // the document structure at all. This covers the common "decode arbitrary
+ // TOML into a map" case, including every standard benchmark dataset.
+ if !d.unmarshalerInterface {
+ if k := root.Kind(); k == reflect.Interface || (k == reflect.Map && root.Type() == mapStringInterfaceType) {
+ return d.unmarshalFused(root, data)
}
- elem := v.Index(idx)
- _, err := d.handleArrayTable(key, elem)
- return v, err
- default:
- return reflect.Value{}, d.typeMismatchError("array table", v.Type())
}
-}
-// When parsing an array table expression, each part of the key needs to be
-// evaluated like a normal key, but if it returns a collection, it also needs to
-// point to the last element of the collection. Unless it is the last part of
-// the key, then it needs to create a new element at the end.
-func (d *decoder) handleArrayTableCollection(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- if key.IsLast() {
- return d.handleArrayTableCollectionLast(key, v)
+ // When the root target itself implements the Unmarshaler interface, the
+ // whole document decodes into it. Open a capture spanning the entire
+ // document up front: the top-level key-values then flow through the
+ // existing capture branch and any tables attach to it via resumeCapture,
+ // so UnmarshalTOML receives the assembled document exactly once.
+ if d.unmarshalerInterface && hasUnmarshaler(root) {
+ d.startRootCapture()
}
- switch v.Kind() {
- case reflect.Ptr:
- elem := v.Elem()
- if !elem.IsValid() {
- ptr := reflect.New(v.Type().Elem())
- v.Set(ptr)
- elem = ptr.Elem()
- }
-
- elem, err := d.handleArrayTableCollection(key, elem)
+ for d.p.NextExpression() {
+ err := d.handleRootExpression(d.p.Expression(), root)
if err != nil {
- return reflect.Value{}, err
+ return d.wrapError(data, err)
}
- if elem.IsValid() {
- v.Elem().Set(elem)
+ }
+ if err := d.p.Error(); err != nil {
+ var perr *unstable.ParserError
+ if errors.As(err, &perr) {
+ return wrapDecodeError(data, perr)
}
+ return err
+ }
- return v, nil
- case reflect.Slice:
- // Create a new element when the slice is empty; otherwise operate on
- // the last element.
- var (
- elem reflect.Value
- created bool
- )
- if v.Len() == 0 {
- created = true
- elemType := v.Type().Elem()
- if elemType.Kind() == reflect.Interface {
- elem = makeMapStringInterface()
- } else {
- elem = reflect.New(elemType).Elem()
- }
- } else {
- elem = v.Index(v.Len() - 1)
- }
+ d.flushTable()
- x, err := d.handleArrayTable(key, elem)
- if err != nil || d.skipUntilTable {
- return reflect.Value{}, err
+ // Deliver the accumulated raw documents to the unmarshaler-interface
+ // targets.
+ for i := range d.captures {
+ nv, err := d.resolveCapture(root, &d.captures[i], 0, false)
+ if err != nil {
+ return err
}
- if x.IsValid() {
- if created {
- elem = x
- } else {
- elem.Set(x)
- }
+ if nv.IsValid() {
+ root.Set(nv)
}
+ }
- if created {
- return reflect.Append(v, elem), nil
+ // An empty document into a generic target still initializes it.
+ switch root.Kind() {
+ case reflect.Map:
+ if root.IsNil() {
+ root.Set(reflect.MakeMap(root.Type()))
}
- return v, err
- case reflect.Array:
- idx := d.arrayIndex(false, v)
- if idx >= v.Len() {
- return v, fmt.Errorf("%w at position %d", d.typeMismatchError("array table", v.Type()), idx)
+ case reflect.Interface:
+ if root.IsNil() {
+ root.Set(reflect.ValueOf(map[string]interface{}{}))
}
- elem := v.Index(idx)
- _, err := d.handleArrayTable(key, elem)
- return v, err
default:
- return d.handleArrayTable(key, v)
}
-}
-
-func (d *decoder) handleKeyPart(key unstable.Iterator, v reflect.Value, nextFn handlerFn, makeFn valueMakerFn) (reflect.Value, error) {
- var rv reflect.Value
-
- // First, dispatch over v to make sure it is a valid object.
- // There is no guarantee over what it could be.
- switch v.Kind() {
- case reflect.Ptr:
- elem := v.Elem()
- if !elem.IsValid() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- elem = v.Elem()
- return d.handleKeyPart(key, elem, nextFn, makeFn)
- case reflect.Map:
- vt := v.Type()
- // Create the key for the map element. Convert to key type.
- mk, err := d.keyFromData(vt.Key(), key.Node().Data)
- if err != nil {
- return reflect.Value{}, err
- }
+ return d.strict.Error(data)
+}
- // If the map does not exist, create it.
- if v.IsNil() {
- vt := v.Type()
- v = reflect.MakeMap(vt)
- rv = v
+// setAnyKey assigns the value of a key-value into the native map m, following
+// the (possibly dotted) key and creating intermediate maps as needed.
+func (d *decoder) setAnyKey(m map[string]interface{}, key unstable.Iterator, value *unstable.Node) error {
+ cur := m
+ for key.Next() {
+ name := d.intern(key.Node().Data)
+ if key.IsLast() {
+ av, err := d.decodeAny(value)
+ if err != nil {
+ return err
+ }
+ cur[name] = av
+ return nil
}
+ cur = d.anyChildTable(cur, name)
+ }
+ return nil
+}
- mv := v.MapIndex(mk)
- set := false
- switch {
- case !mv.IsValid():
- // If there is no value in the map, create a new one according to
- // the map type. If the element type is interface, create either a
- // map[string]interface{} or a []interface{} depending on whether
- // this is the last part of the array table key.
-
- t := vt.Elem()
- if t.Kind() == reflect.Interface {
- mv = makeFn()
- } else {
- mv = reflect.New(t).Elem()
+// anyChildTable returns the child table at name within cur, creating it if
+// absent and descending into the current (last) element when an array table
+// occupies the slot. A non-container in the slot cannot occur for a document
+// the seen-tracker has accepted.
+func (d *decoder) anyChildTable(cur map[string]interface{}, name string) map[string]interface{} {
+ switch v := cur[name].(type) {
+ case map[string]interface{}:
+ return v
+ case []interface{}:
+ if len(v) > 0 {
+ if last, ok := v[len(v)-1].(map[string]interface{}); ok {
+ return last
}
- set = true
- case mv.Kind() == reflect.Interface:
- mv = mv.Elem()
- if !mv.IsValid() {
- mv = makeFn()
- }
- set = true
- case !mv.CanAddr():
- vt := v.Type()
- t := vt.Elem()
- oldmv := mv
- mv = reflect.New(t).Elem()
- mv.Set(oldmv)
- set = true
}
+ }
+ nm := map[string]interface{}{}
+ cur[name] = nm
+ return nm
+}
- x, err := nextFn(key, mv)
- if err != nil {
- return reflect.Value{}, err
- }
+// wrapError gives document context to errors generated while processing an
+// expression.
+func (d *decoder) wrapError(data []byte, err error) error {
+ var perr *unstable.ParserError
+ if errors.As(err, &perr) {
+ return wrapDecodeError(data, perr)
+ }
+ var mm *typeMismatchError
+ if errors.As(err, &mm) {
+ return wrapDecodeError(data, &unstable.ParserError{
+ Highlight: mm.highlight,
+ Message: mm.Error(),
+ Key: mm.key,
+ })
+ }
+ return err
+}
- if x.IsValid() {
- mv = x
- set = true
- }
+// keyedError turns a bare error raised while processing an expression into a
+// ParserError carrying the position and key of that expression, so that it is
+// reported as a DecodeError with context. It is used for the errors returned
+// by SeenTracker.CheckExpression (redefinitions and duplicate keys, see issue
+// #668) and for table placement errors raised by walkTable (see issue #806).
+//
+// The highlight spans the expression's key. Unlike Node.Raw, key nodes always
+// carry a Raw range, so this works for tables and array tables too (whose own
+// Raw range is not set by the parser). For a duplicate detected inside an
+// inline table, node is the enclosing key-value expression, so the error
+// points at that expression's key.
+func (d *decoder) keyedError(node *unstable.Node, err error) error {
+ if err == nil {
+ return nil
+ }
- if set {
- v.SetMapIndex(mk, mv)
- }
- case reflect.Struct:
- path, found := structFieldPath(v, string(key.Node().Data))
- if !found {
- d.skipUntilTable = true
- return reflect.Value{}, nil
+ var key Key
+ var start, end unstable.Range
+ it := node.Key()
+ for it.Next() {
+ n := it.Node()
+ key = append(key, string(n.Data))
+ if len(key) == 1 {
+ start = n.Raw
}
+ end = n.Raw
+ }
- if d.errorContext == nil {
- d.errorContext = new(errorContext)
- }
- t := v.Type()
- d.errorContext.Struct = t
- d.errorContext.Field = path
+ var highlight []byte
+ if len(key) > 0 {
+ highlight = d.p.Raw(unstable.Range{
+ Offset: start.Offset,
+ Length: end.Offset + end.Length - start.Offset,
+ })
+ }
- f := fieldByIndex(v, path)
- x, err := nextFn(key, f)
- if err != nil || d.skipUntilTable {
- return reflect.Value{}, err
- }
- if x.IsValid() {
- f.Set(x)
- }
- d.errorContext.Field = nil
- d.errorContext.Struct = nil
- case reflect.Interface:
- if v.Elem().IsValid() {
- v = v.Elem()
- } else {
- v = makeMapStringInterface()
- }
+ return &unstable.ParserError{
+ Highlight: highlight,
+ Message: strings.TrimPrefix(err.Error(), "toml: "),
+ Key: key,
+ }
+}
- x, err := d.handleKeyPart(key, v, nextFn, makeFn)
- if err != nil {
- return reflect.Value{}, err
+func (d *decoder) handleRootExpression(expr *unstable.Node, root reflect.Value) error {
+ first, err := d.seen.CheckExpression(expr)
+ if err != nil {
+ return d.keyedError(expr, err)
+ }
+
+ switch expr.Kind {
+ case unstable.KeyValue:
+ if d.skipUntilTable {
+ return nil
}
- if x.IsValid() {
- v = x
+ if d.captureIdx >= 0 {
+ d.captureKeyValue(expr)
+ return nil
}
- rv = v
+ return d.handleKeyValueExpression(expr, root)
+ case unstable.Table:
+ d.flushTable()
+ d.skipUntilTable = false
+ d.captureIdx = -1
+ d.strict.EnterTable(expr)
+ return d.handleTableExpression(expr, root, false, first)
+ case unstable.ArrayTable:
+ d.flushTable()
+ d.skipUntilTable = false
+ d.captureIdx = -1
+ d.strict.EnterTable(expr)
+ return d.handleTableExpression(expr, root, true, first)
default:
- panic(fmt.Errorf("unhandled part: %s", v.Kind()))
+ return unstable.NewParserError(expr.Data, "unsupported expression kind %s", expr.Kind)
}
-
- return rv, nil
}
-// HandleArrayTablePart navigates the Go structure v using the key v. It is
-// only used for the prefix (non-last) parts of an array-table. When
-// encountering a collection, it should go to the last element.
-func (d *decoder) handleArrayTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- var makeFn valueMakerFn
- if key.IsLast() {
- makeFn = makeSliceInterface
- } else {
- makeFn = makeMapStringInterface
+// updateTableKey copies the parts of the key of a table expression into
+// tableKey.
+func (d *decoder) updateTableKey(expr *unstable.Node) {
+ d.tableKey = d.tableKey[:0]
+ it := expr.Key()
+ for it.Next() {
+ d.tableKey = append(d.tableKey, d.intern(it.Node().Data))
}
- return d.handleKeyPart(key, v, d.handleArrayTableCollection, makeFn)
}
-// HandleTable returns a reference when it has checked the next expression but
-// cannot handle it.
-func (d *decoder) handleTable(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- if v.Kind() == reflect.Slice {
- // For non-empty slices, work with the last element
- if v.Len() > 0 {
- elem := v.Index(v.Len() - 1)
- x, err := d.handleTable(key, elem)
- if err != nil {
- return reflect.Value{}, err
- }
- if x.IsValid() {
- elem.Set(x)
- }
- return reflect.Value{}, nil
- }
- // Empty slice - check if it implements Unmarshaler (e.g., RawMessage)
- // and we're at the end of the key path
- if d.unmarshalerInterface && !key.Next() {
- if v.CanAddr() && v.Addr().CanInterface() {
- if outi, ok := v.Addr().Interface().(unstable.Unmarshaler); ok {
- return d.handleKeyValuesUnmarshaler(outi)
- }
- }
- }
- return reflect.Value{}, unstable.NewParserError(key.Node().Data, "cannot store a table in a slice")
- }
- if key.Next() {
- // Still scoping the key
- return d.handleTablePart(key, v)
- }
- // Done scoping the key.
- // Now handle all the key-value expressions in this table.
- return d.handleKeyValues(v)
-}
+func (d *decoder) handleTableExpression(expr *unstable.Node, root reflect.Value, isArrayTable bool, first bool) error {
+ d.updateTableKey(expr)
-// Handle root expressions until the end of the document or the next
-// non-key-value.
-func (d *decoder) handleKeyValues(v reflect.Value) (reflect.Value, error) {
- // Check if target implements Unmarshaler before processing key-values.
- // This allows types to handle entire tables themselves.
+ // Check whether this table belongs to an exisiting raw capture (split
+ // tables, or children of a table assigned to an Unmarshaler).
if d.unmarshalerInterface {
- vv := v
- for vv.Kind() == reflect.Ptr {
- if vv.IsNil() {
- vv.Set(reflect.New(vv.Type().Elem()))
- }
- vv = vv.Elem()
- }
- if vv.CanAddr() && vv.Addr().CanInterface() {
- if outi, ok := vv.Addr().Interface().(unstable.Unmarshaler); ok {
- // Collect all key-value expressions for this table
- return d.handleKeyValuesUnmarshaler(outi)
- }
+ if d.resumeCapture(expr) {
+ return nil
}
}
- var rv reflect.Value
- for d.nextExpr() {
- expr := d.expr()
- if expr.Kind != unstable.KeyValue {
- // Stash the expression so that fromParser can just loop and use
- // the right handler.
- // We could just recurse ourselves here, but at least this gives a
- // chance to pop the stack a bit.
- d.stashExpr()
- break
- }
+ // Reset the per-segment array indexes.
+ d.segIdx = d.segIdx[:0]
+ for i := 0; i <= len(d.tableKey); i++ {
+ d.segIdx = append(d.segIdx, -1)
+ }
- _, err := d.seen.CheckExpression(expr)
- if err != nil {
- return reflect.Value{}, err
- }
+ return d.walkTable(root, expr, isArrayTable, first)
+}
- x, err := d.handleKeyValue(expr, v)
- if err != nil {
- return reflect.Value{}, err
- }
- if x.IsValid() {
- v = x
- rv = x
- }
+// newContainerElem returns a fresh element for a slice of the given element
+// type. Plain interface elements start out as an empty table.
+func newContainerElem(et reflect.Type) reflect.Value {
+ if et == interfaceType {
+ return reflect.ValueOf(map[string]interface{}{})
}
- return rv, nil
+ return reflect.New(et).Elem()
}
-// handleKeyValuesUnmarshaler collects all key-value expressions for a table
-// and passes them to the Unmarshaler as raw TOML bytes.
-func (d *decoder) handleKeyValuesUnmarshaler(u unstable.Unmarshaler) (reflect.Value, error) {
- // Collect raw bytes from all key-value expressions for this table.
- // We use the Raw field on each KeyValue expression to preserve the
- // original formatting (whitespace, quoting style, etc.) from the document.
- var buf []byte
+// walkTable processes a [table] or [[array table]] header: it creates the
+// intermediate containers, appends array-table elements, applies the strict
+// policy, registers unmarshaler-interface captures, and caches the target
+// container so that the key-values that follow are stored directly.
+//
+// Map values are not addressable: when one needs in-place mutations (struct
+// or array values), a copy is made and registered to be stored back when the
+// table changes (see flushTable). Maps and slices are references and are
+// traversed without copies.
+func (d *decoder) walkTable(root reflect.Value, expr *unstable.Node, isArrayTable bool, first bool) error {
+ v := root
+ pf := slotWriter{kind: 1, slot: root}
+ idx := 0
- for d.nextExpr() {
- expr := d.expr()
- if expr.Kind != unstable.KeyValue {
- d.stashExpr()
- break
+walk:
+ for {
+ // Dereference pointers in place.
+ for v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ elem := v.Elem()
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
}
- _, err := d.seen.CheckExpression(expr)
- if err != nil {
- return reflect.Value{}, err
+ // Tables assigned to a type implementing the unmarshaler interface
+ // are captured as raw bytes, delivered once the document is read.
+ if d.unmarshalerInterface && hasUnmarshaler(v) {
+ d.startCapture(idx, expr)
+ return nil
}
- // Use the raw bytes from the original document to preserve formatting
- if expr.Raw.Length > 0 {
- raw := d.p.Raw(expr.Raw)
- buf = append(buf, raw...)
+ if idx >= len(d.tableKey) {
+ break walk
}
- buf = append(buf, '\n')
- }
- if err := u.UnmarshalTOML(buf); err != nil {
- return reflect.Value{}, err
- }
-
- return reflect.Value{}, nil
-}
+ name := d.tableKey[idx]
-type (
- handlerFn func(key unstable.Iterator, v reflect.Value) (reflect.Value, error)
- valueMakerFn func() reflect.Value
-)
+ switch v.Kind() {
+ case reflect.Interface:
+ if !v.IsNil() {
+ c := v.Elem()
+ if k := c.Kind(); k == reflect.Map || k == reflect.Slice {
+ // Reference types: mutations are visible through the
+ // existing interface value.
+ v = c
+ continue
+ }
+ }
+ // Anything else is replaced by a fresh generic map.
+ if !mapStringInterfaceType.AssignableTo(v.Type()) {
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type()))
+ }
+ fresh := reflect.ValueOf(map[string]interface{}{})
+ d.storeSlot(&pf, fresh)
+ v = fresh
+ case reflect.Slice:
+ if v.Len() == 0 {
+ // Implicit creation of the first element: the array table
+ // that would create it has not been seen yet (issue 995).
+ if v.IsNil() {
+ v = reflect.MakeSlice(v.Type(), 0, 4)
+ }
+ v = reflect.Append(v, newContainerElem(v.Type().Elem()))
+ d.storeSlot(&pf, v)
+ }
+ n := v.Len() - 1
+ d.segIdx[idx] = n
+ elem := v.Index(n)
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ case reflect.Array:
+ key := d.joinPath(d.tableKey[:idx])
+ cnt := d.arrayCount(key)
+ if cnt == 0 {
+ cnt = 1
+ d.setArrayCount(key, 1)
+ }
+ if cnt > v.Len() {
+ return d.keyedError(expr, fmt.Errorf("cannot reach element %d of array of size %d", cnt-1, v.Len()))
+ }
+ d.segIdx[idx] = cnt - 1
+ elem := v.Index(cnt - 1)
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ case reflect.Map:
+ if v.IsNil() {
+ nm := reflect.MakeMap(v.Type())
+ d.storeSlot(&pf, nm)
+ v = nm
+ }
+ var key reflect.Value
+ var w slotWriter
+ if v.Type().Key() == stringType {
+ key = d.stringMapKey(name)
+ w = slotWriter{kind: 3, m: v, ks: name}
+ } else {
+ k, err := makeMapKey(v.Type().Key(), name)
+ if err != nil {
+ return err
+ }
+ key = k
+ w = slotWriter{kind: 2, m: v, k: k}
+ }
-func makeMapStringInterface() reflect.Value {
- return reflect.MakeMap(mapStringInterfaceType)
-}
+ elem := v.MapIndex(key)
+
+ // The last part of an array table is finalized as a slice
+ // container: do not materialize a table for it.
+ if isArrayTable && idx == len(d.tableKey)-1 {
+ et := v.Type().Elem()
+ switch et.Kind() {
+ case reflect.Interface, reflect.Slice, reflect.Array:
+ if elem.IsValid() {
+ v = elem
+ } else {
+ v = reflect.Zero(et)
+ }
+ pf = w
+ idx++
+ continue
+ default:
+ }
+ }
+
+ if elem.IsValid() {
+ ce := elem
+ ceIface := false
+ if ce.Kind() == reflect.Interface {
+ ceIface = true
+ if !ce.IsNil() {
+ ce = ce.Elem()
+ }
+ }
+ switch ce.Kind() {
+ case reflect.Map, reflect.Slice:
+ pf = w
+ v = ce
+ case reflect.Ptr:
+ if ce.IsNil() {
+ np := reflect.New(ce.Type().Elem())
+ d.storeSlot(&w, np)
+ ce = np
+ }
+ pf = w
+ v = ce
+ case reflect.Struct, reflect.Array:
+ if ceIface {
+ // Interface-held non-generic content is replaced.
+ fresh := reflect.ValueOf(map[string]interface{}{})
+ d.storeSlot(&w, fresh)
+ pf = w
+ v = fresh
+ } else {
+ tmp := reflect.New(elem.Type()).Elem()
+ tmp.Set(elem)
+ d.tableFlush = append(d.tableFlush, flushOp{w: w, val: tmp})
+ pf = slotWriter{kind: 1, slot: tmp}
+ v = tmp
+ }
+ default:
+ if !ceIface {
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", ce.Type()))
+ }
+ fresh := reflect.ValueOf(map[string]interface{}{})
+ d.storeSlot(&w, fresh)
+ pf = w
+ v = fresh
+ }
+ } else {
+ et := v.Type().Elem()
+ switch et.Kind() {
+ case reflect.Interface:
+ if !mapStringInterfaceType.AssignableTo(et) {
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et))
+ }
+ fresh := reflect.ValueOf(map[string]interface{}{})
+ d.storeSlot(&w, fresh)
+ pf = w
+ v = fresh
+ case reflect.Map:
+ nm := reflect.MakeMap(et)
+ d.storeSlot(&w, nm)
+ pf = w
+ v = nm
+ case reflect.Ptr:
+ np := reflect.New(et.Elem())
+ d.storeSlot(&w, np)
+ pf = w
+ v = np
+ case reflect.Struct, reflect.Array, reflect.Slice:
+ tmp := reflect.New(et).Elem()
+ d.tableFlush = append(d.tableFlush, flushOp{w: w, val: tmp})
+ pf = slotWriter{kind: 1, slot: tmp}
+ v = tmp
+ default:
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", et))
+ }
+ }
+ idx++
+ case reflect.Struct:
+ plan := planForType(v.Type())
+ f, found := plan.lookup(name)
+ if !found {
+ d.strict.MissingTable(expr)
+ d.skipUntilTable = true
+ return nil
+ }
+ fv, err := fieldByIndexAlloc(v, f.index)
+ if err != nil {
+ return err
+ }
+ pf = slotWriter{kind: 1, slot: fv}
+ v = fv
+ idx++
+ default:
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind()))
+ }
+ }
+
+ if isArrayTable {
+ akey := d.joinPath(d.tableKey)
+ d.resetChildArrayCounts(akey)
+
+ // Unwrap an interface container.
+ if v.Kind() == reflect.Interface {
+ var slice []interface{}
+ if !v.IsNil() {
+ if s, ok := v.Elem().Interface().([]interface{}); ok {
+ slice = s
+ }
+ }
+ if first {
+ slice = slice[:0]
+ }
+ m := map[string]interface{}{}
+ slice = append(slice, m)
+ sv := reflect.ValueOf(slice)
+ d.storeSlot(&pf, sv)
+ d.setArrayCount(akey, len(slice))
+ d.segIdx[len(d.tableKey)] = len(slice) - 1
+ d.tableTarget = reflect.ValueOf(m)
+ d.tableParentSlot = slotWriter{kind: 1, slot: sv.Index(len(slice) - 1)}
+ d.tableTargetValid = true
+ return nil
+ }
-func makeSliceInterface() reflect.Value {
- return reflect.MakeSlice(sliceInterfaceType, 0, 16)
+ switch v.Kind() {
+ case reflect.Slice:
+ if v.IsNil() {
+ v = reflect.MakeSlice(v.Type(), 0, 4)
+ } else if first {
+ v = v.Slice(0, 0)
+ }
+ v = reflect.Append(v, newContainerElem(v.Type().Elem()))
+ d.storeSlot(&pf, v)
+ n := v.Len() - 1
+ d.setArrayCount(akey, n+1)
+ d.segIdx[len(d.tableKey)] = n
+ elem := v.Index(n)
+ if d.unmarshalerInterface && hasUnmarshaler(elem) {
+ d.startCapture(len(d.tableKey), expr)
+ return nil
+ }
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ case reflect.Array:
+ cnt := d.arrayCount(akey)
+ if first {
+ cnt = 0
+ }
+ if cnt >= v.Len() {
+ return d.keyedError(expr, fmt.Errorf("array of size %d is too small to store this array table", v.Len()))
+ }
+ v.Index(cnt).Set(reflect.Zero(v.Type().Elem()))
+ d.setArrayCount(akey, cnt+1)
+ d.segIdx[len(d.tableKey)] = cnt
+ elem := v.Index(cnt)
+ if d.unmarshalerInterface && hasUnmarshaler(elem) {
+ d.startCapture(len(d.tableKey), expr)
+ return nil
+ }
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ default:
+ return d.keyedError(expr, fmt.Errorf("cannot store an array table in a %s", v.Kind()))
+ }
+ }
+
+ // Settle on the concrete container for the key-values that follow.
+ for {
+ switch v.Kind() {
+ case reflect.Ptr:
+ if v.IsNil() {
+ if !v.CanSet() {
+ return nil
+ }
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ elem := v.Elem()
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ continue
+ case reflect.Interface:
+ if !v.IsNil() {
+ c := v.Elem()
+ if c.Type() == mapStringInterfaceType || c.Type() == sliceInterfaceType {
+ v = c
+ continue
+ }
+ }
+ if !mapStringInterfaceType.AssignableTo(v.Type()) {
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Type()))
+ }
+ fresh := reflect.ValueOf(map[string]interface{}{})
+ d.storeSlot(&pf, fresh)
+ v = fresh
+ continue
+ case reflect.Slice:
+ if v.Len() == 0 {
+ if v.IsNil() {
+ v = reflect.MakeSlice(v.Type(), 0, 4)
+ }
+ v = reflect.Append(v, newContainerElem(v.Type().Elem()))
+ d.storeSlot(&pf, v)
+ }
+ n := v.Len() - 1
+ d.segIdx[len(d.tableKey)] = n
+ elem := v.Index(n)
+ pf = slotWriter{kind: 1, slot: elem}
+ v = elem
+ continue
+ case reflect.Map, reflect.Struct:
+ d.tableTarget = v
+ d.tableParentSlot = pf
+ d.tableTargetValid = true
+ return nil
+ default:
+ return d.keyedError(expr, fmt.Errorf("cannot store a table in a %s", v.Kind()))
+ }
+ }
}
-func (d *decoder) handleTablePart(key unstable.Iterator, v reflect.Value) (reflect.Value, error) {
- return d.handleKeyPart(key, v, d.handleTable, makeMapStringInterface)
+// resumeCapture looks for an existing capture this table expression belongs
+// to. It returns true if the expression was consumed.
+func (d *decoder) resumeCapture(expr *unstable.Node) bool {
+ // Iterate in reverse, so that tables attach to the latest element of
+ // array tables.
+ for i := len(d.captures) - 1; i >= 0; i-- {
+ c := &d.captures[i]
+ if len(d.tableKey) < len(c.names) {
+ continue
+ }
+ if expr.Kind == unstable.ArrayTable && len(d.tableKey) == len(c.names) {
+ // A new element of an array table is not part of the capture of
+ // the previous element.
+ continue
+ }
+ match := true
+ for j, p := range c.names {
+ if d.tableKey[j] != p {
+ match = false
+ break
+ }
+ }
+ if !match {
+ continue
+ }
+ d.captureIdx = i
+ if len(d.tableKey) > len(c.names) {
+ d.appendCaptureHeader(c, expr, len(c.names))
+ }
+ return true
+ }
+ return false
}
-func (d *decoder) tryTextUnmarshaler(node *unstable.Node, v reflect.Value) (bool, error) {
- // Special case for time, because we allow to unmarshal to it from
- // different kind of AST nodes.
- if v.Type() == timeType {
- return false, nil
+// appendCaptureHeader writes the table header of expr in the capture buffer,
+// adjusted to be relative to the capture root.
+func (d *decoder) appendCaptureHeader(c *rawCapture, expr *unstable.Node, skip int) {
+ c.buf = append(c.buf, '[')
+ if expr.Kind == unstable.ArrayTable {
+ c.buf = append(c.buf, '[')
+ }
+ c.buf = append(c.buf, d.rawKeySuffix(expr, skip)...)
+ c.buf = append(c.buf, ']')
+ if expr.Kind == unstable.ArrayTable {
+ c.buf = append(c.buf, ']')
}
+ c.buf = append(c.buf, '\n')
+}
- if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) {
- err := v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(node.Data)
- if err != nil {
- return false, unstable.NewParserError(d.p.Raw(node.Raw), "%w", err)
+// rawKeySuffix returns the raw bytes of the key of the expression, skipping
+// the first n parts.
+func (d *decoder) rawKeySuffix(expr *unstable.Node, n int) []byte {
+ it := expr.Key()
+ idx := 0
+ var start, end unstable.Range
+ for it.Next() {
+ if idx >= n {
+ r := it.Node().Raw
+ if start.Length == 0 && start.Offset == 0 && idx == n {
+ start = r
+ }
+ end = r
}
+ idx++
+ }
+ return d.p.Data()[start.Offset : end.Offset+end.Length]
+}
- return true, nil
+// startCapture registers a new capture for the table at the given path
+// (prefix of tableKey).
+func (d *decoder) startCapture(pathLen int, expr *unstable.Node) {
+ names := make([]string, pathLen)
+ copy(names, d.tableKey[:pathLen])
+ indexes := make([]int, pathLen+1)
+ copy(indexes, d.segIdx[:pathLen+1])
+ d.captures = append(d.captures, rawCapture{
+ names: names,
+ indexes: indexes,
+ })
+ d.captureIdx = len(d.captures) - 1
+ if pathLen < len(d.tableKey) {
+ d.appendCaptureHeader(&d.captures[d.captureIdx], expr, pathLen)
}
+}
- return false, nil
+// startRootCapture opens a capture covering the entire document, used when the
+// root target itself implements the Unmarshaler interface. It is opened before
+// reading any expression: top-level key-values are then accumulated through the
+// regular capture branch, and its empty name path matches every table in
+// resumeCapture, so the whole document is handed to UnmarshalTOML once. The
+// single index slot is -1 because the root is never reached through an array
+// table.
+func (d *decoder) startRootCapture() {
+ d.captures = append(d.captures, rawCapture{indexes: []int{-1}})
+ d.captureIdx = len(d.captures) - 1
}
-func (d *decoder) handleValue(value *unstable.Node, v reflect.Value) error {
- for v.Kind() == reflect.Ptr {
- v = initAndDereferencePointer(v)
+// resolveCapture walks back to the target of a capture and delivers the
+// accumulated raw bytes to its UnmarshalTOML implementation.
+func (d *decoder) resolveCapture(v reflect.Value, c *rawCapture, idx int, indexed bool) (reflect.Value, error) {
+ if v.Kind() == reflect.Ptr {
+ if v.Type().Implements(unmarshalerType) && idx == len(c.names) {
+ u, _ := unmarshalerOf(v)
+ return v, u.UnmarshalTOML(c.buf)
+ }
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ nv, err := d.resolveCapture(v.Elem(), c, idx, indexed)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ v.Elem().Set(nv)
+ }
+ return v, nil
}
- if d.unmarshalerInterface {
- if v.CanAddr() && v.Addr().CanInterface() {
- if outi, ok := v.Addr().Interface().(unstable.Unmarshaler); ok {
- // Pass raw bytes from the original document
- return outi.UnmarshalTOML(d.p.Raw(value.Raw))
- }
+ if !indexed && (v.Kind() == reflect.Slice || v.Kind() == reflect.Array) && c.indexes[idx] >= 0 {
+ i := c.indexes[idx]
+ if i >= v.Len() {
+ return reflect.Value{}, errors.New("toml: internal error: capture index out of range")
+ }
+ elem := v.Index(i)
+ nv, err := d.resolveCapture(elem, c, idx, true)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ elem.Set(nv)
}
+ return v, nil
}
- // Only try TextUnmarshaler for scalar types. For Array and InlineTable,
- // fall through to struct/map unmarshaling to allow flexible unmarshaling
- // where a type can implement UnmarshalText for string values but still
- // be populated field-by-field from a table. See issue #974.
- if value.Kind != unstable.Array && value.Kind != unstable.InlineTable {
- ok, err := d.tryTextUnmarshaler(value, v)
- if ok || err != nil {
- return err
+ if idx == len(c.names) {
+ u, ok := unmarshalerOf(v)
+ if !ok {
+ return reflect.Value{}, errors.New("toml: internal error: capture target does not implement UnmarshalTOML")
}
+ return v, u.UnmarshalTOML(c.buf)
}
- switch value.Kind {
- case unstable.String:
- return d.unmarshalString(value, v)
- case unstable.Integer:
- return d.unmarshalInteger(value, v)
- case unstable.Float:
- return d.unmarshalFloat(value, v)
- case unstable.Bool:
- return d.unmarshalBool(value, v)
- case unstable.DateTime:
- return d.unmarshalDateTime(value, v)
- case unstable.LocalDate:
- return d.unmarshalLocalDate(value, v)
- case unstable.LocalTime:
- return d.unmarshalLocalTime(value, v)
- case unstable.LocalDateTime:
- return d.unmarshalLocalDateTime(value, v)
- case unstable.InlineTable:
- return d.unmarshalInlineTable(value, v)
- case unstable.Array:
- return d.unmarshalArray(value, v)
- default:
- panic(fmt.Errorf("handleValue not implemented for %s", value.Kind))
- }
-}
+ name := c.names[idx]
-func (d *decoder) unmarshalArray(array *unstable.Node, v reflect.Value) error {
switch v.Kind() {
- case reflect.Slice:
+ case reflect.Struct:
+ plan := planForType(v.Type())
+ f, found := plan.lookup(name)
+ if !found {
+ return v, nil
+ }
+ fv, err := fieldByIndexAlloc(v, f.index)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ nv, err := d.resolveCapture(fv, c, idx+1, false)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() && fv.CanSet() {
+ fv.Set(nv)
+ }
+ return v, nil
+ case reflect.Map:
+ key, err := makeMapKey(v.Type().Key(), name)
+ if err != nil {
+ return reflect.Value{}, err
+ }
if v.IsNil() {
- v.Set(reflect.MakeSlice(v.Type(), 0, 16))
- } else {
- v.SetLen(0)
+ v = reflect.MakeMap(v.Type())
}
- case reflect.Array:
- // arrays are always initialized
- case reflect.Interface:
- elem := v.Elem()
- if !elem.IsValid() {
- elem = reflect.New(sliceInterfaceType).Elem()
- elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16))
- } else if elem.Kind() == reflect.Slice {
- if elem.Type() != sliceInterfaceType {
- elem = reflect.New(sliceInterfaceType).Elem()
- elem.Set(reflect.MakeSlice(sliceInterfaceType, 0, 16))
- } else if !elem.CanSet() {
- nelem := reflect.New(sliceInterfaceType).Elem()
- nelem.Set(reflect.MakeSlice(sliceInterfaceType, elem.Len(), elem.Cap()))
- reflect.Copy(nelem, elem)
- elem = nelem
- }
+ elem := reflect.New(v.Type().Elem()).Elem()
+ if existing := v.MapIndex(key); existing.IsValid() {
+ elem.Set(existing)
}
- err := d.unmarshalArray(array, elem)
+ nv, err := d.resolveCapture(elem, c, idx+1, false)
if err != nil {
- return err
+ return reflect.Value{}, err
}
- v.Set(elem)
- return nil
+ if nv.IsValid() {
+ v.SetMapIndex(key, nv)
+ }
+ return v, nil
+ case reflect.Interface:
+ elem := elemOrNewMap(v)
+ nv, err := d.resolveCapture(elem, c, idx, indexed)
+ if err != nil || !nv.IsValid() {
+ return reflect.Value{}, err
+ }
+ return nv, nil
default:
- // TODO: use newDecodeError, but first the parser needs to fill
- // array.Data.
- return d.typeMismatchError("array", v.Type())
+ return reflect.Value{}, fmt.Errorf("toml: internal error: cannot resolve capture target through %s", v.Kind())
}
+}
- elemType := v.Type().Elem()
-
- it := array.Children()
- idx := 0
- for it.Next() {
- n := it.Node()
+// captureKeyValue appends the raw bytes of a key-value expression to the
+// current capture.
+func (d *decoder) captureKeyValue(expr *unstable.Node) {
+ c := &d.captures[d.captureIdx]
+ c.buf = append(c.buf, d.p.Raw(expr.Raw)...)
+ c.buf = append(c.buf, '\n')
+}
- // TODO: optimize
- if v.Kind() == reflect.Slice {
- elem := reflect.New(elemType).Elem()
+// hasUnmarshaler reports whether v can provide an unstable.Unmarshaler,
+// without allocating anything.
+func hasUnmarshaler(v reflect.Value) bool {
+ t := v.Type()
+ return t.Implements(unmarshalerType) || (v.CanAddr() && reflect.PtrTo(t).Implements(unmarshalerType))
+}
- err := d.handleValue(n, elem)
+// makeMapKey converts a TOML key into a value usable as the given map key
+// type.
+func makeMapKey(kt reflect.Type, name string) (reflect.Value, error) {
+ switch kt.Kind() {
+ case reflect.String:
+ return reflect.ValueOf(name).Convert(kt), nil
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ i, err := strconv.ParseInt(name, 10, 64)
+ if err != nil {
+ return reflect.Value{}, fmt.Errorf("toml: cannot parse map key %q as %s: %w", name, kt, err)
+ }
+ k := reflect.New(kt).Elem()
+ if k.OverflowInt(i) {
+ return reflect.Value{}, fmt.Errorf("toml: map key %q overflows %s", name, kt)
+ }
+ k.SetInt(i)
+ return k, nil
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ u, err := strconv.ParseUint(name, 10, 64)
+ if err != nil {
+ return reflect.Value{}, fmt.Errorf("toml: cannot parse map key %q as %s: %w", name, kt, err)
+ }
+ k := reflect.New(kt).Elem()
+ if k.OverflowUint(u) {
+ return reflect.Value{}, fmt.Errorf("toml: map key %q overflows %s", name, kt)
+ }
+ k.SetUint(u)
+ return k, nil
+ case reflect.Float32, reflect.Float64:
+ f, err := strconv.ParseFloat(name, 64)
+ if err != nil {
+ return reflect.Value{}, fmt.Errorf("toml: cannot parse map key %q as %s: %w", name, kt, err)
+ }
+ k := reflect.New(kt).Elem()
+ k.SetFloat(f)
+ return k, nil
+ case reflect.Ptr:
+ if kt.Implements(textUnmarshalerType) {
+ k := reflect.New(kt.Elem())
+ err := k.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(name))
if err != nil {
- return err
+ return reflect.Value{}, fmt.Errorf("toml: error unmarshaling map key %q: %w", name, err)
}
-
- v.Set(reflect.Append(v, elem))
- } else { // array
- if idx >= v.Len() {
- return nil
- }
- elem := v.Index(idx)
- err := d.handleValue(n, elem)
+ return k, nil
+ }
+ default:
+ if reflect.PtrTo(kt).Implements(textUnmarshalerType) {
+ k := reflect.New(kt)
+ err := k.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(name))
if err != nil {
- return err
+ return reflect.Value{}, fmt.Errorf("toml: error unmarshaling map key %q: %w", name, err)
}
- idx++
+ return k.Elem(), nil
+ }
+ }
+ return reflect.Value{}, fmt.Errorf("toml: cannot decode a key into a map with key type %s", kt)
+}
+
+// elemOrNewMap unwraps an interface value to descend into it. Contents that
+// can hold a table (generic maps and slices) are kept; anything else is
+// replaced by a fresh map[string]interface{}. Maps and slices are reference
+// types: they are returned directly, not copied.
+func elemOrNewMap(v reflect.Value) reflect.Value {
+ if !v.IsNil() {
+ concrete := v.Elem()
+ t := concrete.Type()
+ if t == mapStringInterfaceType || t == sliceInterfaceType {
+ return concrete
+ }
+ }
+ return reflect.ValueOf(map[string]interface{}{})
+}
+
+// handleKeyValueExpression stores the value of a top-level key-value
+// expression, relative to the current table.
+func (d *decoder) handleKeyValueExpression(expr *unstable.Node, root reflect.Value) error {
+ d.path = d.path[:0]
+
+ target := root
+ useCache := d.tableTargetValid && len(d.tableKey) > 0
+ if useCache {
+ target = d.tableTarget
+ } else {
+ for _, name := range d.tableKey {
+ d.path = append(d.path, pathPart{name: name})
}
}
+ it := expr.Key()
+ for it.Next() {
+ d.path = append(d.path, pathPart{node: it.Node()})
+ }
+
+ nv, err := d.descend(target, d.path, 0, expr, expr.Value())
+ if err != nil {
+ return d.contextualizeError(err, useCache)
+ }
+ if !nv.IsValid() {
+ return nil
+ }
+ if useCache {
+ // The target may have been replaced (e.g. a nil map allocated):
+ // re-link it into its parent.
+ if nv.Kind() == reflect.Map && nv.Pointer() != d.tableTarget.Pointer() {
+ d.storeSlot(&d.tableParentSlot, nv)
+ d.tableTarget = nv
+ }
+ } else {
+ if root.CanSet() {
+ root.Set(nv)
+ }
+ }
return nil
}
-func (d *decoder) unmarshalInlineTable(itable *unstable.Node, v reflect.Value) error {
- // Make sure v is an initialized object.
+// descend walks the given key path into v, and assigns the value at the
+// end. It returns the value to store back at this level. An invalid value
+// means nothing should be stored (e.g. unknown field).
+func (d *decoder) descend(v reflect.Value, path []pathPart, idx int, expr *unstable.Node, value *unstable.Node) (reflect.Value, error) {
+ if idx == len(path) {
+ return d.assignValue(v, expr, value)
+ }
+
+ if v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ nv, err := d.descend(v.Elem(), path, idx, expr, value)
+ if err != nil || !nv.IsValid() {
+ return reflect.Value{}, err
+ }
+ v.Elem().Set(nv)
+ return v, nil
+ }
+
+ // A target implementing the unmarshaler interface consumes the value,
+ // whatever the remaining parts of the key are.
+ if d.unmarshalerInterface {
+ if u, ok := unmarshalerOf(v); ok {
+ return v, u.UnmarshalTOML(d.rawValue(expr, value))
+ }
+ }
+
+ part := path[idx]
+
switch v.Kind() {
case reflect.Map:
+ // Native fast path for the most common generic target: walk the
+ // remaining dotted-key path with plain Go map operations and decode
+ // the value directly, skipping the reflect.Value round-trips
+ // (stringMapKey, MapIndex, New, SetMapIndex) entirely.
+ if !d.unmarshalerInterface && v.Type() == mapStringInterfaceType {
+ return d.descendStrMap(v, path, idx, value)
+ }
+ var name string
+ var key reflect.Value
+ var err error
+ fastKey := v.Type().Key() == stringType
+ if fastKey {
+ name = d.partString(&part)
+ key = d.stringMapKey(name)
+ } else {
+ key, err = makeMapKey(v.Type().Key(), d.partString(&part))
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ }
if v.IsNil() {
- v.Set(reflect.MakeMap(v.Type()))
+ v = reflect.MakeMap(v.Type())
+ }
+ elemType := v.Type().Elem()
+ existing := v.MapIndex(key)
+ var elem reflect.Value
+ switch {
+ case existing.IsValid():
+ elem = reflect.New(elemType).Elem()
+ elem.Set(existing)
+ case idx+1 == len(path) && elemType.Kind() == reflect.Interface:
+ // Fast path: a fresh interface element does not need to be
+ // materialized, the assigned value is stored directly.
+ elem = reflect.Zero(elemType)
+ default:
+ elem = reflect.New(elemType).Elem()
+ }
+ nv, err := d.descend(elem, path, idx+1, expr, value)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ if fastKey {
+ // The recursion may have overwritten the key buffer.
+ key = d.stringMapKey(name)
+ }
+ v.SetMapIndex(key, nv)
}
+ return v, nil
case reflect.Struct:
- // structs are always initialized.
+ plan := planForType(v.Type())
+ f, found := plan.lookupBytes(part.bytes())
+ if !found {
+ if part.node != nil {
+ d.strict.MissingField(expr)
+ }
+ return v, nil
+ }
+ fv, err := fieldByIndexAlloc(v, f.index)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ var nv reflect.Value
+ if idx+1 == len(path) {
+ // Leaf field: assign directly. descend's first action for a
+ // fully-consumed path is exactly this call, so skipping the extra
+ // frame is equivalent and avoids a call per scalar field.
+ nv, err = d.assignValue(fv, expr, value)
+ } else {
+ nv, err = d.descend(fv, path, idx+1, expr, value)
+ }
+ if err != nil {
+ var mm *typeMismatchError
+ if errors.As(err, &mm) {
+ err = &unstable.ParserError{
+ Highlight: mm.highlight,
+ Message: fmt.Sprintf("cannot decode TOML %s into struct field %s.%s of type %s",
+ mm.toml, v.Type(), f.fieldName, mm.target),
+ }
+ }
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() && fv.CanSet() {
+ fv.Set(nv)
+ }
+ return v, nil
case reflect.Interface:
- elem := v.Elem()
- if !elem.IsValid() {
- elem = makeMapStringInterface()
- v.Set(elem)
+ elem := elemOrNewMap(v)
+ nv, err := d.descend(elem, path, idx, expr, value)
+ if err != nil || !nv.IsValid() {
+ return reflect.Value{}, err
+ }
+ return nv, nil
+ case reflect.Slice:
+ if v.Len() == 0 {
+ if v.IsNil() {
+ v = reflect.MakeSlice(v.Type(), 0, 4)
+ }
+ v = reflect.Append(v, reflect.New(v.Type().Elem()).Elem())
+ }
+ elem := v.Index(v.Len() - 1)
+ nv, err := d.descend(elem, path, idx, expr, value)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ elem.Set(nv)
+ }
+ return v, nil
+ case reflect.Array:
+ names := make([]string, idx)
+ for i := range names {
+ names[i] = path[i].str()
+ }
+ cnt := d.arrayCount(d.joinPath(names))
+ if cnt == 0 {
+ cnt = 1
}
- return d.unmarshalInlineTable(itable, elem)
+ elemIdx := cnt - 1
+ if elemIdx >= v.Len() {
+ return reflect.Value{}, unstable.NewParserError(keyHighlight(d.p.Data(), part.node),
+ "cannot reach element %d of array of size %d", elemIdx, v.Len())
+ }
+ elem := v.Index(elemIdx)
+ nv, err := d.descend(elem, path, idx, expr, value)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ elem.Set(nv)
+ }
+ return v, nil
default:
- return unstable.NewParserError(d.p.Raw(itable.Raw), "cannot store inline table in Go type %s", v.Kind())
+ return reflect.Value{}, d.typeMismatchError("table", v.Type(), keyHighlight(d.p.Data(), part.node))
}
+}
- it := itable.Children()
- for it.Next() {
- n := it.Node()
+// descendStrMap assigns into a native map[string]interface{} target, following
+// the remaining dotted-key parts with plain Go map operations and decoding the
+// value with decodeAny. It returns the map to store back at this level: a new
+// map when v was nil, otherwise v unchanged, since maps are reference types and
+// are mutated in place.
+func (d *decoder) descendStrMap(v reflect.Value, path []pathPart, idx int, value *unstable.Node) (reflect.Value, error) {
+ var m map[string]interface{}
+ if v.IsNil() {
+ m = make(map[string]interface{})
+ v = reflect.ValueOf(m)
+ } else {
+ m = v.Interface().(map[string]interface{})
+ }
- x, err := d.handleKeyValue(n, v)
- if err != nil {
- return err
- }
- if x.IsValid() {
- v = x
+ // Walk intermediate parts, creating or reusing nested generic maps. A
+ // non-map value at an intermediate key can only occur in a document the
+ // seen-tracker has already rejected; replacing it mirrors the reflect
+ // path (elemOrNewMap).
+ for ; idx < len(path)-1; idx++ {
+ name := d.partString(&path[idx])
+ child, _ := m[name].(map[string]interface{})
+ if child == nil {
+ child = make(map[string]interface{})
+ m[name] = child
}
+ m = child
}
- return nil
-}
-
-func (d *decoder) unmarshalDateTime(value *unstable.Node, v reflect.Value) error {
- dt, err := parseDateTime(value.Data)
+ av, err := d.decodeAny(value)
if err != nil {
- return err
+ return reflect.Value{}, err
}
+ m[d.partString(&path[idx])] = av
+ return v, nil
+}
- if v.Kind() != reflect.Interface && v.Type() != timeType {
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("datetime", v.Type()))
+// keyHighlight returns a highlight for the given key part node, falling back
+// to the start of the document.
+func keyHighlight(doc []byte, node *unstable.Node) []byte {
+ if node == nil {
+ return doc[0:0]
}
- v.Set(reflect.ValueOf(dt))
- return nil
+ return doc[node.Raw.Offset : node.Raw.Offset+node.Raw.Length]
}
-func (d *decoder) unmarshalLocalDate(value *unstable.Node, v reflect.Value) error {
- ld, err := parseLocalDate(value.Data)
- if err != nil {
- return err
+// rawValue returns the raw bytes of the value of a key-value expression.
+func (d *decoder) rawValue(expr *unstable.Node, value *unstable.Node) []byte {
+ if value.Kind != unstable.InlineTable && value.Kind != unstable.Array {
+ return d.p.Raw(value.Raw)
}
-
- if v.Kind() != reflect.Interface && v.Type() != timeType {
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("local date", v.Type()))
+ if expr == nil || expr.Kind != unstable.KeyValue {
+ // Inline container nested in another container: best effort.
+ return d.p.Raw(value.Raw)
}
- if v.Type() == timeType {
- v.Set(reflect.ValueOf(ld.AsTime(time.Local)))
- return nil
+ // Reconstruct the span of the value: it starts after the equal sign
+ // following the last part of the key, and stops at the end of the
+ // expression.
+ var last unstable.Range
+ it := expr.Key()
+ for it.Next() {
+ last = it.Node().Raw
}
- v.Set(reflect.ValueOf(ld))
- return nil
+ doc := d.p.Data()
+ i := int(last.Offset + last.Length)
+ for i < len(doc) && (doc[i] == ' ' || doc[i] == '\t') {
+ i++
+ }
+ i++ // equal sign
+ for i < len(doc) && (doc[i] == ' ' || doc[i] == '\t') {
+ i++
+ }
+ end := int(expr.Raw.Offset + expr.Raw.Length)
+ return doc[i:end]
}
-func (d *decoder) unmarshalLocalTime(value *unstable.Node, v reflect.Value) error {
- lt, rest, err := parseLocalTime(value.Data)
- if err != nil {
- return err
+// unmarshalerOf returns the unstable.Unmarshaler implementation of v, if
+// any. It allocates intermediate pointers as needed.
+func unmarshalerOf(v reflect.Value) (unstable.Unmarshaler, bool) {
+ t := v.Type()
+ if t.Implements(unmarshalerType) {
+ if v.Kind() == reflect.Ptr && v.IsNil() {
+ v.Set(reflect.New(t.Elem()))
+ }
+ return v.Interface().(unstable.Unmarshaler), true
}
-
- if len(rest) > 0 {
- return unstable.NewParserError(rest, "extra characters at the end of a local time")
+ if v.CanAddr() && reflect.PtrTo(t).Implements(unmarshalerType) {
+ return v.Addr().Interface().(unstable.Unmarshaler), true
}
+ return nil, false
+}
- if v.Kind() != reflect.Interface {
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("local time", v.Type()))
+var unmarshalerType = reflect.TypeOf(new(unstable.Unmarshaler)).Elem()
+
+// assignValue stores the TOML value carried by the node into v.
+func (d *decoder) assignValue(v reflect.Value, expr *unstable.Node, value *unstable.Node) (reflect.Value, error) {
+ if v.Kind() == reflect.Ptr {
+ if d.unmarshalerInterface {
+ if u, ok := unmarshalerOf(v); ok {
+ return v, u.UnmarshalTOML(d.rawValue(expr, value))
+ }
+ }
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ nv, err := d.assignValue(v.Elem(), expr, value)
+ if err != nil || !nv.IsValid() {
+ return reflect.Value{}, err
+ }
+ v.Elem().Set(nv)
+ return v, nil
}
- v.Set(reflect.ValueOf(lt))
- return nil
-}
-func (d *decoder) unmarshalLocalDateTime(value *unstable.Node, v reflect.Value) error {
- ldt, rest, err := parseLocalDateTime(value.Data)
- if err != nil {
- return err
+ if d.unmarshalerInterface {
+ if u, ok := unmarshalerOf(v); ok {
+ return v, u.UnmarshalTOML(d.rawValue(expr, value))
+ }
}
- if len(rest) > 0 {
- return unstable.NewParserError(rest, "extra characters at the end of a local date time")
+ switch value.Kind {
+ case unstable.String:
+ return d.assignString(v, value)
+ case unstable.Integer:
+ return d.assignInteger(v, value)
+ case unstable.Float:
+ return d.assignFloat(v, value)
+ case unstable.Bool:
+ return d.assignBool(v, value)
+ case unstable.DateTime:
+ return d.assignDateTime(v, value)
+ case unstable.LocalDateTime:
+ return d.assignLocalDateTime(v, value)
+ case unstable.LocalDate:
+ return d.assignLocalDate(v, value)
+ case unstable.LocalTime:
+ return d.assignLocalTime(v, value)
+ case unstable.Array:
+ return d.assignArray(v, expr, value)
+ case unstable.InlineTable:
+ return d.assignInlineTable(v, expr, value)
+ default:
+ return reflect.Value{}, unstable.NewParserError(value.Data, "unsupported value kind %s", value.Kind)
}
+}
- if v.Kind() != reflect.Interface && v.Type() != timeType {
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("local datetime", v.Type()))
+func (d *decoder) assignString(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ switch v.Kind() {
+ case reflect.String:
+ v.SetString(string(value.Data))
+ return v, nil
+ case reflect.Interface:
+ return boxInto(v, reflect.ValueOf(string(value.Data)))
+ default:
}
- if v.Type() == timeType {
- v.Set(reflect.ValueOf(ldt.AsTime(time.Local)))
- return nil
+ if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) {
+ err := v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(value.Data)
+ if err != nil {
+ return reflect.Value{}, unstable.NewParserError(d.p.Raw(value.Raw), "%s", err)
+ }
+ return v, nil
}
- v.Set(reflect.ValueOf(ldt))
- return nil
+ return reflect.Value{}, d.typeMismatchError("string", v.Type(), d.p.Raw(value.Raw))
}
-func (d *decoder) unmarshalBool(value *unstable.Node, v reflect.Value) error {
- b := value.Data[0] == 't'
+func (d *decoder) assignInteger(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ // Integer values targeting a float field are parsed as floats: they can
+ // represent (approximately) numbers beyond the int64 range.
+ if k := v.Kind(); k == reflect.Float32 || k == reflect.Float64 {
+ return d.assignFloat(v, value)
+ }
+
+ i, err := parseInteger(value.Data)
+ if err != nil {
+ return reflect.Value{}, err
+ }
switch v.Kind() {
- case reflect.Bool:
- v.SetBool(b)
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ if v.OverflowInt(i) {
+ return reflect.Value{}, unstable.NewParserError(value.Data, "integer value %d cannot be stored in %s", i, v.Type())
+ }
+ v.SetInt(i)
+ return v, nil
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ if i < 0 {
+ return reflect.Value{}, unstable.NewParserError(value.Data, "negative integer value %d cannot be stored in %s", i, v.Type())
+ }
+ if v.OverflowUint(uint64(i)) {
+ return reflect.Value{}, unstable.NewParserError(value.Data, "integer value %d cannot be stored in %s", i, v.Type())
+ }
+ v.SetUint(uint64(i))
+ return v, nil
case reflect.Interface:
- v.Set(reflect.ValueOf(b))
+ return boxInto(v, reflect.ValueOf(i))
default:
- return unstable.NewParserError(value.Data, "cannot assign boolean to a %t", b)
}
+ if ok, err := tryTextUnmarshaler(v, value.Data); ok {
+ return v, err
+ }
+ return reflect.Value{}, d.typeMismatchError("integer", v.Type(), d.p.Raw(value.Raw))
+}
- return nil
+// tryTextUnmarshaler attempts to deliver the raw text of a value to a target
+// implementing encoding.TextUnmarshaler.
+func tryTextUnmarshaler(v reflect.Value, text []byte) (bool, error) {
+ if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) {
+ return true, v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(text)
+ }
+ return false, nil
}
-func (d *decoder) unmarshalFloat(value *unstable.Node, v reflect.Value) error {
+func (d *decoder) assignFloat(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
f, err := parseFloat(value.Data)
if err != nil {
- return err
+ return reflect.Value{}, err
}
switch v.Kind() {
case reflect.Float64:
v.SetFloat(f)
+ return v, nil
case reflect.Float32:
- if f > math.MaxFloat32 {
- return unstable.NewParserError(value.Data, "number %f does not fit in a float32", f)
+ if !math.IsInf(f, 0) && math.Abs(f) > math.MaxFloat32 {
+ return reflect.Value{}, unstable.NewParserError(value.Data, "float value %f cannot be stored in float32", f)
}
v.SetFloat(f)
+ return v, nil
case reflect.Interface:
- v.Set(reflect.ValueOf(f))
+ return boxInto(v, reflect.ValueOf(f))
default:
- return unstable.NewParserError(value.Data, "float cannot be assigned to %s", v.Kind())
}
-
- return nil
+ if ok, err := tryTextUnmarshaler(v, value.Data); ok {
+ return v, err
+ }
+ return reflect.Value{}, d.typeMismatchError("float", v.Type(), d.p.Raw(value.Raw))
}
-const (
- maxInt = int64(^uint(0) >> 1)
- minInt = -maxInt - 1
-)
-
-// Maximum value of uint for decoding. Currently the decoder parses the integer
-// into an int64. As a result, on architectures where uint is 64 bits, the
-// effective maximum uint we can decode is the maximum of int64. On
-// architectures where uint is 32 bits, the maximum value we can decode is
-// lower: the maximum of uint32. I didn't find a way to figure out this value at
-// compile time, so it is computed during initialization.
-var maxUint int64 = math.MaxInt64
+func (d *decoder) assignBool(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ b := value.Data[0] == 't'
-func init() { //nolint:gochecknoinits
- m := uint64(^uint(0))
- // #nosec G115
- if m < uint64(maxUint) {
- maxUint = int64(m)
+ switch v.Kind() {
+ case reflect.Bool:
+ v.SetBool(b)
+ return v, nil
+ case reflect.Interface:
+ return boxInto(v, reflect.ValueOf(b))
+ default:
}
-}
-
-func (d *decoder) unmarshalInteger(value *unstable.Node, v reflect.Value) error {
- kind := v.Kind()
- if kind == reflect.Float32 || kind == reflect.Float64 {
- return d.unmarshalFloat(value, v)
+ if ok, err := tryTextUnmarshaler(v, value.Data); ok {
+ return v, err
}
+ return reflect.Value{}, d.typeMismatchError("boolean", v.Type(), d.p.Raw(value.Raw))
+}
- i, err := parseInteger(value.Data)
+func (d *decoder) assignDateTime(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ t, err := parseDateTime(value.Data)
if err != nil {
- return err
+ return reflect.Value{}, err
}
- var r reflect.Value
-
- switch kind {
- case reflect.Int64:
- v.SetInt(i)
- return nil
- case reflect.Int32:
- if i < math.MinInt32 || i > math.MaxInt32 {
- return fmt.Errorf("toml: number %d does not fit in an int32", i)
- }
-
- r = reflect.ValueOf(int32(i))
- case reflect.Int16:
- if i < math.MinInt16 || i > math.MaxInt16 {
- return fmt.Errorf("toml: number %d does not fit in an int16", i)
- }
-
- r = reflect.ValueOf(int16(i))
- case reflect.Int8:
- if i < math.MinInt8 || i > math.MaxInt8 {
- return fmt.Errorf("toml: number %d does not fit in an int8", i)
- }
-
- r = reflect.ValueOf(int8(i))
- case reflect.Int:
- if i < minInt || i > maxInt {
- return fmt.Errorf("toml: number %d does not fit in an int", i)
- }
-
- r = reflect.ValueOf(int(i))
- case reflect.Uint64:
- if i < 0 {
- return fmt.Errorf("toml: negative number %d does not fit in an uint64", i)
- }
-
- r = reflect.ValueOf(uint64(i))
- case reflect.Uint32:
- if i < 0 || i > math.MaxUint32 {
- return fmt.Errorf("toml: negative number %d does not fit in an uint32", i)
- }
-
- r = reflect.ValueOf(uint32(i))
- case reflect.Uint16:
- if i < 0 || i > math.MaxUint16 {
- return fmt.Errorf("toml: negative number %d does not fit in an uint16", i)
- }
-
- r = reflect.ValueOf(uint16(i))
- case reflect.Uint8:
- if i < 0 || i > math.MaxUint8 {
- return fmt.Errorf("toml: negative number %d does not fit in an uint8", i)
- }
-
- r = reflect.ValueOf(uint8(i))
- case reflect.Uint:
- if i < 0 || i > maxUint {
- return fmt.Errorf("toml: negative number %d does not fit in an uint", i)
- }
-
- r = reflect.ValueOf(uint(i))
- case reflect.Interface:
- r = reflect.ValueOf(i)
- default:
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("integer", v.Type()))
+ if v.Type() == timeType {
+ setConcrete(v, t)
+ return v, nil
}
-
- if !r.Type().AssignableTo(v.Type()) {
- r = r.Convert(v.Type())
+ if v.Kind() == reflect.Interface {
+ return boxInto(v, reflect.ValueOf(t))
}
+ return reflect.Value{}, d.typeMismatchError("datetime", v.Type(), d.p.Raw(value.Raw))
+}
- v.Set(r)
-
- return nil
+// setConcrete assigns x to v, which must be a settable value of x's concrete
+// type. Writing through the address avoids the heap allocation that
+// v.Set(reflect.ValueOf(x)) incurs from boxing x into an interface. Settable
+// implies addressable: the decoder assigns to struct fields, slice elements,
+// and reflect.New-allocated temporaries (map elements are decoded into such
+// temporaries), all of which are addressable.
+func setConcrete[T any](v reflect.Value, x T) {
+ *(v.Addr().Interface().(*T)) = x
}
-func (d *decoder) unmarshalString(value *unstable.Node, v reflect.Value) error {
- switch v.Kind() {
- case reflect.String:
- v.SetString(string(value.Data))
- case reflect.Interface:
- v.Set(reflect.ValueOf(string(value.Data)))
- default:
- return unstable.NewParserError(d.p.Raw(value.Raw), "%s", d.typeMismatchString("string", v.Type()))
+func (d *decoder) assignLocalDateTime(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ dt, rest, err := parseLocalDateTime(value.Data)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if len(rest) > 0 {
+ return reflect.Value{}, unstable.NewParserError(rest, "extra characters at the end of a local date time")
}
- return nil
+ switch v.Type() {
+ case localDateTimeType:
+ setConcrete(v, dt)
+ return v, nil
+ case timeType:
+ setConcrete(v, dt.AsTime(time.Local))
+ return v, nil
+ }
+ if v.Kind() == reflect.Interface {
+ return boxInto(v, reflect.ValueOf(dt))
+ }
+ return reflect.Value{}, d.typeMismatchError("local datetime", v.Type(), d.p.Raw(value.Raw))
}
-func (d *decoder) handleKeyValue(expr *unstable.Node, v reflect.Value) (reflect.Value, error) {
- d.strict.EnterKeyValue(expr)
-
- v, err := d.handleKeyValueInner(expr.Key(), expr.Value(), v)
- if d.skipUntilTable {
- d.strict.MissingField(expr)
- d.skipUntilTable = false
+func (d *decoder) assignLocalDate(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ date, err := parseLocalDate(value.Data)
+ if err != nil {
+ return reflect.Value{}, err
}
- d.strict.ExitKeyValue(expr)
-
- return v, err
-}
-
-func (d *decoder) handleKeyValueInner(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) {
- if key.Next() {
- // Still scoping the key
- return d.handleKeyValuePart(key, value, v)
+ switch v.Type() {
+ case localDateType:
+ setConcrete(v, date)
+ return v, nil
+ case timeType:
+ setConcrete(v, date.AsTime(time.Local))
+ return v, nil
+ }
+ if v.Kind() == reflect.Interface {
+ return boxInto(v, reflect.ValueOf(date))
}
- // Done scoping the key.
- // v is whatever Go value we need to fill.
- return reflect.Value{}, d.handleValue(value, v)
+ return reflect.Value{}, d.typeMismatchError("local date", v.Type(), d.p.Raw(value.Raw))
}
-func (d *decoder) keyFromData(keyType reflect.Type, data []byte) (reflect.Value, error) {
- switch {
- case stringType.AssignableTo(keyType):
- return reflect.ValueOf(string(data)), nil
+func (d *decoder) assignLocalTime(v reflect.Value, value *unstable.Node) (reflect.Value, error) {
+ t, rest, err := parseLocalTime(value.Data)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if len(rest) > 0 {
+ return reflect.Value{}, unstable.NewParserError(rest, "extra characters at the end of a local time")
+ }
- case stringType.ConvertibleTo(keyType):
- return reflect.ValueOf(string(data)).Convert(keyType), nil
+ switch v.Type() {
+ case localTimeType:
+ setConcrete(v, t)
+ return v, nil
+ case timeType:
+ setConcrete(v, time.Date(0, 1, 1, t.Hour, t.Minute, t.Second, t.Nanosecond, time.Local))
+ return v, nil
+ }
+ if v.Kind() == reflect.Interface {
+ return boxInto(v, reflect.ValueOf(t))
+ }
+ return reflect.Value{}, d.typeMismatchError("local time", v.Type(), d.p.Raw(value.Raw))
+}
- case keyType.Implements(textUnmarshalerType):
- mk := reflect.New(keyType.Elem())
- if err := mk.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error unmarshalling key type %s from text: %w", stringType, err)
+func (d *decoder) assignArray(v reflect.Value, expr *unstable.Node, value *unstable.Node) (reflect.Value, error) {
+ // Count the elements to allocate the target in one go.
+ count := 0
+ cit := value.Children()
+ for cit.Next() {
+ if cit.Node().Kind != unstable.Comment {
+ count++
}
- return mk, nil
+ }
- case reflect.PointerTo(keyType).Implements(textUnmarshalerType):
- mk := reflect.New(keyType)
- if err := mk.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error unmarshalling key type %s from text: %w", stringType, err)
+ switch v.Kind() {
+ case reflect.Slice:
+ // Allocate the backing array once at its final length and assign each
+ // element in place. This avoids a reflect.New allocation per element
+ // and the repeated growth checks of reflect.Append.
+ slice := reflect.MakeSlice(v.Type(), count, count)
+ i := 0
+ it := value.Children()
+ for it.Next() {
+ n := it.Node()
+ if n.Kind == unstable.Comment {
+ continue
+ }
+ elem := slice.Index(i)
+ nv, err := d.assignValue(elem, nil, n)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ if nv.IsValid() {
+ elem.Set(nv)
+ }
+ i++
+ }
+ return slice, nil
+ case reflect.Array:
+ it := value.Children()
+ i := 0
+ for it.Next() {
+ n := it.Node()
+ if n.Kind == unstable.Comment {
+ continue
+ }
+ if i >= v.Len() {
+ // Extra elements are dropped when the target array is too
+ // small.
+ break
+ }
+ elem := v.Index(i)
+ nv, err := d.assignValue(elem, nil, n)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ elem.Set(nv)
+ i++
+ }
+ return v, nil
+ case reflect.Interface:
+ // Build the []interface{} natively: each element is decoded straight
+ // into a Go value with no intermediate addressable reflect.Value and
+ // no reflect round-trip, and nested arrays recurse the same way.
+ slice := make([]interface{}, 0, count)
+ it := value.Children()
+ for it.Next() {
+ n := it.Node()
+ if n.Kind == unstable.Comment {
+ continue
+ }
+ ev, err := d.decodeAny(n)
+ if err != nil {
+ return reflect.Value{}, err
+ }
+ slice = append(slice, ev)
}
- return mk.Elem(), nil
+ return boxInto(v, reflect.ValueOf(slice))
+ default:
}
+ return reflect.Value{}, d.typeMismatchError("array", v.Type(), d.rawValue(expr, value))
+}
- switch keyType.Kind() {
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- key, err := strconv.ParseInt(string(data), 10, 64)
- if err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error parsing key of type %s from integer: %w", stringType, err)
+// decodeAny decodes a value node into a native Go value (the representation
+// used for interface{} targets), without going through reflect. Scalars and
+// arrays are handled directly; inline tables still defer to the reflect-based
+// path so that their dotted-key merge semantics remain identical.
+func (d *decoder) decodeAny(n *unstable.Node) (interface{}, error) {
+ switch n.Kind {
+ case unstable.String:
+ return string(n.Data), nil
+ case unstable.Integer:
+ i, err := parseInteger(n.Data)
+ return i, err
+ case unstable.Float:
+ f, err := parseFloat(n.Data)
+ return f, err
+ case unstable.Bool:
+ return n.Data[0] == 't', nil
+ case unstable.Array:
+ count := 0
+ cit := n.Children()
+ for cit.Next() {
+ if cit.Node().Kind != unstable.Comment {
+ count++
+ }
}
- return reflect.ValueOf(key).Convert(keyType), nil
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- key, err := strconv.ParseUint(string(data), 10, 64)
- if err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error parsing key of type %s from unsigned integer: %w", stringType, err)
+ slice := make([]interface{}, 0, count)
+ it := n.Children()
+ for it.Next() {
+ c := it.Node()
+ if c.Kind == unstable.Comment {
+ continue
+ }
+ ev, err := d.decodeAny(c)
+ if err != nil {
+ return nil, err
+ }
+ slice = append(slice, ev)
}
- return reflect.ValueOf(key).Convert(keyType), nil
-
- case reflect.Float32:
- key, err := strconv.ParseFloat(string(data), 32)
+ return slice, nil
+ case unstable.InlineTable:
+ // Build the map natively: navigate each (possibly dotted) key with
+ // plain Go map operations and decode each value with decodeAny. The
+ // seen-tracker has already rejected duplicate or conflicting keys, so
+ // intermediate parts can be created/merged without revalidation.
+ count := 0
+ cit := n.Children()
+ for cit.Next() {
+ count++
+ }
+ m := make(map[string]interface{}, count)
+ it := n.Children()
+ for it.Next() {
+ kv := it.Node()
+ if err := d.setAnyKey(m, kv.Key(), kv.Value()); err != nil {
+ return nil, err
+ }
+ }
+ return m, nil
+ case unstable.DateTime:
+ t, err := parseDateTime(n.Data)
+ return t, err
+ case unstable.LocalDateTime:
+ dt, rest, err := parseLocalDateTime(n.Data)
if err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error parsing key of type %s from float: %w", stringType, err)
+ return nil, err
}
- return reflect.ValueOf(float32(key)), nil
-
- case reflect.Float64:
- key, err := strconv.ParseFloat(string(data), 64)
+ if len(rest) > 0 {
+ return nil, unstable.NewParserError(rest, "extra characters at the end of a local date time")
+ }
+ return dt, nil
+ case unstable.LocalDate:
+ date, err := parseLocalDate(n.Data)
+ return date, err
+ case unstable.LocalTime:
+ t, rest, err := parseLocalTime(n.Data)
if err != nil {
- return reflect.Value{}, fmt.Errorf("toml: error parsing key of type %s from float: %w", stringType, err)
+ return nil, err
}
- return reflect.ValueOf(float64(key)), nil
-
+ if len(rest) > 0 {
+ return nil, unstable.NewParserError(rest, "extra characters at the end of a local time")
+ }
+ return t, nil
default:
- return reflect.Value{}, fmt.Errorf("toml: cannot convert map key of type %s to expected type %s", stringType, keyType)
+ return nil, unstable.NewParserError(n.Data, "unsupported value kind %s", n.Kind)
}
}
-func (d *decoder) handleKeyValuePart(key unstable.Iterator, value *unstable.Node, v reflect.Value) (reflect.Value, error) {
- // contains the replacement for v
- var rv reflect.Value
-
- // First, dispatch over v to make sure it is a valid object.
- // There is no guarantee over what it could be.
+func (d *decoder) assignInlineTable(v reflect.Value, expr *unstable.Node, value *unstable.Node) (reflect.Value, error) {
switch v.Kind() {
case reflect.Map:
- vt := v.Type()
-
- mk, err := d.keyFromData(vt.Key(), key.Node().Data)
+ // Inline tables are self-contained: they fully replace the target.
+ v = reflect.MakeMap(v.Type())
+ case reflect.Struct:
+ // fields are set in place
+ case reflect.Interface:
+ elem := reflect.ValueOf(map[string]interface{}{})
+ nv, err := d.assignInlineTable(elem, expr, value)
if err != nil {
return reflect.Value{}, err
}
+ return boxInto(v, nv)
+ default:
+ return reflect.Value{}, d.typeMismatchError("inline table", v.Type(), d.rawValue(expr, value))
+ }
- // If the map does not exist, create it.
- if v.IsNil() {
- v = reflect.MakeMap(vt)
- rv = v
- }
-
- mv := v.MapIndex(mk)
- set := false
- if !mv.IsValid() || key.IsLast() {
- set = true
- mv = reflect.New(v.Type().Elem()).Elem()
- }
-
- nv, err := d.handleKeyValueInner(key, value, mv)
+ it := value.Children()
+ for it.Next() {
+ kv := it.Node()
+ // Build the path from the key of this key-value. Keys of inline
+ // tables rarely have more than a few parts.
+ var pathBuf [4]pathPart
+ path := pathBuf[:0]
+ kit := kv.Key()
+ for kit.Next() {
+ path = append(path, pathPart{node: kit.Node()})
+ }
+ nv, err := d.descend(v, path, 0, kv, kv.Value())
if err != nil {
return reflect.Value{}, err
}
if nv.IsValid() {
- mv = nv
- set = true
- }
-
- if set {
- v.SetMapIndex(mk, mv)
- }
- case reflect.Struct:
- path, found := structFieldPath(v, string(key.Node().Data))
- if !found {
- // If no matching struct field is found but the target implements the
- // unstable.Unmarshaler interface (and it is enabled), delegate the
- // decoding of this value to the custom unmarshaler.
- if d.unmarshalerInterface {
- if v.CanAddr() && v.Addr().CanInterface() {
- if outi, ok := v.Addr().Interface().(unstable.Unmarshaler); ok {
- // Pass raw bytes from the original document
- return reflect.Value{}, outi.UnmarshalTOML(d.p.Raw(value.Raw))
- }
- }
- }
- // Otherwise, keep previous behavior and skip until the next table.
- d.skipUntilTable = true
- break
+ v = nv
}
+ }
+ return v, nil
+}
- if d.errorContext == nil {
- d.errorContext = new(errorContext)
- }
- t := v.Type()
- d.errorContext.Struct = t
- d.errorContext.Field = path
+// boxInto returns the value to store in place of the interface value v. The
+// caller stores the result in the slot v was found in, which performs the
+// interface conversion, so the concrete value can be returned as-is.
+func boxInto(v reflect.Value, c reflect.Value) (reflect.Value, error) {
+ if !c.Type().AssignableTo(v.Type()) {
+ return reflect.Value{}, fmt.Errorf("toml: cannot store %s into %s", c.Type(), v.Type())
+ }
+ return c, nil
+}
- f := fieldByIndex(v, path)
+var (
+ interfaceType = reflect.TypeOf(new(interface{})).Elem()
+ localDateType = reflect.TypeOf(LocalDate{})
+ localTimeType = reflect.TypeOf(LocalTime{})
+ localDateTimeType = reflect.TypeOf(LocalDateTime{})
+)
- if !f.CanAddr() {
- // If the field is not addressable, need to take a slower path and
- // make a copy of the struct itself to a new location.
- nvp := reflect.New(v.Type())
- nvp.Elem().Set(v)
- v = nvp.Elem()
- _, err := d.handleKeyValuePart(key, value, v)
- if err != nil {
- return reflect.Value{}, err
- }
- return nvp.Elem(), nil
- }
- x, err := d.handleKeyValueInner(key, value, f)
- if err != nil {
- return reflect.Value{}, err
- }
+// structPlan caches the mapping between TOML keys and the fields of a struct
+// type. byFold, keyed by the lowercased name, resolves any key on its own when
+// no two fields fold to the same name (the overwhelmingly common case, marked
+// by hasCollision == false): TOML keys are usually lowercase and never match
+// the exact (capitalized) Go field names, so the byName probe was always a
+// wasted lookup. byName (the exact names) is only consulted, first, when
+// fields do collide under folding, to preserve the exact-match-wins tiebreak.
+type structPlan struct {
+ byName map[string]structField
+ byFold map[string]structField
+ hasCollision bool
+}
- if x.IsValid() {
- f.Set(x)
- }
- d.errorContext.Struct = nil
- d.errorContext.Field = nil
- case reflect.Interface:
- v = v.Elem()
+type structField struct {
+ index []int
+ fieldName string
+}
- // Following encoding/json: decoding an object into an
- // interface{}, it needs to always hold a
- // map[string]interface{}. This is for the types to be
- // consistent whether a previous value was set or not.
- if !v.IsValid() || v.Type() != mapStringInterfaceType {
- v = makeMapStringInterface()
- }
+// foldBufSize bounds the stack buffer used to lowercase keys without
+// allocating. Keys longer than this (extremely rare) take the strings.ToLower
+// fallback.
+const foldBufSize = 68
- x, err := d.handleKeyValuePart(key, value, v)
- if err != nil {
- return reflect.Value{}, err
- }
- if x.IsValid() {
- v = x
- }
- rv = v
- case reflect.Ptr:
- elem := v.Elem()
- if !elem.IsValid() {
- ptr := reflect.New(v.Type().Elem())
- v.Set(ptr)
- rv = v
- elem = ptr.Elem()
+// lookup and lookupBytes keep the hot path to a single inlinable byFold lookup.
+// byFold is indexed by both the exact field/tag names and their lowercased
+// forms, so that lookup resolves the two common cases — a lowercase key, or a
+// key matching the field's own casing — directly. byName is consulted first
+// only for types whose fields collide under case-folding, to preserve the
+// exact-match-wins tiebreak. The buffer-fold for other casings lives
+// out-of-line so it does not bloat the hot path.
+func (p *structPlan) lookup(name string) (structField, bool) {
+ if p.hasCollision {
+ if f, ok := p.byName[name]; ok {
+ return f, true
}
+ }
+ if f, ok := p.byFold[name]; ok {
+ return f, true
+ }
+ return p.lookupFoldStr(name)
+}
- elem2, err := d.handleKeyValuePart(key, value, elem)
- if err != nil {
- return reflect.Value{}, err
+func (p *structPlan) lookupBytes(name []byte) (structField, bool) {
+ if p.hasCollision {
+ if f, ok := p.byName[string(name)]; ok { // does not allocate
+ return f, true
}
- if elem2.IsValid() {
- elem = elem2
- }
- v.Elem().Set(elem)
- default:
- return reflect.Value{}, fmt.Errorf("unhandled kv part: %s", v.Kind())
}
-
- return rv, nil
+ if f, ok := p.byFold[string(name)]; ok { // does not allocate
+ return f, true
+ }
+ return p.lookupFold(name)
}
-func initAndDereferencePointer(v reflect.Value) reflect.Value {
- var elem reflect.Value
- if v.IsNil() {
- ptr := reflect.New(v.Type().Elem())
- v.Set(ptr)
+// lookupFold resolves keys whose casing matches neither the exact nor the
+// lowercased index: it folds to lowercase (in a stack buffer for ASCII, so no
+// allocation) and retries; only non-ASCII or oversized keys hit strings.ToLower.
+func (p *structPlan) lookupFold(name []byte) (structField, bool) {
+ if len(name) <= foldBufSize {
+ // Fold into a stack buffer: len(name) <= cap(buf), so the append
+ // never reallocates and nothing escapes to the heap.
+ var buf [foldBufSize]byte
+ b := buf[:0]
+ ascii := true
+ for _, c := range name {
+ if c >= 0x80 {
+ ascii = false
+ break
+ }
+ if c >= 'A' && c <= 'Z' {
+ c += 'a' - 'A'
+ }
+ b = append(b, c)
+ }
+ if ascii {
+ f, ok := p.byFold[string(b)] // does not allocate
+ return f, ok
+ }
}
- elem = v.Elem()
- return elem
+ f, ok := p.byFold[strings.ToLower(string(name))]
+ return f, ok
}
-// Same as reflect.Value.FieldByIndex, but creates pointers if needed.
-func fieldByIndex(v reflect.Value, path []int) reflect.Value {
- for _, x := range path {
- v = v.Field(x)
-
- if v.Kind() == reflect.Ptr {
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
+func (p *structPlan) lookupFoldStr(name string) (structField, bool) {
+ if len(name) <= foldBufSize {
+ // Fold into a stack buffer: len(name) <= cap(buf), so the append
+ // never reallocates and nothing escapes to the heap.
+ var buf [foldBufSize]byte
+ b := buf[:0]
+ ascii := true
+ for i := 0; i < len(name); i++ {
+ c := name[i]
+ if c >= 0x80 {
+ ascii = false
+ break
+ }
+ if c >= 'A' && c <= 'Z' {
+ c += 'a' - 'A'
}
- v = v.Elem()
+ b = append(b, c)
+ }
+ if ascii {
+ f, ok := p.byFold[string(b)] // does not allocate
+ return f, ok
}
}
- return v
+ f, ok := p.byFold[strings.ToLower(name)]
+ return f, ok
}
-type fieldPathsMap = map[string][]int
-
-var globalFieldPathsCache atomic.Value // map[reflect.Type]fieldPathsMap
-
-func structFieldPath(v reflect.Value, name string) ([]int, bool) {
- t := v.Type()
-
- cache, _ := globalFieldPathsCache.Load().(map[reflect.Type]fieldPathsMap)
- fieldPaths, ok := cache[t]
-
- if !ok {
- fieldPaths = map[string][]int{}
-
- forEachField(t, nil, func(name string, path []int) {
- fieldPaths[name] = path
- // extra copy for the case-insensitive match
- fieldPaths[strings.ToLower(name)] = path
- })
+var structPlans sync.Map // reflect.Type -> *structPlan
- newCache := make(map[reflect.Type]fieldPathsMap, len(cache)+1)
- newCache[t] = fieldPaths
- for k, v := range cache {
- newCache[k] = v
- }
- globalFieldPathsCache.Store(newCache)
+func planForType(t reflect.Type) *structPlan {
+ if plan, ok := structPlans.Load(t); ok {
+ return plan.(*structPlan)
}
+ plan := buildPlan(t)
+ structPlans.Store(t, plan)
+ return plan
+}
- path, ok := fieldPaths[name]
- if !ok {
- path, ok = fieldPaths[strings.ToLower(name)]
+func buildPlan(t reflect.Type) *structPlan {
+ plan := &structPlan{
+ byName: map[string]structField{},
+ byFold: map[string]structField{},
}
- return path, ok
+ addFields(plan, t, nil, map[reflect.Type]bool{})
+ return plan
}
-func forEachField(t reflect.Type, path []int, do func(name string, path []int)) {
- n := t.NumField()
- for i := 0; i < n; i++ {
- f := t.Field(i)
+// addFields flattens the fields of t into the plan. visited holds the types
+// being flattened on the current branch: a struct type that embeds itself
+// (directly or through other types) is not descended into again, mirroring
+// buildEncPlan. Without this guard a recursive embedding would recurse
+// forever; the repeated fields are unreachable by flattening anyway.
+func addFields(plan *structPlan, t reflect.Type, prefix []int, visited map[reflect.Type]bool) {
+ if visited[t] {
+ return
+ }
+ visited[t] = true
+ defer delete(visited, t)
- if !f.Anonymous && f.PkgPath != "" {
- // only consider exported fields.
- continue
+ var embedded []reflect.StructField
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+ tag, tagged := f.Tag.Lookup("toml")
+ name := f.Name
+ explicitName := ""
+ if tagged {
+ // A tag of exactly "-" drops the field. "-," names it "-".
+ if tag == "-" {
+ continue
+ }
+ parts := strings.SplitN(tag, ",", 2)
+ explicitName = parts[0]
+ if explicitName != "" {
+ name = explicitName
+ }
}
-
- fieldPath := make([]int, 0, len(path)+1)
- fieldPath = append(fieldPath, path...)
- fieldPath = append(fieldPath, i)
- fieldPath = fieldPath[:len(fieldPath):len(fieldPath)]
-
- name := f.Tag.Get("toml")
- if name == "-" {
+ if f.Anonymous {
+ ft := f.Type
+ if ft.Kind() == reflect.Ptr {
+ ft = ft.Elem()
+ }
+ if ft.Kind() != reflect.Struct {
+ // Embedded non-struct fields are not decoded into.
+ continue
+ }
+ if explicitName == "" {
+ // Embedded structs without an explicit tag name are flattened,
+ // even when their type is unexported: only their own exported
+ // fields are reachable. A tag that only sets options (e.g.
+ // `,inline`) still flattens, matching encoding/json and the
+ // encoder's behavior.
+ embedded = append(embedded, f)
+ continue
+ }
+ // An embedded struct given an explicit tag name acts as a regular
+ // named field.
+ } else if f.PkgPath != "" {
+ // unexported
continue
}
-
- if i := strings.IndexByte(name, ','); i >= 0 {
- name = name[:i]
+ index := make([]int, 0, len(prefix)+1)
+ index = append(index, prefix...)
+ index = append(index, i)
+ sf := structField{index: index, fieldName: f.Name}
+ if _, ok := plan.byName[name]; !ok {
+ plan.byName[name] = sf
}
-
- if f.Anonymous && name == "" {
- t2 := f.Type
- if t2.Kind() == reflect.Ptr {
- t2 = t2.Elem()
- }
-
- if t2.Kind() == reflect.Struct {
- forEachField(t2, fieldPath, do)
+ lower := strings.ToLower(name)
+ if _, ok := plan.byFold[lower]; !ok {
+ plan.byFold[lower] = sf
+ } else {
+ // Two distinct fields fold to the same name: case-insensitive
+ // matching is ambiguous, so lookups must consult byName first to
+ // keep the exact-match-wins tiebreak deterministic.
+ plan.hasCollision = true
+ }
+ // Index the exact (cased) name as well, so a key written with the
+ // field's own casing resolves in a single byFold lookup. Only fields
+ // whose name is not already lowercase need this extra entry. Any name
+ // that would conflict here also collides under folding (handled
+ // above), so byName-first preserves the exact tiebreak in that case.
+ if name != lower {
+ if _, ok := plan.byFold[name]; !ok {
+ plan.byFold[name] = sf
}
- continue
}
-
- if name == "" {
- name = f.Name
+ }
+ // Embedded structs are flattened after the regular fields, so that
+ // shallower fields win.
+ for _, f := range embedded {
+ ft := f.Type
+ if ft.Kind() == reflect.Ptr {
+ ft = ft.Elem()
}
+ index := make([]int, 0, len(prefix)+1)
+ index = append(index, prefix...)
+ idx := f.Index[0]
+ index = append(index, idx)
+ addFields(plan, ft, index, visited)
+ }
+}
- do(name, fieldPath)
+// fieldByIndexAlloc returns the field of v at the given index path,
+// allocating intermediate embedded pointers as needed.
+func fieldByIndexAlloc(v reflect.Value, index []int) (reflect.Value, error) {
+ // Fast path for non-embedded fields, which have a single-element index:
+ // no intermediate pointer dereferencing is possible.
+ if len(index) == 1 {
+ return v.Field(index[0]), nil
+ }
+ for i, x := range index {
+ if i > 0 {
+ for v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ if !v.CanSet() {
+ // A nil embedded pointer of unexported type cannot be
+ // allocated: reflect forbids setting it. Match
+ // encoding/json and report it instead of panicking.
+ return reflect.Value{}, fmt.Errorf("toml: cannot set embedded pointer to unexported struct: %s", v.Type().Elem())
+ }
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ v = v.Elem()
+ }
+ }
+ v = v.Field(x)
}
+ return v, nil
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go b/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go
index 6b21592d6e66..2cf3bdb6d817 100644
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/ast.go
@@ -17,43 +17,30 @@ import (
// // do something with n
// }
type Iterator struct {
- nodes *[]Node
- idx int32
started bool
+ node *Node
}
-// Next moves the iterator forward and returns true if points to a
-// node, false otherwise.
+// Next moves the iterator forward and returns true if points to a node, false
+// otherwise.
func (c *Iterator) Next() bool {
- if c.nodes == nil {
- return false
- }
- nodes := *c.nodes
if !c.started {
c.started = true
- } else {
- idx := c.idx
- if idx >= 0 && int(idx) < len(nodes) {
- c.idx = nodes[idx].next
- }
+ } else if c.node.Valid() {
+ c.node = c.node.Next()
}
- return c.idx >= 0 && int(c.idx) < len(nodes)
+ return c.node.Valid()
}
// IsLast returns true if the current node of the iterator is the last
-// one. Subsequent calls to Next() will return false.
+// one. Subsequent calls to Next() will return false.
func (c *Iterator) IsLast() bool {
- return c.nodes == nil || c.idx < 0 || (*c.nodes)[c.idx].next < 0
+ return c.node.next == 0
}
// Node returns a pointer to the node pointed at by the iterator.
func (c *Iterator) Node() *Node {
- if c.nodes == nil || c.idx < 0 {
- return nil
- }
- n := &(*c.nodes)[c.idx]
- n.nodes = c.nodes
- return n
+ return c.node
}
// Node in a TOML expression AST.
@@ -64,8 +51,8 @@ func (c *Iterator) Node() *Node {
// - Array have one child per element in the array.
// - InlineTable have one child per key-value in the table (each of kind
// InlineTable).
-// - KeyValue have at least two children. The first one is the value. The rest
-// make a potentially dotted key.
+// - KeyValue have at least two children. The first one is the value. The
+// rest make a potentially dotted key.
// - Table and ArrayTable's children represent a dotted key (same as
// KeyValue, but without the first node being the value).
//
@@ -76,68 +63,56 @@ type Node struct {
Raw Range // Raw bytes from the input.
Data []byte // Node value (either allocated or referencing the input).
- // Absolute indices into the backing nodes slice. -1 means none.
- next int32
- child int32
-
- // Reference to the backing nodes slice for navigation.
- nodes *[]Node
-}
-
-// Range of bytes in the document.
-type Range struct {
- Offset uint32
- Length uint32
+ // References to other nodes, as 1-based indexes into the parser's arena.
+ // 0 means no node.
+ parser *Parser
+ next int32
+ child int32
}
// Next returns a pointer to the next node, or nil if there is no next node.
func (n *Node) Next() *Node {
- if n.next < 0 {
+ if n.next == 0 {
return nil
}
- next := &(*n.nodes)[n.next]
- next.nodes = n.nodes
- return next
+ return &n.parser.nodes[n.next-1]
}
// Child returns a pointer to the first child node of this node. Other children
-// can be accessed calling Next on the first child. Returns nil if this Node
-// has no child.
+// can be accessed calling Next on the first child. Returns nil if there is no
+// child node.
func (n *Node) Child() *Node {
- if n.child < 0 {
+ if n.child == 0 {
return nil
}
- child := &(*n.nodes)[n.child]
- child.nodes = n.nodes
- return child
+ return &n.parser.nodes[n.child-1]
}
// Valid returns true if the node's kind is set (not to Invalid).
func (n *Node) Valid() bool {
- return n != nil
+ return n != nil && n.Kind != Invalid
}
// Key returns the children nodes making the Key on a supported node. Panics
-// otherwise. They are guaranteed to be all be of the Kind Key. A simple key
+// otherwise. They are guaranteed to be all be of the Kind Key. A simple key
// would return just one element.
func (n *Node) Key() Iterator {
switch n.Kind {
case KeyValue:
- child := n.child
- if child < 0 {
+ value := n.Child()
+ if !value.Valid() {
panic(errors.New("KeyValue should have at least two children"))
}
- valueNode := &(*n.nodes)[child]
- return Iterator{nodes: n.nodes, idx: valueNode.next}
+ return Iterator{node: value.Next()}
case Table, ArrayTable:
- return Iterator{nodes: n.nodes, idx: n.child}
+ return Iterator{node: n.Child()}
default:
panic(fmt.Errorf("Key() is not supported on a %s", n.Kind))
}
}
// Value returns a pointer to the value node of a KeyValue.
-// Guaranteed to be non-nil. Panics if not called on a KeyValue node,
+// Guaranteed to be non-nil. Panics if not called on a KeyValue node,
// or if the Children are malformed.
func (n *Node) Value() *Node {
return n.Child()
@@ -145,5 +120,5 @@ func (n *Node) Value() *Node {
// Children returns an iterator over a node's children.
func (n *Node) Children() Iterator {
- return Iterator{nodes: n.nodes, idx: n.child}
+ return Iterator{node: n.Child()}
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/bridge.go b/vendor/github.com/pelletier/go-toml/v2/unstable/bridge.go
new file mode 100644
index 000000000000..5482bde0b127
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/bridge.go
@@ -0,0 +1,21 @@
+package unstable
+
+import "github.com/pelletier/go-toml/v2/internal/parserbridge"
+
+// Expose the non-AST scanners to the root toml package without committing to
+// them in the public API. See internal/parserbridge for the rationale.
+//
+//nolint:gochecknoinits // load-time wiring of an internal bridge (see internal/parserbridge)
+func init() {
+ parserbridge.ScanScalar = func(p any, b []byte) (kind int, raw, value, rest []byte, err error) {
+ k, raw, value, rest, err := p.(*Parser).scanScalar(b)
+ return int(k), raw, value, rest, err
+ }
+ parserbridge.ScanKey = func(p any, b []byte, dst [][]byte) (parts [][]byte, raw, rest []byte, err error) {
+ return p.(*Parser).scanKey(b, dst)
+ }
+ parserbridge.ScanComment = scanComment
+ parserbridge.ParseValue = func(p any, b []byte) (node any, rest []byte, err error) {
+ return p.(*Parser).parseValue(b)
+ }
+}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go b/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go
deleted file mode 100644
index e4354985be29..000000000000
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/builder.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package unstable
-
-// root contains a full AST.
-//
-// It is immutable once constructed with Builder.
-type root struct {
- nodes []Node
-}
-
-func (r *root) at(idx reference) *Node {
- return &r.nodes[idx]
-}
-
-type reference int
-
-const invalidReference reference = -1
-
-func (r reference) Valid() bool {
- return r != invalidReference
-}
-
-type builder struct {
- tree root
- lastIdx int
-}
-
-func (b *builder) NodeAt(ref reference) *Node {
- n := b.tree.at(ref)
- n.nodes = &b.tree.nodes
- return n
-}
-
-func (b *builder) Reset() {
- b.tree.nodes = b.tree.nodes[:0]
- b.lastIdx = 0
-}
-
-func (b *builder) Push(n Node) reference {
- b.lastIdx = len(b.tree.nodes)
- n.next = -1
- n.child = -1
- b.tree.nodes = append(b.tree.nodes, n)
- return reference(b.lastIdx)
-}
-
-func (b *builder) PushAndChain(n Node) reference {
- newIdx := len(b.tree.nodes)
- n.next = -1
- n.child = -1
- b.tree.nodes = append(b.tree.nodes, n)
- if b.lastIdx >= 0 {
- b.tree.nodes[b.lastIdx].next = int32(newIdx) //nolint:gosec // TOML ASTs are small
- }
- b.lastIdx = newIdx
- return reference(b.lastIdx)
-}
-
-func (b *builder) AttachChild(parent reference, child reference) {
- b.tree.nodes[parent].child = int32(child) //nolint:gosec // TOML ASTs are small
-}
-
-func (b *builder) Chain(from reference, to reference) {
- b.tree.nodes[from].next = int32(to) //nolint:gosec // TOML ASTs are small
-}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go
index f87a95a78d6c..f1912f77b142 100644
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/kind.go
@@ -33,7 +33,7 @@ const (
Float
// Integer represents an integer value.
Integer
- // LocalDate represents a a local date value.
+ // LocalDate represents a local date value.
LocalDate
// LocalTime represents a local time value.
LocalTime
@@ -79,5 +79,5 @@ func (k Kind) String() string {
case DateTime:
return "DateTime"
}
- panic(fmt.Errorf("Kind.String() not implemented for '%d'", k))
+ panic(fmt.Errorf("Kind.String() not implemented for kind %d", int(k)))
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go b/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go
new file mode 100644
index 000000000000..40c2e97809ef
--- /dev/null
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/marshaler.go
@@ -0,0 +1,29 @@
+package unstable
+
+// Marshaler is implemented by types that can marshal themselves into a raw
+// TOML description. The returned bytes are spliced verbatim into the encoded
+// document, so they must be valid TOML for the position they end up in:
+//
+// - A single value (string, integer, array, inline table, …) is emitted
+// inline, as in `key = `.
+// - One or more key-value lines (optionally with relative sub-table headers)
+// is emitted as the body of a `[key]` table.
+// - At the document root, the bytes are emitted as the whole document.
+//
+// The encoder decides between those forms by parsing the returned bytes, and
+// reports an error when they are not valid TOML for their position; see
+// Encoder.EnableMarshalerInterface in the root toml package. MarshalTOML can
+// be called more than once for the same value during a single encode, so it
+// must be deterministic.
+//
+// Marshaler is the encoding counterpart of Unmarshaler.
+type Marshaler interface {
+ MarshalTOML() ([]byte, error)
+}
+
+// MarshalTOML implements Marshaler. It returns the raw TOML bytes verbatim,
+// mirroring json.RawMessage.MarshalJSON. The value receiver means both
+// RawMessage and *RawMessage satisfy Marshaler.
+func (m RawMessage) MarshalTOML() ([]byte, error) {
+ return []byte(m), nil
+}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go
index 153830123644..cf72bb7446dc 100644
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/parser.go
@@ -2,11 +2,10 @@ package unstable
import (
"bytes"
+ "encoding/binary"
+ "errors"
"fmt"
- "reflect"
- "unicode"
-
- "github.com/pelletier/go-toml/v2/internal/characters"
+ "unicode/utf8"
)
// ParserError describes an error relative to the content of the document.
@@ -43,23 +42,34 @@ func NewParserError(highlight []byte, format string, args ...interface{}) error
// Don't forget to check Error() after you're done parsing.
//
// Each top-level expression needs to be fully processed before calling
-// NextExpression() again. Otherwise, calls to various Node methods may panic if
-// the parser has moved on the next expression.
+// NextExpression() again. Otherwise, calls to various Node methods may panic
+// if the parser has moved on the next expression.
//
// For performance reasons, go-toml doesn't make a copy of the input bytes to
// the parser. Make sure to copy all the bytes you need to outlive the slice
// given to the parser.
type Parser struct {
- data []byte
- builder builder
- ref reference
- left []byte
- err error
- first bool
-
KeepComments bool
+
+ data []byte
+ left []byte
+ nodes []Node
+ err error
+
+ // nesting is the current depth of nested arrays and inline tables being
+ // parsed. It guards parseVal/parseValArray/parseInlineTable against
+ // unbounded mutual recursion, which would otherwise let a deeply nested
+ // document overflow the goroutine stack (an unrecoverable fatal error).
+ nesting int
}
+// maxValueNesting is the maximum depth of nested arrays and inline tables the
+// parser accepts. Beyond it, parsing fails with a ParserError instead of
+// risking a stack overflow. Real-world TOML documents nest only a handful of
+// levels deep, so this bound is generous; it matches the limit used by the
+// standard library's encoding/json.
+const maxValueNesting = 10000
+
// Data returns the slice provided to the last call to Reset.
func (p *Parser) Data() []byte {
return p.data
@@ -69,33 +79,18 @@ func (p *Parser) Data() []byte {
// input. If the argument is not a subslice of the parser input, this function
// panics.
func (p *Parser) Range(b []byte) Range {
- return Range{
- Offset: uint32(p.subsliceOffset(b)), //nolint:gosec // TOML documents are small
- Length: uint32(len(b)), //nolint:gosec // TOML documents are small
- }
-}
-
-// rangeOfToken computes the Range of a token given the remaining bytes after the token.
-// This is used when the token was extracted from the beginning of some position,
-// and 'rest' is what remains after the token.
-func (p *Parser) rangeOfToken(token, rest []byte) Range {
- offset := len(p.data) - len(token) - len(rest)
- return Range{Offset: uint32(offset), Length: uint32(len(token))} //nolint:gosec // TOML documents are small
-}
-
-// subsliceOffset returns the byte offset of subslice b within p.data.
-// b must share the same backing array as p.data.
-func (p *Parser) subsliceOffset(b []byte) int {
- if len(b) == 0 {
- return len(p.data)
+ // b is a subslice of p.data if and only if they share the same backing
+ // array. In that case, because subslicing cannot extend capacity, the
+ // number of bytes between the start of b and the end of the backing array
+ // (its capacity) identifies the offset of b within data.
+ offset := cap(p.data) - cap(b)
+ if offset < 0 || offset+len(b) > len(p.data) {
+ panic(errors.New("not a slice of the data slice"))
}
- dataPtr := reflect.ValueOf(p.data).Pointer()
- subPtr := reflect.ValueOf(b).Pointer()
- offset := int(subPtr - dataPtr)
- if offset < 0 || offset > len(p.data) {
- panic("subslice is not within data")
+ return Range{
+ Offset: uint32(offset), //nolint:gosec // TOML documents are small
+ Length: uint32(len(b)), //nolint:gosec // TOML documents are small
}
- return offset
}
// Raw returns the slice corresponding to the bytes in the given range.
@@ -106,58 +101,11 @@ func (p *Parser) Raw(raw Range) []byte {
// Reset brings the parser to its initial state for a given input. It wipes an
// reuses internal storage to reduce allocation.
func (p *Parser) Reset(b []byte) {
- p.builder.Reset()
- p.ref = invalidReference
p.data = b
p.left = b
+ p.nodes = p.nodes[:0]
p.err = nil
- p.first = true
-}
-
-// NextExpression parses the next top-level expression. If an expression was
-// successfully parsed, it returns true. If the parser is at the end of the
-// document or an error occurred, it returns false.
-//
-// Retrieve the parsed expression with Expression().
-func (p *Parser) NextExpression() bool {
- if len(p.left) == 0 || p.err != nil {
- return false
- }
-
- p.builder.Reset()
- p.ref = invalidReference
-
- for {
- if len(p.left) == 0 || p.err != nil {
- return false
- }
-
- if !p.first {
- p.left, p.err = p.parseNewline(p.left)
- }
-
- if len(p.left) == 0 || p.err != nil {
- return false
- }
-
- p.ref, p.left, p.err = p.parseExpression(p.left)
-
- if p.err != nil {
- return false
- }
-
- p.first = false
-
- if p.ref.Valid() {
- return true
- }
- }
-}
-
-// Expression returns a pointer to the node representing the last successfully
-// parsed expression.
-func (p *Parser) Expression() *Node {
- return p.builder.NodeAt(p.ref)
+ p.nesting = 0
}
// Error returns any error that has occurred during parsing.
@@ -165,6 +113,12 @@ func (p *Parser) Error() error {
return p.err
}
+// Range of bytes in the document.
+type Range struct {
+ Offset uint32
+ Length uint32
+}
+
// Position describes a position in the input.
type Position struct {
// Number of bytes from the beginning of the input.
@@ -181,1095 +135,1552 @@ type Shape struct {
End Position
}
+func (p *Parser) position(offset int) Position {
+ pos := Position{
+ Offset: offset,
+ Line: 1,
+ Column: 1,
+ }
+ b := p.data[:offset]
+ for {
+ idx := bytes.IndexByte(b, '\n')
+ if idx < 0 {
+ break
+ }
+ pos.Line++
+ b = b[idx+1:]
+ }
+ pos.Column = len(b) + 1
+ return pos
+}
+
// Shape returns the shape of the given range in the input. Will
// panic if the range is not a subslice of the input.
func (p *Parser) Shape(r Range) Shape {
+ raw := p.Raw(r)
return Shape{
- Start: p.positionAt(int(r.Offset)),
- End: p.positionAt(int(r.Offset + r.Length)),
+ Start: p.position(int(r.Offset)),
+ End: p.position(int(r.Offset) + len(raw)),
}
}
-// positionAt returns the position at the given byte offset in the document.
-func (p *Parser) positionAt(offset int) Position {
- lead := p.data[:offset]
-
- return Position{
- Offset: offset,
- Line: bytes.Count(lead, []byte{'\n'}) + 1,
- Column: len(lead) - bytes.LastIndex(lead, []byte{'\n'}),
+// Expression returns a pointer to the node representing the last successfully
+// parsed expression.
+func (p *Parser) Expression() *Node {
+ if len(p.nodes) == 0 {
+ return nil
}
+ return &p.nodes[0]
}
-func (p *Parser) parseNewline(b []byte) ([]byte, error) {
- if b[0] == '\n' {
- return b[1:], nil
+// push appends a node to the arena and returns its handle (1-based index).
+func (p *Parser) push(n Node) int32 {
+ if len(p.nodes) == cap(p.nodes) {
+ // Grow by 2x: large expressions (huge arrays) would otherwise grow
+ // the arena in small steps, copying it repeatedly.
+ newCap := 2 * cap(p.nodes)
+ if newCap < 64 {
+ newCap = 64
+ }
+ nodes := make([]Node, len(p.nodes), newCap)
+ copy(nodes, p.nodes)
+ p.nodes = nodes
}
+ n.parser = p
+ p.nodes = append(p.nodes, n)
+ return int32(len(p.nodes)) //nolint:gosec // node counts are bounded by document size
+}
- if b[0] == '\r' {
- _, rest, err := scanWindowsNewline(b)
- return rest, err
- }
+// at returns a pointer to the node with the given handle. Only valid until
+// the next call to push.
+func (p *Parser) at(handle int32) *Node {
+ return &p.nodes[handle-1]
+}
- return nil, NewParserError(b[0:1], "expected newline but got %#U", b[0])
+// offsetOf returns the offset of b within the parser's data. b must be a
+// subslice of p.data.
+func (p *Parser) offsetOf(b []byte) int {
+ return cap(p.data) - cap(b)
}
-func (p *Parser) parseComment(b []byte) (reference, []byte, error) {
- ref := invalidReference
- data, rest, err := scanComment(b)
- if p.KeepComments && err == nil {
- ref = p.builder.Push(Node{
- Kind: Comment,
- Raw: p.rangeOfToken(data, rest),
- Data: data,
- })
- }
- return ref, rest, err
+// rangeFrom returns the Range covering bytes from the start of `from` to the
+// start of `to`. Both must be subslices of p.data.
+func (p *Parser) rangeFrom(from, to []byte) Range {
+ start := p.offsetOf(from)
+ end := p.offsetOf(to)
+ return Range{
+ Offset: uint32(start), //nolint:gosec // TOML documents are small
+ Length: uint32(end - start), //nolint:gosec // TOML documents are small
+ }
}
-func (p *Parser) parseExpression(b []byte) (reference, []byte, error) {
- // expression = ws [ comment ]
- // expression =/ ws keyval ws [ comment ]
- // expression =/ ws table ws [ comment ]
- ref := invalidReference
+// NextExpression parses the next top-level expression. If an expression was
+// successfully parsed, it returns true. If the parser is at the end of the
+// document or an error occurred, it returns false.
+//
+// Retrieve the parsed expression with Expression().
+func (p *Parser) NextExpression() bool {
+ if p.err != nil {
+ return false
+ }
- b = p.parseWhitespace(b)
+ p.nodes = p.nodes[:0]
- if len(b) == 0 {
- return ref, b, nil
- }
+ for {
+ b := skipWhitespace(p.left)
+ if len(b) == 0 {
+ p.left = b
+ return false
+ }
- if b[0] == '#' {
- ref, rest, err := p.parseComment(b)
- return ref, rest, err
- }
+ var err error
+ switch b[0] {
+ case '\n':
+ p.left = b[1:]
+ continue
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ p.left = b[2:]
+ continue
+ }
+ err = NewParserError(b[:1], "expected newline but got %#U", b[0])
+ case '#':
+ var comment, rest []byte
+ comment, rest, err = scanComment(b)
+ if err == nil {
+ rest, err = consumeEOL(rest)
+ }
+ if err == nil {
+ if p.KeepComments {
+ p.push(Node{
+ Kind: Comment,
+ Raw: p.Range(comment),
+ Data: comment,
+ })
+ p.left = rest
+ return true
+ }
+ p.left = rest
+ continue
+ }
+ case '[':
+ var rest []byte
+ rest, err = p.parseExprTable(b)
+ if err == nil {
+ p.left = rest
+ return true
+ }
+ default:
+ var rest []byte
+ rest, err = p.parseExprKeyval(b)
+ if err == nil {
+ p.left = rest
+ return true
+ }
+ }
- if b[0] == '\n' || b[0] == '\r' {
- return ref, b, nil
- }
+ // Errors at the end of the input have an empty highlight. Extend
+ // them to the last byte of the input so that they carry a usable
+ // position.
+ var perr *ParserError
+ if errors.As(err, &perr) && len(perr.Highlight) == 0 {
+ if offset := p.offsetOf(perr.Highlight); offset > 0 && offset == len(p.data) {
+ perr.Highlight = p.data[offset-1 : offset]
+ }
+ }
- var err error
- if b[0] == '[' {
- ref, b, err = p.parseTable(b)
- } else {
- ref, b, err = p.parseKeyval(b)
+ p.err = err
+ return false
}
+}
- if err != nil {
- return ref, nil, err
+// consumeEOL consumes a newline (LF or CRLF) or end of input.
+func consumeEOL(b []byte) ([]byte, error) {
+ if len(b) == 0 {
+ return b, nil
}
+ switch b[0] {
+ case '\n':
+ return b[1:], nil
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ return b[2:], nil
+ }
+ }
+ return nil, NewParserError(b[:1], "expected newline but got %#U", b[0])
+}
- b = p.parseWhitespace(b)
-
+// finishLine handles `ws [comment] (newline|eof)` after a top-level
+// expression. If a comment is present and KeepComments is set, it is attached
+// as the next sibling of the expression's root node.
+func (p *Parser) finishLine(root int32, b []byte) ([]byte, error) {
+ b = skipWhitespace(b)
if len(b) > 0 && b[0] == '#' {
- cref, rest, err := p.parseComment(b)
- if cref != invalidReference {
- p.builder.Chain(ref, cref)
+ comment, rest, err := scanComment(b)
+ if err != nil {
+ return nil, err
+ }
+ if p.KeepComments {
+ h := p.push(Node{
+ Kind: Comment,
+ Raw: p.Range(comment),
+ Data: comment,
+ })
+ p.at(root).next = h
}
- return ref, rest, err
+ b = rest
}
+ return consumeEOL(b)
+}
- return ref, b, nil
+// parseExprKeyval parses a top-level `key = value` expression, including its
+// line termination.
+func (p *Parser) parseExprKeyval(b []byte) ([]byte, error) {
+ root, rest, err := p.parseKeyval(b)
+ if err != nil {
+ return nil, err
+ }
+ return p.finishLine(root, rest)
}
-func (p *Parser) parseTable(b []byte) (reference, []byte, error) {
- // table = std-table / array-table
+// parseExprTable parses a `[table]` or `[[array table]]` expression,
+// including its line termination. b starts at '['.
+func (p *Parser) parseExprTable(b []byte) ([]byte, error) {
+ var root int32
+ var err error
+ var rest []byte
if len(b) > 1 && b[1] == '[' {
- return p.parseArrayTable(b)
+ root, rest, err = p.parseArrayTableHeader(b)
+ } else {
+ root, rest, err = p.parseTableHeader(b)
}
-
- return p.parseStdTable(b)
+ if err != nil {
+ return nil, err
+ }
+ return p.finishLine(root, rest)
}
-func (p *Parser) parseArrayTable(b []byte) (reference, []byte, error) {
- // array-table = array-table-open key array-table-close
- // array-table-open = %x5B.5B ws ; [[ Double left square bracket
- // array-table-close = ws %x5D.5D ; ]] Double right square bracket
- ref := p.builder.Push(Node{
- Kind: ArrayTable,
- })
-
- b = b[2:]
- b = p.parseWhitespace(b)
+// parseTableHeader parses `[ ws key ws ]`. b starts at '['.
+func (p *Parser) parseTableHeader(b []byte) (int32, []byte, error) {
+ root := p.push(Node{Kind: Table})
- k, b, err := p.parseKey(b)
+ first, b, err := p.parseKey(skipWhitespace(b[1:]))
if err != nil {
- return ref, nil, err
+ return 0, nil, err
+ }
+ p.at(root).child = first
+
+ if len(b) == 0 || b[0] != ']' {
+ return 0, nil, NewParserError(highlight1(b), "expected ']' to close table name")
}
+ return root, b[1:], nil
+}
- p.builder.AttachChild(ref, k)
- b = p.parseWhitespace(b)
+// parseArrayTableHeader parses `[[ ws key ws ]]`. b starts at '[['.
+func (p *Parser) parseArrayTableHeader(b []byte) (int32, []byte, error) {
+ root := p.push(Node{Kind: ArrayTable})
- b, err = expect(']', b)
+ first, b, err := p.parseKey(skipWhitespace(b[2:]))
if err != nil {
- return ref, nil, err
+ return 0, nil, err
}
+ p.at(root).child = first
- b, err = expect(']', b)
-
- return ref, b, err
+ if len(b) < 2 || b[0] != ']' || b[1] != ']' {
+ return 0, nil, NewParserError(highlight1(b), "expected ']]' to close array table name")
+ }
+ return root, b[2:], nil
}
-func (p *Parser) parseStdTable(b []byte) (reference, []byte, error) {
- // std-table = std-table-open key std-table-close
- // std-table-open = %x5B ws ; [ Left square bracket
- // std-table-close = ws %x5D ; ] Right square bracket
- ref := p.builder.Push(Node{
- Kind: Table,
- })
-
- b = b[1:]
- b = p.parseWhitespace(b)
+// parseKeyval parses `key keyval-sep val`. Returns the handle to the KeyValue
+// node.
+func (p *Parser) parseKeyval(b []byte) (int32, []byte, error) {
+ root := p.push(Node{Kind: KeyValue})
+ start := b
- key, b, err := p.parseKey(b)
+ firstKey, b, err := p.parseKey(b)
if err != nil {
- return ref, nil, err
+ return 0, nil, err
}
- p.builder.AttachChild(ref, key)
-
- b = p.parseWhitespace(b)
+ if len(b) == 0 || b[0] != '=' {
+ return 0, nil, NewParserError(highlight1(b), "expected '=' after key")
+ }
+ b = skipWhitespace(b[1:])
- b, err = expect(']', b)
+ value, b, err := p.parseVal(b)
+ if err != nil {
+ return 0, nil, err
+ }
- return ref, b, err
+ p.at(root).child = value
+ p.at(value).next = firstKey
+ p.at(root).Raw = p.rangeFrom(start, b)
+ return root, b, nil
}
-func (p *Parser) parseKeyval(b []byte) (reference, []byte, error) {
- // keyval = key keyval-sep val
- // Track the start position for Raw range
- startB := b
-
- ref := p.builder.Push(Node{
- Kind: KeyValue,
- })
+// parseKey parses a potentially dotted key. It consumes the whitespace
+// following the key, so that the caller can directly check for the next
+// expected character ('=', ']', ...). Returns the handle of the first Key
+// node; subsequent parts are chained via next.
+func (p *Parser) parseKey(b []byte) (int32, []byte, error) {
+ var first, last int32
+ for {
+ h, rest, err := p.parseSimpleKey(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ if first == 0 {
+ first = h
+ } else {
+ p.at(last).next = h
+ }
+ last = h
- key, b, err := p.parseKey(b)
- if err != nil {
- return invalidReference, nil, err
+ b = skipWhitespace(rest)
+ if len(b) > 0 && b[0] == '.' {
+ b = skipWhitespace(b[1:])
+ continue
+ }
+ return first, b, nil
}
+}
- // keyval-sep = ws %x3D ws ; =
+func isUnquotedKeyChar(c byte) bool {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_'
+}
- b = p.parseWhitespace(b)
+// parseSimpleKey parses one key part: either a bare key or a quoted key.
+func (p *Parser) parseSimpleKey(b []byte) (int32, []byte, error) {
+ raw, value, rest, err := p.scanSimpleKey(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ h := p.push(Node{Kind: Key, Raw: p.Range(raw), Data: value})
+ return h, rest, nil
+}
+// scanSimpleKey scans one key part (bare or quoted) without building an AST
+// node. It returns the raw bytes, the decoded key value, and the rest of the
+// input.
+func (p *Parser) scanSimpleKey(b []byte) (raw, value, rest []byte, err error) {
if len(b) == 0 {
- return invalidReference, nil, NewParserError(startB[:len(startB)-len(b)], "expected = after a key, but the document ends there")
+ return nil, nil, nil, NewParserError(b, "expected key but reached end of input")
}
- b, err = expect('=', b)
- if err != nil {
- return invalidReference, nil, err
+ switch b[0] {
+ case '\'':
+ return p.parseLiteralString(b)
+ case '"':
+ return p.parseBasicString(b)
+ default:
+ i := 0
+ for i < len(b) && isUnquotedKeyChar(b[i]) {
+ i++
+ }
+ if i == 0 {
+ return nil, nil, nil, NewParserError(b[:1], "invalid character at start of key: %#U", b[0])
+ }
+ return b[:i], b[:i], b[i:], nil
}
+}
- b = p.parseWhitespace(b)
-
- valRef, b, err := p.parseVal(b)
- if err != nil {
- return ref, b, err
+// parseVal parses a TOML value and returns the handle to its node.
+func (p *Parser) parseVal(b []byte) (int32, []byte, error) {
+ if len(b) == 0 {
+ return 0, nil, NewParserError(b, "expected value, not end of input")
}
- p.builder.Chain(valRef, key)
- p.builder.AttachChild(ref, valRef)
-
- // Set Raw to span the entire key-value expression.
- // Access the node directly in the slice to avoid the write barrier
- // that NodeAt's nodes-pointer setup would trigger.
- p.builder.tree.nodes[ref].Raw = p.rangeOfToken(startB[:len(startB)-len(b)], b)
-
- return ref, b, err
+ c := b[0]
+ switch {
+ case c == '"':
+ var raw, value, rest []byte
+ var err error
+ if len(b) > 2 && b[1] == '"' && b[2] == '"' {
+ raw, value, rest, err = p.parseMultilineBasicString(b)
+ } else {
+ raw, value, rest, err = p.parseBasicString(b)
+ }
+ if err != nil {
+ return 0, nil, err
+ }
+ h := p.push(Node{Kind: String, Raw: p.Range(raw), Data: value})
+ return h, rest, nil
+ case c == '\'':
+ var raw, value, rest []byte
+ var err error
+ if len(b) > 2 && b[1] == '\'' && b[2] == '\'' {
+ raw, value, rest, err = p.parseMultilineLiteralString(b)
+ } else {
+ raw, value, rest, err = p.parseLiteralString(b)
+ }
+ if err != nil {
+ return 0, nil, err
+ }
+ h := p.push(Node{Kind: String, Raw: p.Range(raw), Data: value})
+ return h, rest, nil
+ case c == 't':
+ return p.parseKeyword(b, "true", Bool)
+ case c == 'f':
+ return p.parseKeyword(b, "false", Bool)
+ case c == 'i':
+ return p.parseKeyword(b, "inf", Float)
+ case c == 'n':
+ return p.parseKeyword(b, "nan", Float)
+ case c == '[' || c == '{':
+ // Arrays and inline tables recurse back into parseVal for each of
+ // their elements. Bound that recursion so a document with millions of
+ // nested brackets or braces cannot overflow the goroutine stack.
+ if p.nesting >= maxValueNesting {
+ return 0, nil, NewParserError(b[:1], "arrays and inline tables are nested more than the maximum of %d levels deep", maxValueNesting)
+ }
+ p.nesting++
+ var h int32
+ var rest []byte
+ var err error
+ if c == '[' {
+ h, rest, err = p.parseValArray(b)
+ } else {
+ h, rest, err = p.parseInlineTable(b)
+ }
+ p.nesting--
+ return h, rest, err
+ case c == '+' || c == '-':
+ return p.parseIntOrFloat(b)
+ case c >= '0' && c <= '9':
+ if isDateTimeStart(b) {
+ return p.parseDateTime(b)
+ }
+ return p.parseIntOrFloat(b)
+ default:
+ return 0, nil, NewParserError(b[:1], "unexpected character %#U at start of value", c)
+ }
}
-//nolint:cyclop,funlen
-func (p *Parser) parseVal(b []byte) (reference, []byte, error) {
- // val = string / boolean / array / inline-table / date-time / float / integer
- ref := invalidReference
-
+// scanScalar scans a single scalar TOML value (string, integer, float,
+// boolean, or date/time) without building any AST node. It returns the kind of
+// the value, its raw bytes, its decoded value bytes (for strings: quotes
+// removed and escapes resolved; identical to raw for the other kinds), and the
+// rest of the input. Arrays and inline tables are not scalars and produce an
+// error: use parseValue for those.
+//
+// It is exposed to the root toml package through internal/parserbridge for the
+// fused generic-decode path; it is not part of the public API.
+func (p *Parser) scanScalar(b []byte) (kind Kind, raw, value, rest []byte, err error) {
if len(b) == 0 {
- return ref, nil, NewParserError(b, "expected value, not eof")
+ return Invalid, nil, nil, nil, NewParserError(b, "expected value, not end of input")
}
- var err error
c := b[0]
-
- switch c {
- case '"':
- var raw []byte
- var v []byte
- if scanFollowsMultilineBasicStringDelimiter(b) {
- raw, v, b, err = p.parseMultilineBasicString(b)
+ switch {
+ case c == '"':
+ if len(b) > 2 && b[1] == '"' && b[2] == '"' {
+ raw, value, rest, err = p.parseMultilineBasicString(b)
} else {
- raw, v, b, err = p.parseBasicString(b)
- }
-
- if err == nil {
- ref = p.builder.Push(Node{
- Kind: String,
- Raw: p.rangeOfToken(raw, b),
- Data: v,
- })
+ raw, value, rest, err = p.parseBasicString(b)
}
-
- return ref, b, err
- case '\'':
- var raw []byte
- var v []byte
- if scanFollowsMultilineLiteralStringDelimiter(b) {
- raw, v, b, err = p.parseMultilineLiteralString(b)
+ return String, raw, value, rest, err
+ case c == '\'':
+ if len(b) > 2 && b[1] == '\'' && b[2] == '\'' {
+ raw, value, rest, err = p.parseMultilineLiteralString(b)
} else {
- raw, v, b, err = p.parseLiteralString(b)
+ raw, value, rest, err = p.parseLiteralString(b)
}
-
- if err == nil {
- ref = p.builder.Push(Node{
- Kind: String,
- Raw: p.rangeOfToken(raw, b),
- Data: v,
- })
+ return String, raw, value, rest, err
+ case c == 't':
+ return scanKeyword(b, "true", Bool)
+ case c == 'f':
+ return scanKeyword(b, "false", Bool)
+ case c == 'i':
+ return scanKeyword(b, "inf", Float)
+ case c == 'n':
+ return scanKeyword(b, "nan", Float)
+ case c == '+' || c == '-':
+ return scanIntOrFloat(b)
+ case c >= '0' && c <= '9':
+ if isDateTimeStart(b) {
+ return scanDateTime(b)
}
+ return scanIntOrFloat(b)
+ default:
+ return Invalid, nil, nil, nil, NewParserError(b[:1], "unexpected character %#U at start of value", c)
+ }
+}
- return ref, b, err
- case 't':
- if !scanFollowsTrue(b) {
- return ref, nil, NewParserError(atmost(b, 4), "expected 'true'")
+// scanKey scans a potentially dotted key without building AST nodes,
+// appending the decoded value of each part to dst (pass dst[:0] to reuse a
+// buffer). It consumes the whitespace following the key, so the caller can
+// directly check for the next expected character ('=', ']', ...). It returns
+// the parts, the raw bytes spanning the whole key (from the first part to the
+// end of the last one, excluding trailing whitespace, usable as an error
+// highlight), the rest of the input, and any error.
+//
+// It is exposed to the root toml package through internal/parserbridge for the
+// fused generic-decode path; it is not part of the public API.
+func (p *Parser) scanKey(b []byte, dst [][]byte) (parts [][]byte, raw, rest []byte, err error) {
+ parts = dst
+ start := b
+ for {
+ _, value, r, err := p.scanSimpleKey(b)
+ if err != nil {
+ return nil, nil, nil, err
}
+ parts = append(parts, value)
- ref = p.builder.Push(Node{
- Kind: Bool,
- Data: b[:4],
- })
+ // r points just past the current part: the key spans from start to
+ // here, ignoring any whitespace that follows.
+ raw = start[:len(start)-len(r)]
- return ref, b[4:], nil
- case 'f':
- if !scanFollowsFalse(b) {
- return ref, nil, NewParserError(atmost(b, 5), "expected 'false'")
+ b = skipWhitespace(r)
+ if len(b) > 0 && b[0] == '.' {
+ b = skipWhitespace(b[1:])
+ continue
}
-
- ref = p.builder.Push(Node{
- Kind: Bool,
- Data: b[:5],
- })
-
- return ref, b[5:], nil
- case '[':
- return p.parseValArray(b)
- case '{':
- return p.parseInlineTable(b)
- default:
- return p.parseIntOrFloatOrDateTime(b)
+ return parts, raw, b, nil
}
}
-func atmost(b []byte, n int) []byte {
- if n >= len(b) {
- return b
+// parseValue parses a single TOML value, which may be an array or inline table,
+// into the parser's arena. It returns the root node of the value and the rest
+// of the input. It resets the arena, so any node returned by a previous call to
+// parseValue, Expression, or NextExpression is invalidated.
+//
+// It is exposed to the root toml package through internal/parserbridge for the
+// fused generic-decode path; it is not part of the public API.
+func (p *Parser) parseValue(b []byte) (*Node, []byte, error) {
+ p.nodes = p.nodes[:0]
+ h, rest, err := p.parseVal(b)
+ if err != nil {
+ return nil, nil, err
}
-
- return b[:n]
+ return &p.nodes[h-1], rest, nil
}
-func (p *Parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) {
- v, rest, err := scanLiteralString(b)
+func (p *Parser) parseKeyword(b []byte, kw string, kind Kind) (int32, []byte, error) {
+ k, raw, _, rest, err := scanKeyword(b, kw, kind)
if err != nil {
- return nil, nil, nil, err
+ return 0, nil, err
}
-
- return v, v[1 : len(v)-1], rest, nil
+ h := p.push(Node{Kind: k, Raw: p.Range(raw), Data: raw})
+ return h, rest, nil
}
-func (p *Parser) parseInlineTable(b []byte) (reference, []byte, error) {
- // inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close
- // inline-table-open = %x7B ws ; {
- // inline-table-close = ws %x7D ; }
- // inline-table-sep = ws %x2C ws ; , Comma
- // inline-table-keyvals = keyval [ inline-table-sep inline-table-keyvals ]
- parent := p.builder.Push(Node{
- Kind: InlineTable,
- Raw: p.rangeOfToken(b[:1], b[1:]),
- })
-
- first := true
-
- var child reference
+// scanKeyword scans a keyword value (true, false, inf, nan) without building
+// an AST node. raw and value are identical (the keyword bytes).
+func scanKeyword(b []byte, kw string, kind Kind) (Kind, []byte, []byte, []byte, error) {
+ if len(b) < len(kw) || string(b[:len(kw)]) != kw {
+ n := len(kw)
+ if len(b) < n {
+ n = len(b)
+ }
+ return Invalid, nil, nil, nil, NewParserError(b[:n], "expected keyword %q", kw)
+ }
+ return kind, b[:len(kw)], b[:len(kw)], b[len(kw):], nil
+}
+// parseValArray parses an array value. b starts at '['.
+func (p *Parser) parseValArray(b []byte) (int32, []byte, error) {
+ arr := p.push(Node{Kind: Array})
b = b[1:]
- var err error
+ var lastChild int32
+ appendChild := func(h int32) {
+ if lastChild == 0 {
+ p.at(arr).child = h
+ } else {
+ p.at(lastChild).next = h
+ }
+ lastChild = h
+ }
- for len(b) > 0 {
- previousB := b
- b = p.parseWhitespace(b)
+ // Comments inside the array are attached as follows: the first comment
+ // of a "run" (consecutive comments with no value in between) becomes a
+ // child of the array, interleaved with values; subsequent comments of the
+ // run are attached as children of the first one.
+ var runFirst, runLast int32
+ // afterValue is true when a value has been parsed and a comma (or the
+ // closing bracket) is expected before the next one.
+ afterValue := false
+ for {
+ b = skipWhitespace(b)
if len(b) == 0 {
- return parent, nil, NewParserError(previousB[:1], "inline table is incomplete")
- }
-
- if b[0] == '}' {
- break
+ return 0, nil, NewParserError(b, "array is incomplete")
}
- if !first {
- b, err = expect(',', b)
+ switch b[0] {
+ case ']':
+ return arr, b[1:], nil
+ case '\n':
+ b = b[1:]
+ continue
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ b = b[2:]
+ continue
+ }
+ return 0, nil, NewParserError(b[:1], "expected newline but got %#U", b[0])
+ case '#':
+ comment, rest, err := scanComment(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ if p.KeepComments {
+ h := p.push(Node{Kind: Comment, Raw: p.Range(comment), Data: comment})
+ switch {
+ case runFirst == 0:
+ appendChild(h)
+ runFirst = h
+ case runLast == runFirst:
+ p.at(runFirst).child = h
+ default:
+ p.at(runLast).next = h
+ }
+ runLast = h
+ }
+ b = rest
+ continue
+ case ',':
+ if !afterValue {
+ return 0, nil, NewParserError(b[:1], "expected value but got %#U", b[0])
+ }
+ afterValue = false
+ b = b[1:]
+ continue
+ default:
+ if afterValue {
+ return 0, nil, NewParserError(b[:1], "expected ',' or ']' after array value")
+ }
+ h, rest, err := p.parseVal(b)
if err != nil {
- return parent, nil, err
+ return 0, nil, err
}
- b = p.parseWhitespace(b)
+ appendChild(h)
+ afterValue = true
+ runFirst, runLast = 0, 0
+ b = rest
+ continue
}
+ }
+}
- var kv reference
-
- kv, b, err = p.parseKeyval(b)
- if err != nil {
- return parent, nil, err
- }
+// parseInlineTable parses an inline table value. b starts at '{'.
+//
+// Per TOML v1.1.0, inline tables may span multiple lines (whitespace,
+// comments and newlines are allowed between elements) and may contain a
+// trailing comma.
+func (p *Parser) parseInlineTable(b []byte) (int32, []byte, error) {
+ tbl := p.push(Node{Kind: InlineTable, Raw: p.Range(b[:1])})
+ b = b[1:]
- if first {
- p.builder.AttachChild(parent, kv)
+ var lastChild int32
+ appendChild := func(h int32) {
+ if lastChild == 0 {
+ p.at(tbl).child = h
} else {
- p.builder.Chain(child, kv)
+ p.at(lastChild).next = h
}
- child = kv
-
- first = false
+ lastChild = h
}
- rest, err := expect('}', b)
+ // Comments are attached as in arrays: the first comment of a "run"
+ // (consecutive comments with no key-value in between) becomes a child of
+ // the table, interleaved with key-values; subsequent comments of the run
+ // hang off the first one.
+ var runFirst, runLast int32
- return parent, rest, err
-}
+ // afterValue is true when a key-value has been parsed and a comma (or the
+ // closing brace) is expected before the next one.
+ afterValue := false
+ for {
+ b = skipWhitespace(b)
+ if len(b) == 0 {
+ return 0, nil, NewParserError(b, "inline table is incomplete")
+ }
-//nolint:funlen,cyclop
-func (p *Parser) parseValArray(b []byte) (reference, []byte, error) {
- // array = array-open [ array-values ] ws-comment-newline array-close
- // array-open = %x5B ; [
- // array-close = %x5D ; ]
- // array-values = ws-comment-newline val ws-comment-newline array-sep array-values
- // array-values =/ ws-comment-newline val ws-comment-newline [ array-sep ]
- // array-sep = %x2C ; , Comma
- // ws-comment-newline = *( wschar / [ comment ] newline )
- arrayStart := b
- b = b[1:]
-
- parent := p.builder.Push(Node{
- Kind: Array,
- })
-
- // First indicates whether the parser is looking for the first element
- // (non-comment) of the array.
- first := true
-
- lastChild := invalidReference
-
- addChild := func(valueRef reference) {
- if lastChild == invalidReference {
- p.builder.AttachChild(parent, valueRef)
- } else {
- p.builder.Chain(lastChild, valueRef)
+ switch b[0] {
+ case '}':
+ return tbl, b[1:], nil
+ case '\n':
+ b = b[1:]
+ continue
+ case '\r':
+ if len(b) > 1 && b[1] == '\n' {
+ b = b[2:]
+ continue
+ }
+ return 0, nil, NewParserError(b[:1], "expected newline but got %#U", b[0])
+ case '#':
+ comment, rest, err := scanComment(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ if p.KeepComments {
+ h := p.push(Node{Kind: Comment, Raw: p.Range(comment), Data: comment})
+ switch {
+ case runFirst == 0:
+ appendChild(h)
+ runFirst = h
+ case runLast == runFirst:
+ p.at(runFirst).child = h
+ default:
+ p.at(runLast).next = h
+ }
+ runLast = h
+ }
+ b = rest
+ continue
+ case ',':
+ if !afterValue {
+ return 0, nil, NewParserError(b[:1], "unexpected comma in inline table")
+ }
+ afterValue = false
+ b = b[1:]
+ continue
+ default:
+ if afterValue {
+ return 0, nil, NewParserError(b[:1], "expected ',' or '}' after inline table key-value")
+ }
+ h, rest, err := p.parseKeyval(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ appendChild(h)
+ afterValue = true
+ runFirst, runLast = 0, 0
+ b = rest
+ continue
}
- lastChild = valueRef
}
+}
- var err error
- for len(b) > 0 {
- var cref reference
- cref, b, err = p.parseOptionalWhitespaceCommentNewline(b)
- if err != nil {
- return parent, nil, err
- }
-
- if cref != invalidReference {
- addChild(cref)
- }
+func isDigit(c byte) bool {
+ return c >= '0' && c <= '9'
+}
- if len(b) == 0 {
- return parent, nil, NewParserError(arrayStart[:1], "array is incomplete")
- }
+func isHexDigit(c byte) bool {
+ return isDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')
+}
- if b[0] == ']' {
- break
- }
+// isDateTimeStart reports whether b looks like the start of a date or time
+// value instead of a number. Values starting with two digits followed by a
+// colon are times; values starting with four digits followed by a dash are
+// dates.
+func isDateTimeStart(b []byte) bool {
+ if len(b) >= 3 && isDigit(b[1]) && b[2] == ':' {
+ return true
+ }
+ if len(b) >= 5 && isDigit(b[1]) && isDigit(b[2]) && isDigit(b[3]) && b[4] == '-' {
+ return true
+ }
+ return false
+}
- if b[0] == ',' {
- if first {
- return parent, nil, NewParserError(b[0:1], "array cannot start with comma")
- }
- b = b[1:]
+// expectDigits checks that the n first bytes of b are digits.
+// parseDateTime parses date and/or time values. b starts with a digit.
+//
+// The parser is lenient: it scans the characters that can be part of a date
+// and/or time value to delimit and classify the token, but leaves the
+// validation of its contents to the document consumer. This keeps the value
+// in one piece, so that errors about its content can point at the right
+// place.
+func (p *Parser) parseDateTime(b []byte) (int32, []byte, error) {
+ kind, raw, _, rest, err := scanDateTime(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ h := p.push(Node{Kind: kind, Raw: p.Range(raw), Data: raw})
+ return h, rest, nil
+}
- cref, b, err = p.parseOptionalWhitespaceCommentNewline(b)
- if err != nil {
- return parent, nil, err
- }
- if cref != invalidReference {
- addChild(cref)
- }
- } else if !first {
- return parent, nil, NewParserError(b[0:1], "array elements must be separated by commas")
+// scanDateTime classifies and delimits a date/time value without building an
+// AST node. raw and value are identical (the token bytes).
+func scanDateTime(b []byte) (Kind, []byte, []byte, []byte, error) {
+ // Greedily scan the characters that may compose a date/time value. A
+ // space is part of the value only when it serves as the delimiter
+ // between the date and the time, which is approximated by requiring a
+ // digit right after it.
+ i := 0
+ delim := -1
+ for i < len(b) {
+ c := b[i]
+ if isDigit(c) || c == ':' || c == '-' || c == '+' || c == '.' || c == 'Z' || c == 'z' {
+ i++
+ continue
}
-
- // TOML allows trailing commas in arrays.
- if len(b) > 0 && b[0] == ']' {
- break
+ if c == 'T' || c == 't' || (c == ' ' && i+1 < len(b) && isDigit(b[i+1])) {
+ if delim < 0 {
+ delim = i
+ }
+ i++
+ continue
}
+ break
+ }
+ tok := b[:i]
- var valueRef reference
- valueRef, b, err = p.parseVal(b)
- if err != nil {
- return parent, nil, err
- }
+ var kind Kind
+ switch {
+ case tok[2] == ':':
+ kind = LocalTime
+ case delim < 0:
+ kind = LocalDate
+ case bytes.ContainsAny(tok[delim+1:], "Zz+-"):
+ kind = DateTime
+ default:
+ kind = LocalDateTime
+ }
- addChild(valueRef)
+ return kind, tok, tok, b[i:], nil
+}
- cref, b, err = p.parseOptionalWhitespaceCommentNewline(b)
- if err != nil {
- return parent, nil, err
+// scanDigitsWithUnderscores scans a run of digits potentially separated by
+// underscores. b starts right after the first digit of the run. isInRange
+// selects the kind of digits. Returns the index after the run.
+func scanDigitsWithUnderscores(b []byte, i int, isInRange func(byte) bool) (int, error) {
+ for i < len(b) {
+ c := b[i]
+ if isInRange(c) {
+ i++
+ continue
}
- if cref != invalidReference {
- addChild(cref)
+ if c == '_' {
+ if i+1 >= len(b) || !isInRange(b[i+1]) {
+ end := i + 2
+ if end > len(b) {
+ end = len(b)
+ }
+ return 0, NewParserError(b[i:end], "number must have at least one digit between underscores")
+ }
+ i += 2
+ continue
}
-
- first = false
+ break
}
+ return i, nil
+}
- rest, err := expect(']', b)
-
- return parent, rest, err
+// parseIntOrFloat parses integer and float values, including the special
+// values inf and nan with an optional sign.
+func (p *Parser) parseIntOrFloat(b []byte) (int32, []byte, error) {
+ kind, raw, _, rest, err := scanIntOrFloat(b)
+ if err != nil {
+ return 0, nil, err
+ }
+ h := p.push(Node{Kind: kind, Raw: p.Range(raw), Data: raw})
+ return h, rest, nil
}
-func (p *Parser) parseOptionalWhitespaceCommentNewline(b []byte) (reference, []byte, error) {
- rootCommentRef := invalidReference
- latestCommentRef := invalidReference
+// scanIntOrFloat delimits and classifies an integer or float value (including
+// the special floats inf and nan with an optional sign) without building an
+// AST node. raw and value are identical (the token bytes).
+func scanIntOrFloat(b []byte) (Kind, []byte, []byte, []byte, error) {
+ i := 0
+ if b[i] == '+' || b[i] == '-' {
+ i++
+ }
+ if i >= len(b) {
+ return Invalid, nil, nil, nil, NewParserError(b, "expected number after sign")
+ }
- addComment := func(ref reference) {
- switch {
- case rootCommentRef == invalidReference:
- rootCommentRef = ref
- case latestCommentRef == invalidReference:
- p.builder.AttachChild(rootCommentRef, ref)
- latestCommentRef = ref
- default:
- p.builder.Chain(latestCommentRef, ref)
- latestCommentRef = ref
+ // special floats
+ if b[i] == 'i' || b[i] == 'n' {
+ kw := "inf"
+ if b[i] == 'n' {
+ kw = "nan"
+ }
+ if len(b) < i+3 || string(b[i:i+3]) != kw {
+ return Invalid, nil, nil, nil, NewParserError(b[i:i+1], "expected %q", kw)
}
+ i += 3
+ return Float, b[:i], b[:i], b[i:], nil
}
- for len(b) > 0 {
- var err error
- b = p.parseWhitespace(b)
+ if !isDigit(b[i]) {
+ return Invalid, nil, nil, nil, NewParserError(b[i:i+1], "expected digit but got %#U", b[i])
+ }
- if len(b) > 0 && b[0] == '#' {
- var ref reference
- ref, b, err = p.parseComment(b)
- if err != nil {
- return invalidReference, nil, err
- }
- if ref != invalidReference {
- addComment(ref)
- }
+ // radix prefixes
+ if b[i] == '0' && i+1 < len(b) && (b[i+1] == 'x' || b[i+1] == 'o' || b[i+1] == 'b') {
+ if i != 0 {
+ return Invalid, nil, nil, nil, NewParserError(b[:2], "sign is not allowed on numbers with a radix prefix")
}
-
- if len(b) == 0 {
- break
+ var isInRange func(byte) bool
+ switch b[1] {
+ case 'x':
+ isInRange = isHexDigit
+ case 'o':
+ isInRange = func(c byte) bool { return c >= '0' && c <= '7' }
+ case 'b':
+ isInRange = func(c byte) bool { return c == '0' || c == '1' }
}
-
- if b[0] == '\n' || b[0] == '\r' {
- b, err = p.parseNewline(b)
- if err != nil {
- return invalidReference, nil, err
- }
- } else {
- break
+ i = 2
+ if i >= len(b) || !isInRange(b[i]) {
+ return Invalid, nil, nil, nil, NewParserError(b[:2], "radix prefix must be followed by at least one digit")
}
+ i++
+ var err error
+ i, err = scanDigitsWithUnderscores(b, i, isInRange)
+ if err != nil {
+ return Invalid, nil, nil, nil, err
+ }
+ return Integer, b[:i], b[:i], b[i:], nil
}
- return rootCommentRef, b, nil
-}
-
-func (p *Parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, error) {
- token, rest, err := scanMultilineLiteralString(b)
+ // decimal integer part
+ leadingZero := b[i] == '0'
+ digitsStart := i
+ i++
+ var err error
+ i, err = scanDigitsWithUnderscores(b, i, isDigit)
if err != nil {
- return nil, nil, nil, err
+ return Invalid, nil, nil, nil, err
+ }
+ if leadingZero && i > digitsStart+1 {
+ return Invalid, nil, nil, nil, NewParserError(b[digitsStart:digitsStart+2], "integers cannot have leading zeroes")
}
- i := 3
+ kind := Integer
- // skip the immediate new line
- if token[i] == '\n' {
+ // fractional part
+ if i < len(b) && b[i] == '.' {
i++
- } else if token[i] == '\r' && token[i+1] == '\n' {
- i += 2
+ if i >= len(b) || !isDigit(b[i]) {
+ return Invalid, nil, nil, nil, NewParserError(highlight1(b[i:]), "decimal point must be followed by a digit")
+ }
+ i++
+ i, err = scanDigitsWithUnderscores(b, i, isDigit)
+ if err != nil {
+ return Invalid, nil, nil, nil, err
+ }
+ kind = Float
}
- return token, token[i : len(token)-3], rest, err
-}
+ // exponent
+ if i < len(b) && (b[i] == 'e' || b[i] == 'E') {
+ i++
+ if i < len(b) && (b[i] == '+' || b[i] == '-') {
+ i++
+ }
+ if i >= len(b) || !isDigit(b[i]) {
+ return Invalid, nil, nil, nil, NewParserError(highlight1(b[i:]), "exponent must contain at least one digit")
+ }
+ i++
+ i, err = scanDigitsWithUnderscores(b, i, isDigit)
+ if err != nil {
+ return Invalid, nil, nil, nil, err
+ }
+ kind = Float
+ }
-//nolint:funlen,gocognit,cyclop
-func (p *Parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, error) {
- // ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body
- // ml-basic-string-delim
- // ml-basic-string-delim = 3quotation-mark
- // ml-basic-body = *mlb-content *( mlb-quotes 1*mlb-content ) [ mlb-quotes ]
- //
- // mlb-content = mlb-char / newline / mlb-escaped-nl
- // mlb-char = mlb-unescaped / escaped
- // mlb-quotes = 1*2quotation-mark
- // mlb-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii
- // mlb-escaped-nl = escape ws newline *( wschar / newline )
- token, escaped, rest, err := scanMultilineBasicString(b)
- if err != nil {
- return nil, nil, nil, err
+ // A letter right after the number means it was meant to be a string that
+ // was left unquoted (e.g. "20s"). Report that instead of the misleading
+ // "expected newline" raised later (issue #413).
+ if i < len(b) {
+ if c := b[i]; (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') {
+ return Invalid, nil, nil, nil, NewParserError(b[i:i+1], "strings must be quoted")
+ }
}
- i := 3
+ return kind, b[:i], b[:i], b[i:], nil
+}
- // skip the immediate new line
- if token[i] == '\n' {
- i++
- } else if token[i] == '\r' && token[i+1] == '\n' {
- i += 2
+// highlight1 returns a 1-byte highlight at the start of b, or b itself if it
+// is empty.
+func highlight1(b []byte) []byte {
+ if len(b) > 0 {
+ return b[:1]
}
+ return b
+}
- // fast path
- startIdx := i
- endIdx := len(token) - len(`"""`)
-
- if !escaped {
- str := token[startIdx:endIdx]
- highlight := characters.Utf8TomlValidAlreadyEscaped(str)
- if len(highlight) == 0 {
- return token, str, rest, nil
- }
- return nil, nil, nil, NewParserError(highlight, "invalid UTF-8")
+func skipWhitespace(b []byte) []byte {
+ for len(b) > 0 && (b[0] == ' ' || b[0] == '\t') {
+ b = b[1:]
}
+ return b
+}
- var builder bytes.Buffer
+// Word-at-a-time byte scanning helpers. These detect, within an 8-byte word,
+// the presence of bytes that need special handling, so that runs of plain
+// ASCII characters can be skipped 8 bytes at a time.
+const (
+ lsb = 0x0101010101010101
+ msb = 0x8080808080808080
+)
- // The scanner ensures that the token starts and ends with quotes and that
- // escapes are balanced.
- for i < len(token)-3 {
- c := token[i]
+// hasByteBelow reports whether any byte of the word x is strictly below n.
+// Only meaningful when combined with a check that no byte has its high bit
+// set.
+func hasByteBelow(x uint64, n uint64) uint64 {
+ return (x - n*lsb) & ^x & msb
+}
- //nolint:nestif
- if c == '\\' {
- // When the last non-whitespace character on a line is an unescaped \,
- // it will be trimmed along with all whitespace (including newlines) up
- // to the next non-whitespace character or closing delimiter.
+// hasByteEqual reports whether any byte of the word x equals c. Only
+// meaningful for bytes without their high bit set.
+func hasByteEqual(x uint64, c uint64) uint64 {
+ y := x ^ (c * lsb)
+ return (y - lsb) & ^y & msb
+}
- isLastNonWhitespaceOnLine := false
- j := 1
- findEOLLoop:
- for ; j < len(token)-3-i; j++ {
- switch token[i+j] {
- case ' ', '\t':
- continue
- case '\r':
- if token[i+j+1] == '\n' {
- continue
- }
- case '\n':
- isLastNonWhitespaceOnLine = true
- }
- break findEOLLoop
- }
- if isLastNonWhitespaceOnLine {
- i += j
- for ; i < len(token)-3; i++ {
- c := token[i]
- if c != '\n' && c != '\r' && c != ' ' && c != '\t' {
- i--
- break
- }
- }
- i++
- continue
+// scanComment parses a comment, starting at the '#' character. It returns the
+// comment bytes (including '#', excluding the line ending) and the rest of
+// the input.
+func scanComment(b []byte) ([]byte, []byte, error) {
+ i := 1
+ for i < len(b) {
+ // Fast path: skip 8 bytes at a time as long as they are all plain
+ // printable ASCII.
+ for i+8 <= len(b) {
+ x := binary.LittleEndian.Uint64(b[i:])
+ if (x&msb)|hasByteBelow(x, 0x20)|hasByteEqual(x, 0x7f) != 0 {
+ break
}
+ i += 8
+ }
+ if i >= len(b) {
+ break
+ }
- // handle escaping
- i++
- c = token[i]
-
- switch c {
- case '"', '\\':
- builder.WriteByte(c)
- case 'b':
- builder.WriteByte('\b')
- case 'f':
- builder.WriteByte('\f')
- case 'n':
- builder.WriteByte('\n')
- case 'r':
- builder.WriteByte('\r')
- case 't':
- builder.WriteByte('\t')
- case 'e':
- builder.WriteByte(0x1B)
- case 'u':
- x, err := hexToRune(atmost(token[i+1:], 4), 4)
- if err != nil {
- return nil, nil, nil, err
- }
- builder.WriteRune(x)
- i += 4
- case 'U':
- x, err := hexToRune(atmost(token[i+1:], 8), 8)
- if err != nil {
- return nil, nil, nil, err
- }
-
- builder.WriteRune(x)
- i += 8
- default:
- return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c)
+ c := b[i]
+ if c >= 0x80 {
+ var ok bool
+ i, ok = scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in comment")
}
+ continue
+ }
+ switch {
+ case c >= 0x20 && c < 0x7f:
i++
- } else {
- size := characters.Utf8ValidNext(token[i:])
- if size == 0 {
- return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c)
+ case c == '\n':
+ return b[:i], b[i:], nil
+ case c == '\r':
+ if i+1 < len(b) && b[i+1] == '\n' {
+ return b[:i], b[i:], nil
}
- builder.Write(token[i : i+size])
- i += size
+ return nil, nil, NewParserError(b[i:i+1], "carriage returns are not allowed in comments")
+ case c == '\t':
+ i++
+ default:
+ return nil, nil, NewParserError(b[i:i+1], "control characters are not allowed in comments")
}
}
-
- return token, builder.Bytes(), rest, nil
+ return b[:i], b[i:], nil
}
-func (p *Parser) parseKey(b []byte) (reference, []byte, error) {
- // key = simple-key / dotted-key
- // simple-key = quoted-key / unquoted-key
- //
- // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _
- // quoted-key = basic-string / literal-string
- // dotted-key = simple-key 1*( dot-sep simple-key )
- //
- // dot-sep = ws %x2E ws ; . Period
- raw, key, b, err := p.parseSimpleKey(b)
- if err != nil {
- return invalidReference, nil, err
- }
-
- ref := p.builder.Push(Node{
- Kind: Key,
- Raw: p.rangeOfToken(raw, b),
- Data: key,
- })
-
+// parseLiteralString parses a single-line literal string, starting at the
+// opening quote. Returns the raw bytes (with quotes), the string value
+// (without quotes) and the rest of the input.
+func (p *Parser) parseLiteralString(b []byte) ([]byte, []byte, []byte, error) {
+ i := 1
for {
- b = p.parseWhitespace(b)
- if len(b) > 0 && b[0] == '.' {
- b = p.parseWhitespace(b[1:])
-
- raw, key, b, err = p.parseSimpleKey(b)
- if err != nil {
- return ref, nil, err
+ // Fast path over plain ASCII.
+ for i+8 <= len(b) {
+ x := binary.LittleEndian.Uint64(b[i:])
+ if (x&msb)|hasByteBelow(x, 0x20)|hasByteEqual(x, '\'')|hasByteEqual(x, 0x7f) != 0 {
+ break
}
+ i += 8
+ }
+ if i >= len(b) {
+ return nil, nil, nil, NewParserError(b[len(b):], "unterminated literal string")
+ }
- p.builder.PushAndChain(Node{
- Kind: Key,
- Raw: p.rangeOfToken(raw, b),
- Data: key,
- })
- } else {
- break
+ c := b[i]
+ switch {
+ case c == '\'':
+ return b[:i+1], b[1:i], b[i+1:], nil
+ case c >= 0x20 && c < 0x7f:
+ i++
+ case c == '\t':
+ i++
+ case c == '\n' || c == '\r':
+ return nil, nil, nil, NewParserError(b[i:i+1], "literal strings cannot have new lines")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "literal strings cannot have control characters")
+ default:
+ var ok bool
+ i, ok = scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in literal string")
+ }
}
}
-
- return ref, b, nil
}
-func (p *Parser) parseSimpleKey(b []byte) (raw, key, rest []byte, err error) {
- if len(b) == 0 {
- return nil, nil, nil, NewParserError(b, "expected key but found none")
+// parseMultilineLiteralString parses a multi-line literal string, starting at
+// the opening triple quote.
+func (p *Parser) parseMultilineLiteralString(b []byte) ([]byte, []byte, []byte, error) {
+ i := 3
+ // trim the newline right after the opening delimiter
+ if i < len(b) && b[i] == '\n' {
+ i++
+ } else if i+1 < len(b) && b[i] == '\r' && b[i+1] == '\n' {
+ i += 2
}
+ contentStart := i
- // simple-key = quoted-key / unquoted-key
- // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _
- // quoted-key = basic-string / literal-string
- switch {
- case b[0] == '\'':
- return p.parseLiteralString(b)
- case b[0] == '"':
- return p.parseBasicString(b)
- case isUnquotedKeyChar(b[0]):
- key, rest = scanUnquotedKey(b)
- return key, key, rest, nil
- default:
- return nil, nil, nil, NewParserError(b[0:1], "invalid character at start of key: %c", b[0])
+ for i < len(b) {
+ c := b[i]
+ switch {
+ case c == '\'':
+ // count consecutive quotes
+ j := i
+ for j < len(b) && b[j] == '\'' {
+ j++
+ }
+ n := j - i
+ if n >= 3 {
+ if n > 5 {
+ return nil, nil, nil, NewParserError(b[i:j], "too many quotes at the end of a multiline literal string")
+ }
+ // n-3 quotes belong to the content; the last 3 close the
+ // string.
+ contentEnd := i + n - 3
+ return b[:j], b[contentStart:contentEnd], b[j:], nil
+ }
+ i = j
+ case c >= 0x20 && c < 0x7f:
+ i++
+ case c == '\t' || c == '\n':
+ i++
+ case c == '\r':
+ if i+1 < len(b) && b[i+1] == '\n' {
+ i += 2
+ continue
+ }
+ return nil, nil, nil, NewParserError(b[i:i+1], "carriage returns must be followed by a newline character")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "multiline literal strings cannot have control characters")
+ default:
+ var ok bool
+ i, ok = scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in multiline literal string")
+ }
+ }
}
+ return nil, nil, nil, NewParserError(b[len(b):], "multiline literal string not terminated by '''")
}
-//nolint:funlen,cyclop
+// parseBasicString parses a single-line basic string, starting at the opening
+// quote. The value is a subslice of the input if the string contains no
+// escape sequence, or a new allocation otherwise.
func (p *Parser) parseBasicString(b []byte) ([]byte, []byte, []byte, error) {
- // basic-string = quotation-mark *basic-char quotation-mark
- // quotation-mark = %x22 ; "
- // basic-char = basic-unescaped / escaped
- // basic-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii
- // escaped = escape escape-seq-char
- // escape-seq-char = %x22 ; " quotation mark U+0022
- // escape-seq-char =/ %x5C ; \ reverse solidus U+005C
- // escape-seq-char =/ %x62 ; b backspace U+0008
- // escape-seq-char =/ %x66 ; f form feed U+000C
- // escape-seq-char =/ %x6E ; n line feed U+000A
- // escape-seq-char =/ %x72 ; r carriage return U+000D
- // escape-seq-char =/ %x74 ; t tab U+0009
- // escape-seq-char =/ %x75 4HEXDIG ; uXXXX U+XXXX
- // escape-seq-char =/ %x55 8HEXDIG ; UXXXXXXXX U+XXXXXXXX
- token, escaped, rest, err := scanBasicString(b)
- if err != nil {
- return nil, nil, nil, err
- }
-
- startIdx := len(`"`)
- endIdx := len(token) - len(`"`)
+ i := 1
+ // First pass: handle strings without escape sequences without allocating.
+ for {
+ for i+8 <= len(b) {
+ x := binary.LittleEndian.Uint64(b[i:])
+ if (x&msb)|hasByteBelow(x, 0x20)|hasByteEqual(x, '"')|hasByteEqual(x, '\\')|hasByteEqual(x, 0x7f) != 0 {
+ break
+ }
+ i += 8
+ }
+ if i >= len(b) {
+ return nil, nil, nil, NewParserError(b[len(b):], "unterminated basic string")
+ }
- // Fast path. If there is no escape sequence, the string should just be
- // an UTF-8 encoded string, which is the same as Go. In that case,
- // validate the string and return a direct reference to the buffer.
- if !escaped {
- str := token[startIdx:endIdx]
- highlight := characters.Utf8TomlValidAlreadyEscaped(str)
- if len(highlight) == 0 {
- return token, str, rest, nil
+ c := b[i]
+ switch {
+ case c == '"':
+ return b[:i+1], b[1:i], b[i+1:], nil
+ case c == '\\':
+ // switch to the escape-aware parser, copying what has been
+ // scanned so far
+ return p.parseBasicStringEscaped(b, i)
+ case c >= 0x20 && c < 0x7f:
+ i++
+ case c == '\t':
+ i++
+ case c == '\n' || c == '\r':
+ return nil, nil, nil, NewParserError(b[i:i+1], "basic strings cannot have new lines")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "basic strings cannot have control characters")
+ default:
+ var ok bool
+ i, ok = scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in basic string")
+ }
}
- return nil, nil, nil, NewParserError(highlight, "invalid UTF-8")
}
+}
- i := startIdx
-
- var builder bytes.Buffer
-
- // The scanner ensures that the token starts and ends with quotes and that
- // escapes are balanced.
- for i < len(token)-1 {
- c := token[i]
- if c == '\\' {
+// findBasicStringEnd returns the index of the quote closing a basic string,
+// or -1 if the string is not terminated. i is the index of the first
+// character after the opening quote. It does not validate the content: it
+// only skips over escape sequences so that escaped quotes do not terminate
+// the string.
+func findBasicStringEnd(b []byte, i int) int {
+ for i < len(b) {
+ switch b[i] {
+ case '"':
+ return i
+ case '\\':
+ i += 2
+ default:
i++
- c = token[i]
-
- switch c {
- case '"', '\\':
- builder.WriteByte(c)
- case 'b':
- builder.WriteByte('\b')
- case 'f':
- builder.WriteByte('\f')
- case 'n':
- builder.WriteByte('\n')
- case 'r':
- builder.WriteByte('\r')
- case 't':
- builder.WriteByte('\t')
- case 'e':
- builder.WriteByte(0x1B)
- case 'u':
- x, err := hexToRune(token[i+1:len(token)-1], 4)
- if err != nil {
- return nil, nil, nil, err
- }
+ }
+ }
+ return -1
+}
- builder.WriteRune(x)
- i += 4
- case 'U':
- x, err := hexToRune(token[i+1:len(token)-1], 8)
- if err != nil {
- return nil, nil, nil, err
- }
+// parseBasicStringEscaped continues parsing a basic string that contains
+// escape sequences. i is the index of the first backslash.
+func (p *Parser) parseBasicStringEscaped(b []byte, i int) ([]byte, []byte, []byte, error) {
+ // Escape sequences only ever shrink, so the content length before
+ // unescaping is enough to never reallocate.
+ bufCap := len(b) - 1
+ if end := findBasicStringEnd(b, i); end >= 0 {
+ bufCap = end - 1
+ }
+ buf := make([]byte, i-1, bufCap)
+ copy(buf, b[1:i])
- builder.WriteRune(x)
- i += 8
- default:
- return nil, nil, nil, NewParserError(token[i:i+1], "invalid escaped character %#U", c)
+ for i < len(b) {
+ c := b[i]
+ switch {
+ case c == '"':
+ return b[:i+1], buf, b[i+1:], nil
+ case c == '\\':
+ i++
+ if i >= len(b) {
+ return nil, nil, nil, NewParserError(b[i-1:], `need a character after \`)
+ }
+ var err error
+ buf, i, err = unescape(buf, b, i)
+ if err != nil {
+ return nil, nil, nil, err
}
+ case c >= 0x20 && c < 0x7f:
+ buf = append(buf, c)
i++
- } else {
- size := characters.Utf8ValidNext(token[i:])
- if size == 0 {
- return nil, nil, nil, NewParserError(token[i:i+1], "invalid character %#U", c)
+ case c == '\t':
+ buf = append(buf, c)
+ i++
+ case c == '\n' || c == '\r':
+ return nil, nil, nil, NewParserError(b[i:i+1], "basic strings cannot have new lines")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "basic strings cannot have control characters")
+ default:
+ j, ok := scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in basic string")
}
- builder.Write(token[i : i+size])
- i += size
+ buf = append(buf, b[i:j]...)
+ i = j
}
}
-
- return token, builder.Bytes(), rest, nil
+ return nil, nil, nil, NewParserError(b[len(b):], "unterminated basic string")
}
-func hexToRune(b []byte, length int) (rune, error) {
- if len(b) < length {
- return -1, NewParserError(b, "unicode point needs %d character, not %d", length, len(b))
+// unescape processes one escape sequence. i is the index of the character
+// right after the backslash. It returns the updated buffer and index.
+func unescape(buf []byte, b []byte, i int) ([]byte, int, error) {
+ c := b[i]
+ switch c {
+ case '"':
+ return append(buf, '"'), i + 1, nil
+ case '\\':
+ return append(buf, '\\'), i + 1, nil
+ case 'b':
+ return append(buf, '\b'), i + 1, nil
+ case 'f':
+ return append(buf, '\f'), i + 1, nil
+ case 'n':
+ return append(buf, '\n'), i + 1, nil
+ case 'r':
+ return append(buf, '\r'), i + 1, nil
+ case 't':
+ return append(buf, '\t'), i + 1, nil
+ case 'e':
+ // TOML v1.1.0: \e is the escape character (U+001B).
+ return append(buf, 0x1B), i + 1, nil
+ case 'x':
+ // TOML v1.1.0: \xHH is a two-digit hexadecimal code point.
+ return unescapeUnicode(buf, b, i+1, 2)
+ case 'u':
+ return unescapeUnicode(buf, b, i+1, 4)
+ case 'U':
+ return unescapeUnicode(buf, b, i+1, 8)
+ default:
+ return nil, 0, NewParserError(b[i-1:i+1], "invalid escape character %#U", c)
}
- b = b[:length]
+}
+// unescapeUnicode handles \uXXXX and \UXXXXXXXX escape sequences. i is the
+// index of the first hex digit.
+func unescapeUnicode(buf []byte, b []byte, i int, n int) ([]byte, int, error) {
+ if i+n > len(b) {
+ return nil, 0, NewParserError(b[i-2:], "unicode escape sequence is too short")
+ }
var r uint32
- for i, c := range b {
+ for k := 0; k < n; k++ {
+ c := b[i+k]
var d uint32
switch {
- case '0' <= c && c <= '9':
+ case c >= '0' && c <= '9':
d = uint32(c - '0')
- case 'a' <= c && c <= 'f':
- d = uint32(c - 'a' + 10)
- case 'A' <= c && c <= 'F':
- d = uint32(c - 'A' + 10)
+ case c >= 'a' && c <= 'f':
+ d = uint32(c-'a') + 10
+ case c >= 'A' && c <= 'F':
+ d = uint32(c-'A') + 10
default:
- return -1, NewParserError(b[i:i+1], "non-hex character")
+ return nil, 0, NewParserError(b[i+k:i+k+1], "invalid hexadecimal digit in unicode escape sequence")
}
- r = r*16 + d
+ r = r<<4 | d
}
-
- if r > unicode.MaxRune || 0xD800 <= r && r < 0xE000 {
- return -1, NewParserError(b, "escape sequence is invalid Unicode code point")
+ if r > utf8.MaxRune || (r >= 0xD800 && r <= 0xDFFF) {
+ return nil, 0, NewParserError(b[i-2:i+n], "escape sequence is not a valid unicode code point")
}
-
- return rune(r), nil
+ return utf8.AppendRune(buf, rune(r)), i + n, nil
}
-func (p *Parser) parseWhitespace(b []byte) []byte {
- // ws = *wschar
- // wschar = %x20 ; Space
- // wschar =/ %x09 ; Horizontal tab
- _, rest := scanWhitespace(b)
-
- return rest
-}
-
-//nolint:cyclop
-func (p *Parser) parseIntOrFloatOrDateTime(b []byte) (reference, []byte, error) {
- switch b[0] {
- case 'i':
- if !scanFollowsInf(b) {
- return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'inf'")
- }
-
- return p.builder.Push(Node{
- Kind: Float,
- Data: b[:3],
- Raw: p.rangeOfToken(b[:3], b[3:]),
- }), b[3:], nil
- case 'n':
- if !scanFollowsNan(b) {
- return invalidReference, nil, NewParserError(atmost(b, 3), "expected 'nan'")
- }
-
- return p.builder.Push(Node{
- Kind: Float,
- Data: b[:3],
- Raw: p.rangeOfToken(b[:3], b[3:]),
- }), b[3:], nil
- case '+', '-':
- return p.scanIntOrFloat(b)
- }
-
- if len(b) < 3 {
- return p.scanIntOrFloat(b)
+// parseMultilineBasicString parses a multi-line basic string, starting at the
+// opening triple quote.
+func (p *Parser) parseMultilineBasicString(b []byte) ([]byte, []byte, []byte, error) {
+ i := 3
+ // trim the newline right after the opening delimiter
+ if i < len(b) && b[i] == '\n' {
+ i++
+ } else if i+1 < len(b) && b[i] == '\r' && b[i+1] == '\n' {
+ i += 2
}
+ contentStart := i
- s := 5
- if len(b) < s {
- s = len(b)
+ // First pass without allocating, until an escape sequence is found.
+ for i < len(b) {
+ c := b[i]
+ switch {
+ case c == '"':
+ j := i
+ for j < len(b) && b[j] == '"' {
+ j++
+ }
+ n := j - i
+ if n >= 3 {
+ if n > 5 {
+ return nil, nil, nil, NewParserError(b[i:j], "too many quotes at the end of a multiline basic string")
+ }
+ contentEnd := i + n - 3
+ return b[:j], b[contentStart:contentEnd], b[j:], nil
+ }
+ i = j
+ case c == '\\':
+ return p.parseMultilineBasicStringEscaped(b, contentStart, i)
+ case c >= 0x20 && c < 0x7f:
+ i++
+ case c == '\t' || c == '\n':
+ i++
+ case c == '\r':
+ if i+1 < len(b) && b[i+1] == '\n' {
+ i += 2
+ continue
+ }
+ return nil, nil, nil, NewParserError(b[i:i+1], "carriage returns must be followed by a newline character")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "multiline basic strings cannot have control characters")
+ default:
+ var ok bool
+ i, ok = scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in multiline basic string")
+ }
+ }
}
+ return nil, nil, nil, NewParserError(b[len(b):], `multiline basic string not terminated by """`)
+}
- for idx, c := range b[:s] {
- if isDigit(c) {
+// findMultilineBasicStringEnd returns the index of the first quote of the
+// run of quotes closing a multi-line basic string, or -1 if the string is
+// not terminated. It does not validate the content: it only skips over
+// escape sequences so that escaped quotes do not terminate the string.
+func findMultilineBasicStringEnd(b []byte, i int) int {
+ for {
+ j := bytes.IndexAny(b[i:], "\"\\")
+ if j < 0 {
+ return -1
+ }
+ i += j
+ if b[i] == '\\' {
+ i += 2
+ if i > len(b) {
+ return -1
+ }
continue
}
-
- if idx == 2 && c == ':' || (idx == 4 && c == '-') {
- return p.scanDateTime(b)
+ j = i
+ for j < len(b) && b[j] == '"' {
+ j++
}
-
- break
+ if j-i >= 3 {
+ return i
+ }
+ i = j
}
-
- return p.scanIntOrFloat(b)
}
-func (p *Parser) scanDateTime(b []byte) (reference, []byte, error) {
- // scans for contiguous characters in [0-9T:Z.+-], and up to one space if
- // followed by a digit.
- hasDate := false
- hasTime := false
- hasTz := false
- seenSpace := false
+// parseMultilineBasicStringEscaped continues parsing a multi-line basic
+// string that contains escape sequences. i is the index of the first
+// backslash; content starts at contentStart.
+func (p *Parser) parseMultilineBasicStringEscaped(b []byte, contentStart, i int) ([]byte, []byte, []byte, error) {
+ // Escape sequences only ever shrink, so the content length before
+ // unescaping is enough to never reallocate. The closing run of quotes
+ // can lend up to two quotes to the content.
+ bufCap := len(b) - contentStart
+ if end := findMultilineBasicStringEnd(b, i); end >= 0 {
+ bufCap = end + 2 - contentStart
+ }
+ buf := make([]byte, i-contentStart, bufCap)
+ copy(buf, b[contentStart:i])
- i := 0
-byteLoop:
- for ; i < len(b); i++ {
+ for i < len(b) {
c := b[i]
-
switch {
- case isDigit(c):
- case c == '-':
- hasDate = true
- const minOffsetOfTz = 8
- if i >= minOffsetOfTz {
- hasTz = true
+ case c == '"':
+ j := i
+ for j < len(b) && b[j] == '"' {
+ j++
}
- case c == 'T' || c == 't' || c == ':' || c == '.':
- hasTime = true
- case c == '+' || c == 'Z' || c == 'z':
- hasTz = true
- case c == ' ':
- if !seenSpace && i+1 < len(b) && isDigit(b[i+1]) {
- i += 2
- // Avoid reaching past the end of the document in case the time
- // is malformed. See TestIssue585.
- if i >= len(b) {
- i--
+ n := j - i
+ if n >= 3 {
+ if n > 5 {
+ return nil, nil, nil, NewParserError(b[i:j], "too many quotes at the end of a multiline basic string")
}
- seenSpace = true
- hasTime = true
- } else {
- break byteLoop
+ buf = append(buf, b[i:i+n-3]...)
+ return b[:j], buf, b[j:], nil
+ }
+ buf = append(buf, b[i:j]...)
+ i = j
+ case c == '\\':
+ i++
+ if i >= len(b) {
+ return nil, nil, nil, NewParserError(b[i-1:], `need a character after \`)
+ }
+ // Escaped newline: backslash, optional whitespace, newline,
+ // then all following whitespace and newlines are trimmed.
+ if b[i] == ' ' || b[i] == '\t' || b[i] == '\n' || b[i] == '\r' {
+ j := i
+ for j < len(b) && (b[j] == ' ' || b[j] == '\t') {
+ j++
+ }
+ if j < len(b) && b[j] == '\r' {
+ j++
+ }
+ if j >= len(b) || b[j] != '\n' {
+ return nil, nil, nil, NewParserError(b[i-1:i+1], "invalid escape character %#U", b[i])
+ }
+ j++
+ for j < len(b) && (b[j] == ' ' || b[j] == '\t' || b[j] == '\n' || b[j] == '\r') {
+ // note: a lone \r not followed by \n will be caught on
+ // the next iteration of the outer loop.
+ if b[j] == '\r' {
+ if j+1 >= len(b) || b[j+1] != '\n' {
+ break
+ }
+ j++
+ }
+ j++
+ }
+ i = j
+ continue
}
+ var err error
+ buf, i, err = unescape(buf, b, i)
+ if err != nil {
+ return nil, nil, nil, err
+ }
+ case c >= 0x20 && c < 0x7f:
+ buf = append(buf, c)
+ i++
+ case c == '\t' || c == '\n':
+ buf = append(buf, c)
+ i++
+ case c == '\r':
+ if i+1 < len(b) && b[i+1] == '\n' {
+ buf = append(buf, '\r', '\n')
+ i += 2
+ continue
+ }
+ return nil, nil, nil, NewParserError(b[i:i+1], "carriage returns must be followed by a newline character")
+ case c < 0x80:
+ return nil, nil, nil, NewParserError(b[i:i+1], "multiline basic strings cannot have control characters")
default:
- break byteLoop
- }
- }
-
- var kind Kind
-
- if hasTime {
- if hasDate {
- if hasTz {
- kind = DateTime
- } else {
- kind = LocalDateTime
+ j, ok := scanUtf8Run(b, i)
+ if !ok {
+ return nil, nil, nil, NewParserError(b[i:i+1], "invalid UTF-8 character in multiline basic string")
}
- } else {
- kind = LocalTime
+ buf = append(buf, b[i:j]...)
+ i = j
}
- } else {
- kind = LocalDate
}
-
- return p.builder.Push(Node{
- Kind: kind,
- Data: b[:i],
- }), b[i:], nil
+ return nil, nil, nil, NewParserError(b[len(b):], `multiline basic string not terminated by """`)
}
-//nolint:funlen,gocognit,cyclop
-func (p *Parser) scanIntOrFloat(b []byte) (reference, []byte, error) {
- i := 0
-
- if len(b) > 2 && b[0] == '0' && b[1] != '.' && b[1] != 'e' && b[1] != 'E' {
- var isValidRune validRuneFn
-
- switch b[1] {
- case 'x':
- isValidRune = isValidHexRune
- case 'o':
- isValidRune = isValidOctalRune
- case 'b':
- isValidRune = isValidBinaryRune
- default:
- i++
- }
-
- if isValidRune != nil {
+// scanUtf8Run consumes a run of valid non-ASCII UTF-8 runes starting at
+// b[i]. It returns the index of the first byte after the run, and whether
+// the run was entirely valid. Processing whole runs amortizes the cost of
+// the call compared to validating rune by rune.
+func scanUtf8Run(b []byte, i int) (int, bool) {
+ for i < len(b) {
+ c := b[i]
+ switch {
+ case c < 0x80:
+ return i, true
+ case c < 0xC2:
+ return i, false
+ case c < 0xE0:
+ if i+1 >= len(b) || b[i+1]&0xC0 != 0x80 {
+ return i, false
+ }
i += 2
- for ; i < len(b); i++ {
- if !isValidRune(b[i]) {
- break
+ case c < 0xF0:
+ if i+2 >= len(b) || b[i+2]&0xC0 != 0x80 {
+ return i, false
+ }
+ b1 := b[i+1]
+ switch c {
+ case 0xE0:
+ if b1 < 0xA0 || b1 > 0xBF {
+ return i, false
+ }
+ case 0xED:
+ // exclude surrogates
+ if b1 < 0x80 || b1 > 0x9F {
+ return i, false
+ }
+ default:
+ if b1&0xC0 != 0x80 {
+ return i, false
}
}
- }
-
- return p.builder.Push(Node{
- Kind: Integer,
- Data: b[:i],
- Raw: p.rangeOfToken(b[:i], b[i:]),
- }), b[i:], nil
- }
-
- isFloat := false
-
- for ; i < len(b); i++ {
- c := b[i]
-
- if c >= '0' && c <= '9' || c == '+' || c == '-' || c == '_' {
- continue
- }
-
- if c == '.' || c == 'e' || c == 'E' {
- isFloat = true
-
- continue
- }
-
- if c == 'i' {
- if scanFollowsInf(b[i:]) {
- return p.builder.Push(Node{
- Kind: Float,
- Data: b[:i+3],
- Raw: p.rangeOfToken(b[:i+3], b[i+3:]),
- }), b[i+3:], nil
+ i += 3
+ case c < 0xF5:
+ if i+3 >= len(b) || b[i+2]&0xC0 != 0x80 || b[i+3]&0xC0 != 0x80 {
+ return i, false
}
-
- return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'i' while scanning for a number")
- }
-
- if c == 'n' {
- if scanFollowsNan(b[i:]) {
- return p.builder.Push(Node{
- Kind: Float,
- Data: b[:i+3],
- Raw: p.rangeOfToken(b[:i+3], b[i+3:]),
- }), b[i+3:], nil
+ b1 := b[i+1]
+ switch c {
+ case 0xF0:
+ if b1 < 0x90 || b1 > 0xBF {
+ return i, false
+ }
+ case 0xF4:
+ if b1 < 0x80 || b1 > 0x8F {
+ return i, false
+ }
+ default:
+ if b1&0xC0 != 0x80 {
+ return i, false
+ }
}
-
- return invalidReference, nil, NewParserError(b[i:i+1], "unexpected character 'n' while scanning for a number")
+ i += 4
+ default:
+ return i, false
}
-
- break
}
-
- if i == 0 {
- return invalidReference, b, NewParserError(b, "incomplete number")
- }
-
- kind := Integer
-
- if isFloat {
- kind = Float
- }
-
- return p.builder.Push(Node{
- Kind: kind,
- Data: b[:i],
- Raw: p.rangeOfToken(b[:i], b[i:]),
- }), b[i:], nil
-}
-
-func isDigit(r byte) bool {
- return r >= '0' && r <= '9'
-}
-
-type validRuneFn func(r byte) bool
-
-func isValidHexRune(r byte) bool {
- return r >= 'a' && r <= 'f' ||
- r >= 'A' && r <= 'F' ||
- r >= '0' && r <= '9' ||
- r == '_'
-}
-
-func isValidOctalRune(r byte) bool {
- return r >= '0' && r <= '7' || r == '_'
-}
-
-func isValidBinaryRune(r byte) bool {
- return r == '0' || r == '1' || r == '_'
-}
-
-func expect(x byte, b []byte) ([]byte, error) {
- if len(b) == 0 {
- return nil, NewParserError(b, "expected character %c but the document ended here", x)
- }
-
- if b[0] != x {
- return nil, NewParserError(b[0:1], "expected character %c", x)
- }
-
- return b[1:], nil
+ return i, true
}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go b/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go
deleted file mode 100644
index 0512181d287a..000000000000
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/scanner.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package unstable
-
-import "github.com/pelletier/go-toml/v2/internal/characters"
-
-func scanFollows(b []byte, pattern string) bool {
- n := len(pattern)
-
- return len(b) >= n && string(b[:n]) == pattern
-}
-
-func scanFollowsMultilineBasicStringDelimiter(b []byte) bool {
- return scanFollows(b, `"""`)
-}
-
-func scanFollowsMultilineLiteralStringDelimiter(b []byte) bool {
- return scanFollows(b, `'''`)
-}
-
-func scanFollowsTrue(b []byte) bool {
- return scanFollows(b, `true`)
-}
-
-func scanFollowsFalse(b []byte) bool {
- return scanFollows(b, `false`)
-}
-
-func scanFollowsInf(b []byte) bool {
- return scanFollows(b, `inf`)
-}
-
-func scanFollowsNan(b []byte) bool {
- return scanFollows(b, `nan`)
-}
-
-func scanUnquotedKey(b []byte) ([]byte, []byte) {
- // unquoted-key = 1*( ALPHA / DIGIT / %x2D / %x5F ) ; A-Z / a-z / 0-9 / - / _
- for i := 0; i < len(b); i++ {
- if !isUnquotedKeyChar(b[i]) {
- return b[:i], b[i:]
- }
- }
-
- return b, b[len(b):]
-}
-
-func isUnquotedKeyChar(r byte) bool {
- return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '-' || r == '_'
-}
-
-func scanLiteralString(b []byte) ([]byte, []byte, error) {
- // literal-string = apostrophe *literal-char apostrophe
- // apostrophe = %x27 ; ' apostrophe
- // literal-char = %x09 / %x20-26 / %x28-7E / non-ascii
- for i := 1; i < len(b); {
- switch b[i] {
- case '\'':
- return b[:i+1], b[i+1:], nil
- case '\n', '\r':
- return nil, nil, NewParserError(b[i:i+1], "literal strings cannot have new lines")
- }
- size := characters.Utf8ValidNext(b[i:])
- if size == 0 {
- return nil, nil, NewParserError(b[i:i+1], "invalid character")
- }
- i += size
- }
-
- return nil, nil, NewParserError(b[len(b):], "unterminated literal string")
-}
-
-func scanMultilineLiteralString(b []byte) ([]byte, []byte, error) {
- // ml-literal-string = ml-literal-string-delim [ newline ] ml-literal-body
- // ml-literal-string-delim
- // ml-literal-string-delim = 3apostrophe
- // ml-literal-body = *mll-content *( mll-quotes 1*mll-content ) [ mll-quotes ]
- //
- // mll-content = mll-char / newline
- // mll-char = %x09 / %x20-26 / %x28-7E / non-ascii
- // mll-quotes = 1*2apostrophe
- for i := 3; i < len(b); {
- switch b[i] {
- case '\'':
- if scanFollowsMultilineLiteralStringDelimiter(b[i:]) {
- i += 3
-
- // At that point we found 3 apostrophe, and i is the
- // index of the byte after the third one. The scanner
- // needs to be eager, because there can be an extra 2
- // apostrophe that can be accepted at the end of the
- // string.
-
- if i >= len(b) || b[i] != '\'' {
- return b[:i], b[i:], nil
- }
- i++
-
- if i >= len(b) || b[i] != '\'' {
- return b[:i], b[i:], nil
- }
- i++
-
- if i < len(b) && b[i] == '\'' {
- return nil, nil, NewParserError(b[i-3:i+1], "''' not allowed in multiline literal string")
- }
-
- return b[:i], b[i:], nil
- }
- case '\r':
- if len(b) < i+2 {
- return nil, nil, NewParserError(b[len(b):], `need a \n after \r`)
- }
- if b[i+1] != '\n' {
- return nil, nil, NewParserError(b[i:i+2], `need a \n after \r`)
- }
- i += 2 // skip the \n
- continue
- }
- size := characters.Utf8ValidNext(b[i:])
- if size == 0 {
- return nil, nil, NewParserError(b[i:i+1], "invalid character")
- }
- i += size
- }
-
- return nil, nil, NewParserError(b[len(b):], `multiline literal string not terminated by '''`)
-}
-
-func scanWindowsNewline(b []byte) ([]byte, []byte, error) {
- const lenCRLF = 2
- if len(b) < lenCRLF {
- return nil, nil, NewParserError(b, "windows new line expected")
- }
-
- if b[1] != '\n' {
- return nil, nil, NewParserError(b, `windows new line should be \r\n`)
- }
-
- return b[:lenCRLF], b[lenCRLF:], nil
-}
-
-func scanWhitespace(b []byte) ([]byte, []byte) {
- for i := 0; i < len(b); i++ {
- switch b[i] {
- case ' ', '\t':
- continue
- default:
- return b[:i], b[i:]
- }
- }
-
- return b, b[len(b):]
-}
-
-func scanComment(b []byte) ([]byte, []byte, error) {
- // comment-start-symbol = %x23 ; #
- // non-ascii = %x80-D7FF / %xE000-10FFFF
- // non-eol = %x09 / %x20-7F / non-ascii
- //
- // comment = comment-start-symbol *non-eol
-
- for i := 1; i < len(b); {
- if b[i] == '\n' {
- return b[:i], b[i:], nil
- }
- if b[i] == '\r' {
- if i+1 < len(b) && b[i+1] == '\n' {
- return b[:i+1], b[i+1:], nil
- }
- return nil, nil, NewParserError(b[i:i+1], "invalid character in comment")
- }
- size := characters.Utf8ValidNext(b[i:])
- if size == 0 {
- return nil, nil, NewParserError(b[i:i+1], "invalid character in comment")
- }
-
- i += size
- }
-
- return b, b[len(b):], nil
-}
-
-func scanBasicString(b []byte) ([]byte, bool, []byte, error) {
- // basic-string = quotation-mark *basic-char quotation-mark
- // quotation-mark = %x22 ; "
- // basic-char = basic-unescaped / escaped
- // basic-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii
- // escaped = escape escape-seq-char
- escaped := false
- i := 1
-
- for ; i < len(b); i++ {
- switch b[i] {
- case '"':
- return b[:i+1], escaped, b[i+1:], nil
- case '\n', '\r':
- return nil, escaped, nil, NewParserError(b[i:i+1], "basic strings cannot have new lines")
- case '\\':
- if len(b) < i+2 {
- return nil, escaped, nil, NewParserError(b[i:i+1], "need a character after \\")
- }
- escaped = true
- i++ // skip the next character
- }
- }
-
- return nil, escaped, nil, NewParserError(b[len(b):], `basic string not terminated by "`)
-}
-
-func scanMultilineBasicString(b []byte) ([]byte, bool, []byte, error) {
- // ml-basic-string = ml-basic-string-delim [ newline ] ml-basic-body
- // ml-basic-string-delim
- // ml-basic-string-delim = 3quotation-mark
- // ml-basic-body = *mlb-content *( mlb-quotes 1*mlb-content ) [ mlb-quotes ]
- //
- // mlb-content = mlb-char / newline / mlb-escaped-nl
- // mlb-char = mlb-unescaped / escaped
- // mlb-quotes = 1*2quotation-mark
- // mlb-unescaped = wschar / %x21 / %x23-5B / %x5D-7E / non-ascii
- // mlb-escaped-nl = escape ws newline *( wschar / newline )
-
- escaped := false
- i := 3
-
- for ; i < len(b); i++ {
- switch b[i] {
- case '"':
- if scanFollowsMultilineBasicStringDelimiter(b[i:]) {
- i += 3
-
- // At that point we found 3 apostrophe, and i is the
- // index of the byte after the third one. The scanner
- // needs to be eager, because there can be an extra 2
- // apostrophe that can be accepted at the end of the
- // string.
-
- if i >= len(b) || b[i] != '"' {
- return b[:i], escaped, b[i:], nil
- }
- i++
-
- if i >= len(b) || b[i] != '"' {
- return b[:i], escaped, b[i:], nil
- }
- i++
-
- if i < len(b) && b[i] == '"' {
- return nil, escaped, nil, NewParserError(b[i-3:i+1], `""" not allowed in multiline basic string`)
- }
-
- return b[:i], escaped, b[i:], nil
- }
- case '\\':
- if len(b) < i+2 {
- return nil, escaped, nil, NewParserError(b[len(b):], "need a character after \\")
- }
- escaped = true
- i++ // skip the next character
- case '\r':
- if len(b) < i+2 {
- return nil, escaped, nil, NewParserError(b[len(b):], `need a \n after \r`)
- }
- if b[i+1] != '\n' {
- return nil, escaped, nil, NewParserError(b[i:i+2], `need a \n after \r`)
- }
- i++ // skip the \n
- }
- }
-
- return nil, escaped, nil, NewParserError(b[len(b):], `multiline basic string not terminated by """`)
-}
diff --git a/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go b/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go
index 5a79da88e866..c84c90ccf254 100644
--- a/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go
+++ b/vendor/github.com/pelletier/go-toml/v2/unstable/unmarshaler.go
@@ -1,20 +1,26 @@
package unstable
-// Unmarshaler is implemented by types that can unmarshal a TOML
-// description of themselves. The input is a valid TOML document
-// containing the relevant portion of the parsed document.
+// Unmarshaler is implemented by types that can unmarshal a TOML description
+// of themselves. The input is a valid TOML document containing the relevant
+// portion of the parsed document.
//
-// For tables (including split tables defined in multiple places),
-// the data contains the raw key-value bytes from the original document
-// with adjusted table headers to be relative to the unmarshaling target.
+// For tables (including split tables defined in multiple places), the data
+// contains the raw key-value bytes from the original document with adjusted
+// table headers to be relative to the unmarshaling target.
+//
+// When the decoding target itself implements this interface, it receives the
+// whole document — every top-level key-value as well as every table and array
+// table — assembled into a single valid TOML document and delivered once.
type Unmarshaler interface {
UnmarshalTOML(data []byte) error
}
-// RawMessage is a raw encoded TOML value. It implements Unmarshaler
-// and can be used to delay TOML decoding or capture raw content.
+// RawMessage is a raw encoded TOML value. It implements both Unmarshaler and
+// Marshaler and can be used to delay TOML decoding or capture raw content,
+// similar to json.RawMessage.
//
-// Example usage:
+// Decoding (requires Decoder.EnableUnmarshalerInterface) captures the raw TOML
+// bytes for the target without decoding them:
//
// type Config struct {
// Plugin RawMessage `toml:"plugin"`
@@ -23,10 +29,15 @@ type Unmarshaler interface {
// var cfg Config
// toml.NewDecoder(r).EnableUnmarshalerInterface().Decode(&cfg)
// // cfg.Plugin now contains the raw TOML bytes for [plugin]
+//
+// Encoding (requires Encoder.EnableMarshalerInterface) splices the stored bytes
+// back into the document verbatim:
+//
+// toml.NewEncoder(w).EnableMarshalerInterface().Encode(cfg)
type RawMessage []byte
// UnmarshalTOML implements Unmarshaler.
func (m *RawMessage) UnmarshalTOML(data []byte) error {
- *m = append((*m)[0:0], data...)
+ *m = append((*m)[:0], data...)
return nil
}
diff --git a/vendor/github.com/tonistiigi/fsutil/tarwriter.go b/vendor/github.com/tonistiigi/fsutil/tarwriter.go
index 06b7bda9bec0..e27fb708ed23 100644
--- a/vendor/github.com/tonistiigi/fsutil/tarwriter.go
+++ b/vendor/github.com/tonistiigi/fsutil/tarwriter.go
@@ -15,7 +15,7 @@ import (
func WriteTar(ctx context.Context, fs FS, w io.Writer) error {
tw := tar.NewWriter(w)
- err := fs.Walk(ctx, "/", func(path string, entry os.DirEntry, err error) error {
+ err := fs.Walk(ctx, "", func(path string, entry os.DirEntry, err error) error {
if err != nil && !errors.Is(err, os.ErrNotExist) {
return err
}
@@ -33,6 +33,7 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) error {
return err
}
+ // Tar paths use slash separators on the wire.
name := filepath.ToSlash(path)
if fi.IsDir() && !strings.HasSuffix(name, "/") {
name += "/"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
index e8ce5978a72c..7ba1b654f8d8 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go
index b8b836b00fb1..353e288bb69b 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go
@@ -8,4 +8,4 @@ Use [NewClientHandler] with [grpc.WithStatsHandler] to instrument a gRPC client.
Use [NewServerHandler] with [grpc.StatsHandler] to instrument a gRPC server.
*/
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
index 7bab8da8fa78..c8065028e9c6 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
@@ -1,21 +1,62 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
// gRPC tracing middleware
// https://opentelemetry.io/docs/specs/semconv/rpc/
import (
"net"
+ "net/url"
"strconv"
+ "strings"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
grpc_codes "google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
+// serverAddrAttrsFromCanonicalTarget extracts server address attributes from a
+// canonical gRPC target as returned by [google.golang.org/grpc.ClientConn.CanonicalTarget].
+// Canonical targets always have the form "scheme://[authority]/endpoint", e.g.:
+//
+// passthrough:///127.0.0.1:7777 → ServerAddress("127.0.0.1"), ServerPort(7777)
+// dns:///example.com:443 → ServerAddress("example.com"), ServerPort(443)
+// dns://authority/example.com:443 → ServerAddress("example.com"), ServerPort(443)
+// unix:///tmp/grpc.sock → ServerAddress("/tmp/grpc.sock")
+func serverAddrAttrsFromCanonicalTarget(target string) []attribute.KeyValue {
+ // Fast path: confirmed host:port with numeric port, no scheme involved.
+ if h, pStr, err := net.SplitHostPort(target); err == nil {
+ if p, err := strconv.Atoi(pStr); err == nil {
+ return []attribute.KeyValue{
+ semconv.ServerAddress(h),
+ semconv.ServerPort(p),
+ }
+ }
+ }
+ // gRPC URI: scheme://authority/endpoint → endpoint in Path
+ // scheme:endpoint → endpoint in Opaque
+ u, err := url.Parse(target)
+ if err != nil {
+ return []attribute.KeyValue{semconv.ServerAddress(target)}
+ }
+ ep := u.Path
+ if u.Scheme != "unix" && u.Scheme != "unix-abstract" {
+ // Strip the leading "/" added by url.Parse for hierarchical URIs;
+ // preserve it for unix socket paths where the slash is meaningful.
+ ep = strings.TrimPrefix(ep, "/")
+ }
+ if ep == "" {
+ ep = u.Opaque
+ }
+ if ep != "" {
+ return serverAddrAttrs(ep)
+ }
+ return []attribute.KeyValue{semconv.ServerAddress(target)}
+}
+
// serverAddrAttrs returns the server address attributes for the hostport.
func serverAddrAttrs(hostport string) []attribute.KeyValue {
h, pStr, err := net.SplitHostPort(hostport)
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
index b62f7cd7c468..7a3083f3cadb 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
import (
"google.golang.org/grpc"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
index 97616c5359b1..aa4bbfa4ac79 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
@@ -2,14 +2,14 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionality for the otelgrpc package.
-package internal // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal"
+package internal
import (
"strings"
"go.opentelemetry.io/otel/attribute"
oldsemconv "go.opentelemetry.io/otel/semconv/v1.37.0" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
// ParseFullMethod returns a span name following the OpenTelemetry semantic
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
index 4c62341d6641..6651e8bd8049 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
index f8d254df3237..1d0fc0622626 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
import (
"context"
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
oldrpcconv "go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv" //nolint:depguard // Use of v1.37.0 is required for backward compatibility stability opt-in.
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/rpcconv"
"go.opentelemetry.io/otel/trace"
grpc_codes "google.golang.org/grpc/codes"
@@ -26,6 +26,11 @@ import (
type gRPCContextKey struct{}
+// dialTargetContextKey carries the dial target seeded by client interceptors
+// so the stats handler can use the hostname for server.address instead of the
+// post-DNS IP from RemoteAddr.
+type dialTargetContextKey struct{}
+
type gRPCContext struct {
metricAttrs []attribute.KeyValue
record bool
@@ -328,6 +333,20 @@ func (*config) handleRPC(
switch rs := rs.(type) {
case *stats.Begin:
+ // Set server.address early from the dial target when available (upcoming
+ // interceptors will seed this). Covers both success and failure paths since Begin
+ // fires on every RPC regardless of outcome.
+ if rs.Client {
+ if target, ok := ctx.Value(dialTargetContextKey{}).(string); ok && target != "" {
+ attrs := serverAddrAttrsFromCanonicalTarget(target)
+ if span.IsRecording() {
+ span.SetAttributes(attrs...)
+ }
+ if gctx != nil {
+ gctx.metricAttrs = append(gctx.metricAttrs, attrs...)
+ }
+ }
+ }
case *stats.InPayload:
case *stats.InHeader:
if !rs.Client && rs.LocalAddr != nil {
@@ -339,13 +358,18 @@ func (*config) handleRPC(
case *stats.OutPayload:
case *stats.OutTrailer:
case *stats.OutHeader:
+ // Only use the resolved IP from RemoteAddr when no dial target was seeded
+ // (i.e. NewClientHandler callers without interceptors). When dialTargetContextKey
+ // is present, Begin already set server.address to the hostname.
if rs.Client && rs.RemoteAddr != nil && (span.IsRecording() || gctx != nil) {
- attrs := serverAddrAttrs(rs.RemoteAddr.String())
- if span.IsRecording() {
- span.SetAttributes(attrs...)
- }
- if gctx != nil {
- gctx.metricAttrs = append(gctx.metricAttrs, attrs...)
+ if target, ok := ctx.Value(dialTargetContextKey{}).(string); !ok || target == "" {
+ attrs := serverAddrAttrs(rs.RemoteAddr.String())
+ if span.IsRecording() {
+ span.SetAttributes(attrs...)
+ }
+ if gctx != nil {
+ gctx.metricAttrs = append(gctx.metricAttrs, attrs...)
+ }
}
}
case *stats.End:
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
index 1f5996cc06fa..23fda6f503bc 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+package otelgrpc
// Version is the current release version of the gRPC instrumentation.
-const Version = "0.69.0"
+const Version = "0.70.0"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/api.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/api.go
index 71c528e5b506..3016ee6a9ed3 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/api.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/api.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
+package otelhttptrace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go
index 2ad6c7cc884c..f7f15251075f 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/clienttrace.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
+package otelhttptrace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go
index 549494192a27..dc306b1b26c6 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/httptrace.go
@@ -3,7 +3,7 @@
// Package otelhttptrace provides instrumentation for the [net/http/httptrace]
// package.
-package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
+package otelhttptrace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go
index d88cd079d14d..c275b5f0514c 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/client.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/client.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/client.go.tmpl
+
// Package semconv provides OpenTelemetry semantic convention types and
// functionality.
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv"
+package semconv
import (
"context"
@@ -20,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/httpconv"
)
type HTTPClient struct {
@@ -45,7 +45,7 @@ func NewHTTPClient(meter metric.Meter) HTTPClient {
return client
}
-func (n HTTPClient) Status(code int) (codes.Code, string) {
+func (HTTPClient) Status(code int) (codes.Code, string) {
if code < 100 || code >= 600 {
return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code)
}
@@ -120,9 +120,7 @@ func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue {
// Restore any username/password info that was removed.
req.URL.User = userinfo
}
- attrs = append(attrs, semconv.URLFull(u))
-
- attrs = append(attrs, semconv.ServerAddress(requestHost))
+ attrs = append(attrs, semconv.URLFull(u), semconv.ServerAddress(requestHost))
if eligiblePort > 0 {
attrs = append(attrs, semconv.ServerPort(eligiblePort))
}
@@ -138,11 +136,13 @@ func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue {
}
// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client.
-func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue {
+func (HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue {
/*
below attributes are returned:
- http.response.status_code
- error.type
+ - network.protocol.name (only when it is not "http")
+ - network.protocol.version
*/
var count int
if resp.StatusCode > 0 {
@@ -153,6 +153,21 @@ func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue
count++
}
+ // The protocol version is only known for certain once the response
+ // arrives: req.Proto reflects what the caller asked for, but the
+ // transport may negotiate a different version (for example HTTP/2 via
+ // ALPN). Report resp.Proto here so it overrides the request-time value
+ // on the span. As in RequestTraceAttrs, network.protocol.name is omitted
+ // when it is "http": the spec only requires it when the name differs from
+ // the protocol implied by http.request.method.
+ protoName, protoVersion := netProtocol(resp.Proto)
+ if protoName != "" && protoName != "http" {
+ count++
+ }
+ if protoVersion != "" {
+ count++
+ }
+
attrs := make([]attribute.KeyValue, 0, count)
if resp.StatusCode > 0 {
attrs = append(attrs, semconv.HTTPResponseStatusCode(resp.StatusCode))
@@ -162,10 +177,17 @@ func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue
errorType := strconv.Itoa(resp.StatusCode)
attrs = append(attrs, semconv.ErrorTypeKey.String(errorType))
}
+
+ if protoName != "" && protoName != "http" {
+ attrs = append(attrs, semconv.NetworkProtocolName(protoName))
+ }
+ if protoVersion != "" {
+ attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion))
+ }
return attrs
}
-func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {
+func (HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
@@ -180,7 +202,7 @@ func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValu
return semconv.HTTPRequestMethodOther, orig
}
-func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {
+func (n HTTPClient) MetricAttributes(req *http.Request, resp *http.Response, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {
num := len(additionalAttributes) + 2
var h string
if req.URL != nil {
@@ -200,7 +222,14 @@ func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, addition
num++
}
- protoName, protoVersion := netProtocol(req.Proto)
+ // Prefer the negotiated protocol reported on the response: req.Proto is
+ // only what the caller asked for, and the transport may have upgraded
+ // the connection (for example HTTP/2 via ALPN).
+ proto := req.Proto
+ if resp != nil && resp.Proto != "" {
+ proto = resp.Proto
+ }
+ protoName, protoVersion := netProtocol(proto)
if protoName != "" {
num++
}
@@ -213,7 +242,8 @@ func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, addition
}
attributes := slices.Grow(additionalAttributes, num)
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)),
semconv.ServerAddress(requestHost),
n.scheme(req),
@@ -249,7 +279,7 @@ func (o MetricOpts) AddOptions() metric.AddOption {
}
func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
- attributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes)
+ attributes := n.MetricAttributes(ma.Req, ma.Resp, ma.StatusCode, ma.AdditionalAttributes)
if ma.StatusCode == 0 && ma.Err != nil {
attributes = append(attributes, n.ErrorType(ma.Err))
}
@@ -269,12 +299,12 @@ func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
// type per failure keeps attribute cardinality bounded, as required by the
// OTel spec (error.type SHOULD have low cardinality). Callers that need
// finer-grained error distinctions should inspect the error themselves.
-func (n HTTPClient) ErrorType(err error) attribute.KeyValue {
+func (HTTPClient) ErrorType(err error) attribute.KeyValue {
t := reflect.TypeOf(err)
if t == nil {
return semconv.ErrorTypeOther
}
- if t.Kind() == reflect.Ptr {
+ if t.Kind() == reflect.Pointer {
t = t.Elem()
}
var value string
@@ -307,13 +337,13 @@ func (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts Metri
}
// TraceAttributes returns attributes for httptrace.
-func (n HTTPClient) TraceAttributes(host string) []attribute.KeyValue {
+func (HTTPClient) TraceAttributes(host string) []attribute.KeyValue {
return []attribute.KeyValue{
semconv.ServerAddress(host),
}
}
-func (n HTTPClient) scheme(req *http.Request) attribute.KeyValue {
+func (HTTPClient) scheme(req *http.Request) attribute.KeyValue {
if req.URL != nil && req.URL.Scheme != "" {
return semconv.URLScheme(req.URL.Scheme)
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go
index d6aed214ef9d..15dd693375cc 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/gen.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv"
+package semconv
// Generate semconv package:
//go:generate gotmpl --body=../../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace\" }" --out=bench_test.go
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go
index a50124078d34..35e744e41d23 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/server.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/server.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/server.go.tmpl
+
// Package semconv provides OpenTelemetry semantic convention types and
// functionality.
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv"
+package semconv
import (
"context"
@@ -20,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/httpconv"
)
type RequestTraceAttrsOpts struct {
@@ -67,7 +67,7 @@ func NewHTTPServer(meter metric.Meter) HTTPServer {
// Status returns a span status code and message for an HTTP status code
// value returned by a server. Status codes in the 400-499 range are not
// returned as errors.
-func (n HTTPServer) Status(code int) (codes.Code, string) {
+func (HTTPServer) Status(code int) (codes.Code, string) {
if code < 100 || code >= 600 {
return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code)
}
@@ -168,7 +168,8 @@ func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts Req
}
attrs := make([]attribute.KeyValue, 0, count)
- attrs = append(attrs,
+ attrs = append(
+ attrs,
semconv.ServerAddress(host),
method,
scheme,
@@ -216,7 +217,7 @@ func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts Req
return attrs
}
-func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue {
+func (HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue {
attr := semconv.NetworkTransportPipe
switch network {
case "tcp", "tcp4", "tcp6":
@@ -239,7 +240,11 @@ type ServerMetricData struct {
}
type MetricAttributes struct {
- Req *http.Request
+ Req *http.Request
+ // Resp is the client response, if any. It is only consulted by
+ // HTTPClient.MetricAttributes to source the negotiated protocol version;
+ // server-side metric recording ignores it.
+ Resp *http.Response
StatusCode int
Route string
AdditionalAttributes []attribute.KeyValue
@@ -274,7 +279,7 @@ func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {
// It returns "{method} {route}" when the request has a pattern,
// or just "{method}" when no route is available.
// Non-standard HTTP methods are replaced by "HTTP".
-func (n HTTPServer) SpanName(r *http.Request) string {
+func (HTTPServer) SpanName(r *http.Request) string {
method := strings.ToUpper(r.Method)
if _, ok := methodLookup[method]; !ok {
method = "HTTP"
@@ -287,7 +292,7 @@ func (n HTTPServer) SpanName(r *http.Request) string {
return method
}
-func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {
+func (HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
@@ -314,7 +319,7 @@ func (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // i
//
// If any of the fields in the ResponseTelemetry are not set the attribute will
// be omitted.
-func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue {
+func (HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue {
var count int
if resp.ReadBytes > 0 {
@@ -330,17 +335,20 @@ func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyVa
attributes := make([]attribute.KeyValue, 0, count)
if resp.ReadBytes > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPRequestBodySize(int(resp.ReadBytes)),
)
}
if resp.WriteBytes > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPResponseBodySize(int(resp.WriteBytes)),
)
}
if resp.StatusCode > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPResponseStatusCode(resp.StatusCode),
)
}
@@ -349,7 +357,7 @@ func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyVa
}
// Route returns the attribute for the route.
-func (n HTTPServer) Route(route string) attribute.KeyValue {
+func (HTTPServer) Route(route string) attribute.KeyValue {
return semconv.HTTPRoute(route)
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go
index 88b67003cc7f..0de0bd83c458 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv/util.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/util.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/util.go.tmpl
+
+package semconv
import (
"net"
@@ -15,7 +15,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconvNew "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconvNew "go.opentelemetry.io/otel/semconv/v1.43.0"
)
// SplitHostPort splits a network address hostport of the form "host",
@@ -32,29 +32,29 @@ func SplitHostPort(hostport string) (host string, port int) {
addrEnd := strings.LastIndexByte(hostport, ']')
if addrEnd < 0 {
// Invalid hostport.
- return
+ return host, port
}
if i := strings.LastIndexByte(hostport[addrEnd:], ':'); i < 0 {
host = hostport[1:addrEnd]
- return
+ return host, port
}
} else {
if i := strings.LastIndexByte(hostport, ':'); i < 0 {
host = hostport
- return
+ return host, port
}
}
host, pStr, err := net.SplitHostPort(hostport)
if err != nil {
- return
+ return host, port
}
p, err := strconv.ParseUint(pStr, 10, 16)
if err != nil {
- return
+ return host, port
}
- return host, int(p) //nolint:gosec // Byte size checked 16 above.
+ return host, int(p)
}
func requiredHTTPPort(https bool, port int) int { //nolint:revive // ignore linter
@@ -84,7 +84,7 @@ func httpRoute(pattern string) string {
return ""
}
-func netProtocol(proto string) (name string, version string) {
+func netProtocol(proto string) (name, version string) {
name, version, _ = strings.Cut(proto, "/")
switch name {
case "HTTP":
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go
index f38ce8da3741..5a98937f14bd 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/version.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttptrace // import "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
+package otelhttptrace
// Version is the current release version of the httptrace instrumentation.
-const Version = "0.69.0"
+const Version = "0.70.0"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
index 3ae082434417..733b75dca754 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"net/http"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
index a7d4b2a815c6..08ba0778f6d1 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go
index 1c9aa3ff4253..09a2103fe46a 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go
@@ -3,4 +3,4 @@
// Package otelhttp provides an http.Handler and functions that are intended
// to be used to add tracing by wrapping existing handlers.
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
index 204588b849a3..844363a09089 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"net/http"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go
index d032aa841b38..aeff4160467d 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/request/body_wrapper.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/request/body_wrapper.go.tmpl
+
// Package request provides types and functionality to handle HTTP request
// handling.
-package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request"
+package request
import (
"io"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go
index 9e00dd2fcefe..98f7bdbfcfda 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request"
+package request
// Generate request package:
//go:generate gotmpl --body=../../../../../../internal/shared/request/body_wrapper.go.tmpl "--data={}" --out=body_wrapper.go
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go
index f29f9b7c962a..6b523cb74fee 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/request/resp_writer_wrapper.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/request/resp_writer_wrapper.go.tmpl
+
+package request
import (
"net/http"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
index 0241b08e8566..c275b5f0514c 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/client.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/client.go.tmpl
+
// Package semconv provides OpenTelemetry semantic convention types and
// functionality.
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv"
+package semconv
import (
"context"
@@ -20,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/httpconv"
)
type HTTPClient struct {
@@ -45,7 +45,7 @@ func NewHTTPClient(meter metric.Meter) HTTPClient {
return client
}
-func (n HTTPClient) Status(code int) (codes.Code, string) {
+func (HTTPClient) Status(code int) (codes.Code, string) {
if code < 100 || code >= 600 {
return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code)
}
@@ -120,9 +120,7 @@ func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue {
// Restore any username/password info that was removed.
req.URL.User = userinfo
}
- attrs = append(attrs, semconv.URLFull(u))
-
- attrs = append(attrs, semconv.ServerAddress(requestHost))
+ attrs = append(attrs, semconv.URLFull(u), semconv.ServerAddress(requestHost))
if eligiblePort > 0 {
attrs = append(attrs, semconv.ServerPort(eligiblePort))
}
@@ -138,11 +136,13 @@ func (n HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue {
}
// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client.
-func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue {
+func (HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue {
/*
below attributes are returned:
- http.response.status_code
- error.type
+ - network.protocol.name (only when it is not "http")
+ - network.protocol.version
*/
var count int
if resp.StatusCode > 0 {
@@ -153,6 +153,21 @@ func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue
count++
}
+ // The protocol version is only known for certain once the response
+ // arrives: req.Proto reflects what the caller asked for, but the
+ // transport may negotiate a different version (for example HTTP/2 via
+ // ALPN). Report resp.Proto here so it overrides the request-time value
+ // on the span. As in RequestTraceAttrs, network.protocol.name is omitted
+ // when it is "http": the spec only requires it when the name differs from
+ // the protocol implied by http.request.method.
+ protoName, protoVersion := netProtocol(resp.Proto)
+ if protoName != "" && protoName != "http" {
+ count++
+ }
+ if protoVersion != "" {
+ count++
+ }
+
attrs := make([]attribute.KeyValue, 0, count)
if resp.StatusCode > 0 {
attrs = append(attrs, semconv.HTTPResponseStatusCode(resp.StatusCode))
@@ -162,10 +177,17 @@ func (n HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue
errorType := strconv.Itoa(resp.StatusCode)
attrs = append(attrs, semconv.ErrorTypeKey.String(errorType))
}
+
+ if protoName != "" && protoName != "http" {
+ attrs = append(attrs, semconv.NetworkProtocolName(protoName))
+ }
+ if protoVersion != "" {
+ attrs = append(attrs, semconv.NetworkProtocolVersion(protoVersion))
+ }
return attrs
}
-func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {
+func (HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
@@ -180,7 +202,7 @@ func (n HTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValu
return semconv.HTTPRequestMethodOther, orig
}
-func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {
+func (n HTTPClient) MetricAttributes(req *http.Request, resp *http.Response, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue {
num := len(additionalAttributes) + 2
var h string
if req.URL != nil {
@@ -200,7 +222,14 @@ func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, addition
num++
}
- protoName, protoVersion := netProtocol(req.Proto)
+ // Prefer the negotiated protocol reported on the response: req.Proto is
+ // only what the caller asked for, and the transport may have upgraded
+ // the connection (for example HTTP/2 via ALPN).
+ proto := req.Proto
+ if resp != nil && resp.Proto != "" {
+ proto = resp.Proto
+ }
+ protoName, protoVersion := netProtocol(proto)
if protoName != "" {
num++
}
@@ -213,7 +242,8 @@ func (n HTTPClient) MetricAttributes(req *http.Request, statusCode int, addition
}
attributes := slices.Grow(additionalAttributes, num)
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)),
semconv.ServerAddress(requestHost),
n.scheme(req),
@@ -249,7 +279,7 @@ func (o MetricOpts) AddOptions() metric.AddOption {
}
func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
- attributes := n.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes)
+ attributes := n.MetricAttributes(ma.Req, ma.Resp, ma.StatusCode, ma.AdditionalAttributes)
if ma.StatusCode == 0 && ma.Err != nil {
attributes = append(attributes, n.ErrorType(ma.Err))
}
@@ -269,12 +299,12 @@ func (n HTTPClient) MetricOptions(ma MetricAttributes) MetricOpts {
// type per failure keeps attribute cardinality bounded, as required by the
// OTel spec (error.type SHOULD have low cardinality). Callers that need
// finer-grained error distinctions should inspect the error themselves.
-func (n HTTPClient) ErrorType(err error) attribute.KeyValue {
+func (HTTPClient) ErrorType(err error) attribute.KeyValue {
t := reflect.TypeOf(err)
if t == nil {
return semconv.ErrorTypeOther
}
- if t.Kind() == reflect.Ptr {
+ if t.Kind() == reflect.Pointer {
t = t.Elem()
}
var value string
@@ -307,13 +337,13 @@ func (n HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts Metri
}
// TraceAttributes returns attributes for httptrace.
-func (n HTTPClient) TraceAttributes(host string) []attribute.KeyValue {
+func (HTTPClient) TraceAttributes(host string) []attribute.KeyValue {
return []attribute.KeyValue{
semconv.ServerAddress(host),
}
}
-func (n HTTPClient) scheme(req *http.Request) attribute.KeyValue {
+func (HTTPClient) scheme(req *http.Request) attribute.KeyValue {
if req.URL != nil && req.URL.Scheme != "" {
return semconv.URLScheme(req.URL.Scheme)
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go
index a8a0d58df354..fbcd4f6b230e 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv"
+package semconv
// Generate semconv package:
//go:generate gotmpl --body=../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=bench_test.go
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
index 8e0430863d92..35e744e41d23 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/server.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/server.go.tmpl
+
// Package semconv provides OpenTelemetry semantic convention types and
// functionality.
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv"
+package semconv
import (
"context"
@@ -20,8 +20,8 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
- "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/httpconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/httpconv"
)
type RequestTraceAttrsOpts struct {
@@ -67,7 +67,7 @@ func NewHTTPServer(meter metric.Meter) HTTPServer {
// Status returns a span status code and message for an HTTP status code
// value returned by a server. Status codes in the 400-499 range are not
// returned as errors.
-func (n HTTPServer) Status(code int) (codes.Code, string) {
+func (HTTPServer) Status(code int) (codes.Code, string) {
if code < 100 || code >= 600 {
return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code)
}
@@ -168,7 +168,8 @@ func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts Req
}
attrs := make([]attribute.KeyValue, 0, count)
- attrs = append(attrs,
+ attrs = append(
+ attrs,
semconv.ServerAddress(host),
method,
scheme,
@@ -216,7 +217,7 @@ func (n HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts Req
return attrs
}
-func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue {
+func (HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue {
attr := semconv.NetworkTransportPipe
switch network {
case "tcp", "tcp4", "tcp6":
@@ -239,7 +240,11 @@ type ServerMetricData struct {
}
type MetricAttributes struct {
- Req *http.Request
+ Req *http.Request
+ // Resp is the client response, if any. It is only consulted by
+ // HTTPClient.MetricAttributes to source the negotiated protocol version;
+ // server-side metric recording ignores it.
+ Resp *http.Response
StatusCode int
Route string
AdditionalAttributes []attribute.KeyValue
@@ -274,7 +279,7 @@ func (n HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) {
// It returns "{method} {route}" when the request has a pattern,
// or just "{method}" when no route is available.
// Non-standard HTTP methods are replaced by "HTTP".
-func (n HTTPServer) SpanName(r *http.Request) string {
+func (HTTPServer) SpanName(r *http.Request) string {
method := strings.ToUpper(r.Method)
if _, ok := methodLookup[method]; !ok {
method = "HTTP"
@@ -287,7 +292,7 @@ func (n HTTPServer) SpanName(r *http.Request) string {
return method
}
-func (n HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {
+func (HTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) {
if method == "" {
return semconv.HTTPRequestMethodOther, attribute.KeyValue{}
}
@@ -314,7 +319,7 @@ func (n HTTPServer) scheme(https bool) attribute.KeyValue { //nolint:revive // i
//
// If any of the fields in the ResponseTelemetry are not set the attribute will
// be omitted.
-func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue {
+func (HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue {
var count int
if resp.ReadBytes > 0 {
@@ -330,17 +335,20 @@ func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyVa
attributes := make([]attribute.KeyValue, 0, count)
if resp.ReadBytes > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPRequestBodySize(int(resp.ReadBytes)),
)
}
if resp.WriteBytes > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPResponseBodySize(int(resp.WriteBytes)),
)
}
if resp.StatusCode > 0 {
- attributes = append(attributes,
+ attributes = append(
+ attributes,
semconv.HTTPResponseStatusCode(resp.StatusCode),
)
}
@@ -349,7 +357,7 @@ func (n HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyVa
}
// Route returns the attribute for the route.
-func (n HTTPServer) Route(route string) attribute.KeyValue {
+func (HTTPServer) Route(route string) attribute.KeyValue {
return semconv.HTTPRoute(route)
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
index d6842ed2ab5c..0de0bd83c458 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/semconv/util.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/semconv/util.go.tmpl
+
+package semconv
import (
"net"
@@ -15,7 +15,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconvNew "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconvNew "go.opentelemetry.io/otel/semconv/v1.43.0"
)
// SplitHostPort splits a network address hostport of the form "host",
@@ -32,29 +32,29 @@ func SplitHostPort(hostport string) (host string, port int) {
addrEnd := strings.LastIndexByte(hostport, ']')
if addrEnd < 0 {
// Invalid hostport.
- return
+ return host, port
}
if i := strings.LastIndexByte(hostport[addrEnd:], ':'); i < 0 {
host = hostport[1:addrEnd]
- return
+ return host, port
}
} else {
if i := strings.LastIndexByte(hostport, ':'); i < 0 {
host = hostport
- return
+ return host, port
}
}
host, pStr, err := net.SplitHostPort(hostport)
if err != nil {
- return
+ return host, port
}
p, err := strconv.ParseUint(pStr, 10, 16)
if err != nil {
- return
+ return host, port
}
- return host, int(p) //nolint:gosec // Byte size checked 16 above.
+ return host, int(p)
}
func requiredHTTPPort(https bool, port int) int { //nolint:revive // ignore linter
@@ -84,7 +84,7 @@ func httpRoute(pattern string) string {
return ""
}
-func netProtocol(proto string) (name string, version string) {
+func netProtocol(proto string) (name, version string) {
name, version, _ = strings.Cut(proto, "/")
switch name {
case "HTTP":
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go
index d62ce44b002d..8362b8246876 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go
index 9476ef01b015..9b6c0a889ba6 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"context"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
index b15895cee22f..82501eab3253 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
@@ -1,10 +1,11 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
import (
"context"
+ "fmt"
"io"
"net/http"
"net/http/httptrace"
@@ -15,7 +16,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/propagation"
- otelsemconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ otelsemconv "go.opentelemetry.io/otel/semconv/v1.43.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request"
@@ -142,6 +143,9 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
res, err := t.rt.RoundTrip(r)
+ if err == nil {
+ res, err = ensureResponseBody(t.rt, r, res)
+ }
// Record the metrics on error or no error.
statusCode := 0
@@ -160,6 +164,7 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
},
t.semconv.MetricOptions(semconv.MetricAttributes{
Req: r,
+ Resp: res,
StatusCode: statusCode,
Err: err,
AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...),
@@ -183,6 +188,20 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
return res, nil
}
+func ensureResponseBody(rt http.RoundTripper, r *http.Request, res *http.Response) (*http.Response, error) {
+ switch {
+ case res == nil:
+ return nil, fmt.Errorf("http: RoundTripper implementation (%T) returned a nil *Response with a nil error", rt)
+ case res.Body != nil:
+ return res, nil
+ case res.ContentLength > 0 && r.Method != http.MethodHead:
+ return nil, fmt.Errorf("http: RoundTripper implementation (%T) returned a *Response with content length %d but a nil Body", rt, res.ContentLength)
+ default:
+ res.Body = http.NoBody
+ return res, nil
+ }
+}
+
func (t *Transport) metricAttributesFromRequest(r *http.Request) []attribute.KeyValue {
var attributeForRequest []attribute.KeyValue
if t.metricAttributesFn != nil {
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
index 2feb885000fb..b757d6e9d036 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
+package otelhttp
// Version is the current release version of the otelhttp instrumentation.
-const Version = "0.69.0"
+const Version = "0.70.0"
diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml
index 645c7e6af1d0..8a7f1ec5d99d 100644
--- a/vendor/go.opentelemetry.io/otel/.golangci.yml
+++ b/vendor/go.opentelemetry.io/otel/.golangci.yml
@@ -96,9 +96,9 @@ linters:
- "!**/exporters/zipkin/**"
deny:
- pkg: go.opentelemetry.io/otel/semconv
- desc: "Use go.opentelemetry.io/otel/semconv/v1.41.0 instead. If a newer semconv version has been released, update the depguard rule."
+ desc: "Use go.opentelemetry.io/otel/semconv/v1.43.0 instead. If a newer semconv version has been released, update the depguard rule."
allow:
- - go.opentelemetry.io/otel/semconv/v1.41.0
+ - go.opentelemetry.io/otel/semconv/v1.43.0
gocritic:
disabled-checks:
- appendAssign
diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore
index 994b677df7f8..df0d328bf822 100644
--- a/vendor/go.opentelemetry.io/otel/.lycheeignore
+++ b/vendor/go.opentelemetry.io/otel/.lycheeignore
@@ -11,3 +11,17 @@ http://4.3.2.1:78/user/123
file:///home/runner/work/opentelemetry-go/opentelemetry-go/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/dns:/:4317
# URL works, but it has blocked link checkers.
https://dl.acm.org/doi/10.1145/198429.198435
+https://pkg.go.dev/google.golang.org/grpc.*internal/resolver
+https://golang.org/src/crypto/tls/generate_cert.go
+https://github.com/grpc/grpc/blob/.*/doc/naming.md
+https://github.com/open-telemetry/opentelemetry-specification/blob/.*
+# Fake domains used in otlp options_test.go tests
+https?://env\.endpoint.*
+https?://env\.metrics\.endpoint.*
+https?://env_metrics_endpoint.*
+https?://env\.traces\.endpoint.*
+https?://env_traces_endpoint.*
+https?://someendpoint.*
+https?://overrode\.by\.signal\.specific.*
+https?://overrode_by_signal_specific.*
+https?://proxy\.com.*
diff --git a/vendor/go.opentelemetry.io/otel/AGENTS.md b/vendor/go.opentelemetry.io/otel/AGENTS.md
index 26c0fc4ddb84..02db71528498 100644
--- a/vendor/go.opentelemetry.io/otel/AGENTS.md
+++ b/vendor/go.opentelemetry.io/otel/AGENTS.md
@@ -47,6 +47,9 @@ For docs-only, test-only, or review-only tasks, still start with the required re
- Prefer examples over long code snippets in GoDoc when practical.
- Keep docs aligned with actual behavior. Do not leave stale comments, stale examples, or stale package documentation behind.
- For user-visible changes, update `CHANGELOG.md` under the appropriate `Added`, `Changed`, `Deprecated`, `Fixed`, or `Removed` section within `## [Unreleased]`.
+ - Always put the PR number at the end of the line (e.g., `(#1234)`), NOT the issue number.
+ - If the PR number is not yet known, omit it until the PR is created, then update the changelog entry before merging.
+ - Always use references to the go module that is updated (e.g., `go.opentelemetry.io/otel/sdk/metric`), instead of just the path (e.g., `sdk/metric`).
## Repository habits
diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
index 6a90451f5266..2db588ea27dd 100644
--- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md
+++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
@@ -11,6 +11,75 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
+## [1.45.0/0.67.0/0.21.0/0.0.18] - 2026-08-03
+
+### Added
+
+- Add experimental observability metrics to `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log`. (#7124)
+- Add the experimental `WithUnsafeAttributes` no-copy attribute option to `go.opentelemetry.io/otel/metric/x` for future performance improvements. This API is a work in progress. (#8251)
+- Add `Map` and `MapValue` functions for the new `MAP` attribute type in `go.opentelemetry.io/otel/attribute`. (#8445)
+- Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#8453)
+- Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlplog`. (#8453)
+- Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#8453)
+- Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/zipkin`. (#8453)
+- Apply `AttributeValueLengthLimit` recursively to values contained in `attribute.MAP` attributes in `go.opentelemetry.io/otel/sdk/trace`. (#8454)
+- Remove duplicate keys from `attribute.MAP` values in `go.opentelemetry.io/otel/sdk/resource` using last-value-wins semantics. (#8471)
+- Remove duplicate keys by default from `attribute.MAP` values in instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/log` using last-value-wins semantics. (#8471)
+- Remove duplicate keys by default from `attribute.MAP` values in span, event, link, and instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/trace` using last-value-wins semantics. (#8471)
+- Remove duplicate keys by default from `attribute.MAP` values in measurement and instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/metric` using last-value-wins semantics. (#8471)
+- Extend `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log` to disable duplicate-key removal in `attribute.MAP` values for instrumentation scope attributes. (#8471)
+- Add the `go.opentelemetry.io/otel/semconv/v1.42.0` package.
+ The package contains semantic conventions from the `v1.42.0` version of the OpenTelemetry Semantic Conventions.
+ See the [migration documentation](./semconv/v1.42.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.41.0`. (#8484)
+- Add `WithoutPanicRecording` as a `TracerProviderOption` in `go.opentelemetry.io/otel/sdk/trace` to disable exception event recording for panics. (#8532)
+- Add the `go.opentelemetry.io/otel/semconv/v1.43.0` package.
+ The package contains semantic conventions from the `v1.43.0` version of the OpenTelemetry Semantic Conventions.
+ See the [migration documentation](./semconv/v1.43.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.42.0`. (#8628)
+
+### Changed
+
+- `HistogramReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` now uses a time-unbiased sampling algorithm for exemplars. (#8306)
+- ⚠️ **Breaking Change:** Use `go.opentelemetry.io/otel/attribute.Value` and `go.opentelemetry.io/otel/attribute.KeyValue` for log bodies and attributes in `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/log/logtest`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/sdk/log/logtest`. (#8490)
+- Encode log bodies and attributes as `go.opentelemetry.io/otel/attribute.Value` JSON in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#8490)
+- Improve the performance of hashing `BOOLSLICE`, `INT64SLICE`, `FLOAT64SLICE`, and `STRINGSLICE` attribute values by avoiding reflection for short slices in `go.opentelemetry.io/otel/attribute`. (#8511)
+- ⚠️ **Breaking Change:** `WithEndpointURL` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` no longer appends the default signal path when an endpoint URL has no path, making the behavior consistent with `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and with setting the endpoint through `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`. If the URL has no path component, the root path (`/`) is used. Use `WithEndpointURL(url.JoinPath(endpoint, "/v1/metrics"))` to preserve the previous behavior. (#8538)
+- ⚠️ **Breaking Change:** `WithEndpointURL` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` no longer appends the default signal path when an endpoint URL has no path, making the behavior consistent with `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and with setting the endpoint through `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`. If the URL has no path component, the root path (`/`) is used. Use `WithEndpointURL(url.JoinPath(endpoint, "/v1/traces"))` to preserve the previous behavior. (#8538)
+
+### Deprecated
+
+- Deprecate `WithExportBufferSize` in `go.opentelemetry.io/otel/sdk/log`. The option remains available for source compatibility but no longer affects behavior; `BatchProcessor` no longer maintains a separate export-request buffer. (#8620)
+
+### Removed
+
+- ⚠️ **Breaking Change:** Remove `Kind`, `Value`, `KeyValue`, their constructors, and attribute conversion helpers from `go.opentelemetry.io/otel/log`. (#8490)
+- ⚠️ **Breaking Change:** Remove the `AttributeValueLengthLimit` and `AttributeCountLimit` fields from `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest`; records produced by the factory now keep attribute limits disabled so test code can append exact attributes. (#8556)
+
+### Fixed
+
+- Apply TLS certificates configured through environment variables to gRPC connections in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.
+- Prevent panics in `go.opentelemetry.io/otel/bridge/opentracing` when OpenTracing baggage is propagated concurrently with `Span.SetBaggageItem`.
+- Fix an off-by-one error in `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` that prevented the first exemplar from being sampled after the reservoir was filled. (#8309)
+- Interpret HTTP `Retry-After` header values as seconds instead of nanoseconds when retrying OTLP HTTP exports in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8383)
+- Fix a memory leak in the `Reservoir` implementation in `go.opentelemetry.io/otel/sdk/metric/exemplar`, where storing the full `context.Context` pinned large objects such as gRPC transport buffers. (#8389)
+- Prevent a non-empty attribute set whose computed hash is zero from collapsing to an empty set in `go.opentelemetry.io/otel/attribute`. (#8402)
+- Fix histogram data point reuse in `go.opentelemetry.io/otel/sdk/metric` aggregation to avoid leaking stale sum, minimum, and maximum values when they are disabled in subsequent collections. (#8403)
+- Avoid preallocating scope attributes when they are disabled in `go.opentelemetry.io/otel/exporters/prometheus`. (#8404)
+- Support HTTP-date values in the HTTP `Retry-After` header when retrying OTLP HTTP exports in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8417)
+- Reduce histogram heap allocations by reusing `BucketCounts` and `Exemplars` slices across `Collect` cycles in the cumulative histogram aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#8428)
+- Fix `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` self-observability to record `error.type` on the operation-duration histogram when the `exportedSpans` metric is disabled. (#8432)
+- Stop including trace exporter endpoint configuration in internal logs from `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, and `go.opentelemetry.io/otel/exporters/zipkin`. (#8438)
+- Fix invalid error formatting for out-of-range JSON code values in `go.opentelemetry.io/otel/codes`. (#8497)
+- Clarify in `go.opentelemetry.io/otel/log` that `Logger.Enabled` should be checked for every log emission because its result may change over time. (#8565)
+- Preserve user-provided exception attributes while independently deriving missing exception message and type attributes in `go.opentelemetry.io/otel/sdk/log`. (#8566)
+- Make `WithAttributeCountLimit(0)` and `OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT=0` discard all log record attributes in `go.opentelemetry.io/otel/sdk/log`. (#8570)
+- Clarify that the `Record` methods of `Float64Histogram` and `Int64Histogram` in `go.opentelemetry.io/otel/metric` expect non-negative values. (#8574)
+- Clarify in `go.opentelemetry.io/otel/log` that `LoggerProvider` implementations should retain an empty `Logger` name instead of replacing it with a default. (#8587)
+- Ensure that the built-in processors in `go.opentelemetry.io/otel/sdk/log` call exporter `ForceFlush` during `Shutdown`. (#8599)
+- Prevent processor operations in `go.opentelemetry.io/otel/sdk/log` from overlapping with processor shutdown or running after `LoggerProvider` shutdown. (#8608)
+- Prevent `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` from busy-spinning under exporter backpressure and serialize dequeue, export, force-flush, and shutdown work in one worker. (#8620)
+- Make `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` return errors encountered while draining records during `ForceFlush` and `Shutdown`, while continuing to attempt later batches as long as the request context remains valid. (#8620)
+- Keep the default `BatchProcessor` maximum export batch size in `go.opentelemetry.io/otel/sdk/log` at or below the configured maximum queue size. (#8620)
+
## [1.44.0/0.66.0/0.20.0/0.0.17] 2026-05-27
### Added
@@ -42,13 +111,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
Set `OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE=` to enable for all periodic readers.
See `go.opentelemetry.io/otel/sdk/metric/internal/x` for feature documentation. (#8071)
- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
- Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ Enable with `OTEL_GO_X_OBSERVABILITY=true` environment variable.
See `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x` for feature documentation. (#8192)
- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
- Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ Enable with `OTEL_GO_X_OBSERVABILITY=true` environment variable.
See `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x` for feature documentation. (#8194)
- Add experimental self-observability metrics in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.
- Enable with `OTEL_GO_X_SELF_OBSERVABILITY=true` environment variable.
+ Enable with `OTEL_GO_X_OBSERVABILITY=true` environment variable.
See `go.opentelemetry.io/otel/stdout/stdoutlog/internal/x` for feature documentation. (#8263)
- Add `WithDefaultAttributes` to `go.opentelemetry.io/otel/metric/x` to support setting default attributes on instruments. (#8135)
- Add `go.opentelemetry.io/otel/semconv/v1.41.0` package.
@@ -3713,7 +3782,8 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.
-[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.44.0...HEAD
+[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.45.0...HEAD
+[1.45.0/0.67.0/0.21.0/0.0.18]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.45.0
[1.44.0/0.66.0/0.20.0/0.0.17]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.44.0
[1.43.0/0.65.0/0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0
[1.42.0/0.64.0/0.18.0/0.0.16]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.42.0
diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
index 3ec17d6832bd..2aba71e196dd 100644
--- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
+++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
@@ -8,8 +8,10 @@ repo for information on this and other language SIGs.
See the [public meeting
notes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit)
for a summary description of past meetings. To request edit access,
-join the meeting or get in touch on
-[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT).
+join the meeting or get in touch on the
+[#otel-go](https://cloud-native.slack.com/archives/C01NPAXACKT)
+channel on CNCF Slack. If you are new to the CNCF Slack community,
+you can [create an account](https://slack.cncf.io/).
The meeting is open for all to join. We invite everyone to join our
meeting, regardless of your experience level. Whether you're a
@@ -752,8 +754,8 @@ Encapsulate setup in constructor functions, ensuring clear ownership and scope:
import (
"errors"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
type SDKComponent struct {
@@ -1054,7 +1056,7 @@ func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan)
All observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md).
-Use the metric semantic conventions convenience package [otelconv](./semconv/v1.41.0/otelconv/metric.go).
+Use the metric semantic conventions convenience package [otelconv](./semconv/v1.43.0/otelconv/metric.go).
##### Component Identification
diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile
index de63a5e9bc94..d4711257dffd 100644
--- a/vendor/go.opentelemetry.io/otel/Makefile
+++ b/vendor/go.opentelemetry.io/otel/Makefile
@@ -10,6 +10,7 @@ ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {}
GO = go
TIMEOUT = 60
+GO_VERSION := $(shell awk '/^go [0-9]/ {print $$2; exit}' go.mod)
# User to run as in docker images.
DOCKER_USER=$(shell id -u):$(shell id -g)
@@ -19,7 +20,7 @@ DEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile
.PHONY: precommit ci
precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default
-ci: generate toolchain-check license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage
+ci: generate toolchain-check license-check lint verify-readmes verify-mods build test-default check-clean-work-tree test-coverage
# Tools
@@ -59,9 +60,6 @@ $(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge
STRINGER = $(TOOLS)/stringer
$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer
-PORTO = $(TOOLS)/porto
-$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto
-
GOTMPL = $(TOOLS)/gotmpl
$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
@@ -72,7 +70,7 @@ GOVULNCHECK = $(TOOLS)/govulncheck
$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck
.PHONY: tools
-tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(VERIFYREADMES) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
+tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(VERIFYREADMES) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
# Virtualized python tools via docker
@@ -110,7 +108,7 @@ $(CODESPELL): PACKAGE=codespell
# Generate
.PHONY: generate
-generate: go-generate vanity-import-fix
+generate: go-generate
.PHONY: go-generate
go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%)
@@ -120,14 +118,10 @@ go-generate/%: $(STRINGER) $(GOTMPL)
&& cd $(DIR) \
&& PATH="$(TOOLS):$${PATH}" $(GO) generate ./...
-.PHONY: vanity-import-fix
-vanity-import-fix: $(PORTO)
- @$(PORTO) --include-internal -w .
-
# Generate go.work file for local development.
.PHONY: go-work
go-work: $(CROSSLINK)
- $(CROSSLINK) work --root=$(shell pwd) --go=1.22.7
+ $(CROSSLINK) work --root=$(shell pwd) --go=$(GO_VERSION)
# Build
@@ -228,10 +222,6 @@ go-mod-tidy/%: crosslink
.PHONY: lint
lint: misspell go-mod-tidy golangci-lint
-.PHONY: vanity-import-check
-vanity-import-check: $(PORTO)
- @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 )
-
.PHONY: misspell
misspell: $(MISSPELL)
@$(MISSPELL) -w $(ALL_DOCS)
diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md
index 16a72004c080..ce97e9a25109 100644
--- a/vendor/go.opentelemetry.io/otel/README.md
+++ b/vendor/go.opentelemetry.io/otel/README.md
@@ -113,3 +113,10 @@ All officially supported exporters for the OpenTelemetry project are contained i
## Contributing
See the [contributing documentation](CONTRIBUTING.md).
+
+### Emeritus
+
+- [Alex Kats](https://github.com/akats7), Triager
+
+For more information about the emeritus role, see the
+[community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go
index eef51ebc2a27..c543f2ca6ab0 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/doc.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/doc.go
@@ -2,4 +2,4 @@
// SPDX-License-Identifier: Apache-2.0
// Package attribute provides key and value attributes.
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go
index ca186d8ac2f0..413e7a185b8a 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/encoder.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/attribute/filter.go b/vendor/go.opentelemetry.io/otel/attribute/filter.go
index 624ebbe3811f..6dab64f5d760 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/filter.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/filter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
// Filter supports removing certain attributes from attribute sets. When
// the filter returns true, the attribute will be kept in the filtered
diff --git a/vendor/go.opentelemetry.io/otel/attribute/hash.go b/vendor/go.opentelemetry.io/otel/attribute/hash.go
index 92f39ffe7b19..f651eb13d902 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/hash.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/hash.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
"fmt"
@@ -29,6 +29,7 @@ const (
stringSliceID uint64 = 7453010373645655387 // "[]string" (little endian)
byteSliceID uint64 = 6874028470941080415 // "_[]byte_" (little endian)
sliceID uint64 = 7883494272577650031 // "__slice_" (little endian)
+ mapID uint64 = 6872316492666199903 // "__map___" (little endian)
emptyID uint64 = 7305809155345288421 // "__empty_" (little endian)
)
@@ -38,7 +39,13 @@ func hashKVs(kvs []KeyValue) uint64 {
for _, kv := range kvs {
h = hashKV(h, kv)
}
- return h.Sum64()
+ sum := h.Sum64()
+ // Remap 0 to a non-zero value for non-empty input because hash == 0 is a reserved sentinel (treated as empty/invalid).
+ const remappedZeroHash uint64 = 1
+ if sum == 0 && len(kvs) > 0 {
+ return remappedZeroHash
+ }
+ return sum
}
// hashKV returns the xxHash64 hash of kv with h as the base.
@@ -64,27 +71,79 @@ func hashValue(h xxhash.Hash, v Value) xxhash.Hash {
h = h.String(v.stringly)
case BOOLSLICE:
h = h.Uint64(boolSliceID)
- rv := reflect.ValueOf(v.slice)
- for i := 0; i < rv.Len(); i++ {
- h = h.Bool(rv.Index(i).Bool())
+ switch vals := v.slice.(type) {
+ case [0]bool:
+ case [1]bool:
+ h = h.Bool(vals[0])
+ case [2]bool:
+ h = h.Bool(vals[0])
+ h = h.Bool(vals[1])
+ case [3]bool:
+ h = h.Bool(vals[0])
+ h = h.Bool(vals[1])
+ h = h.Bool(vals[2])
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ h = h.Bool(rv.Index(i).Bool())
+ }
}
case INT64SLICE:
h = h.Uint64(int64SliceID)
- rv := reflect.ValueOf(v.slice)
- for i := 0; i < rv.Len(); i++ {
- h = h.Int64(rv.Index(i).Int())
+ switch vals := v.slice.(type) {
+ case [0]int64:
+ case [1]int64:
+ h = h.Int64(vals[0])
+ case [2]int64:
+ h = h.Int64(vals[0])
+ h = h.Int64(vals[1])
+ case [3]int64:
+ h = h.Int64(vals[0])
+ h = h.Int64(vals[1])
+ h = h.Int64(vals[2])
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ h = h.Int64(rv.Index(i).Int())
+ }
}
case FLOAT64SLICE:
h = h.Uint64(float64SliceID)
- rv := reflect.ValueOf(v.slice)
- for i := 0; i < rv.Len(); i++ {
- h = h.Float64(rv.Index(i).Float())
+ switch vals := v.slice.(type) {
+ case [0]float64:
+ case [1]float64:
+ h = h.Float64(vals[0])
+ case [2]float64:
+ h = h.Float64(vals[0])
+ h = h.Float64(vals[1])
+ case [3]float64:
+ h = h.Float64(vals[0])
+ h = h.Float64(vals[1])
+ h = h.Float64(vals[2])
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ h = h.Float64(rv.Index(i).Float())
+ }
}
case STRINGSLICE:
h = h.Uint64(stringSliceID)
- rv := reflect.ValueOf(v.slice)
- for i := 0; i < rv.Len(); i++ {
- h = h.String(rv.Index(i).String())
+ switch vals := v.slice.(type) {
+ case [0]string:
+ case [1]string:
+ h = h.String(vals[0])
+ case [2]string:
+ h = h.String(vals[0])
+ h = h.String(vals[1])
+ case [3]string:
+ h = h.String(vals[0])
+ h = h.String(vals[1])
+ h = h.String(vals[2])
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ h = h.String(rv.Index(i).String())
+ }
}
case BYTESLICE:
h = h.Uint64(byteSliceID)
@@ -95,21 +154,79 @@ func hashValue(h xxhash.Hash, v Value) xxhash.Hash {
case [0]Value:
// No values to hash, but the type identifier is still hashed above.
case [1]Value:
- h = hashValueSlice(h, vals[:])
+ h = hashValue(h, vals[0])
case [2]Value:
- h = hashValueSlice(h, vals[:])
+ h = hashValue(h, vals[0])
+ h = hashValue(h, vals[1])
case [3]Value:
- h = hashValueSlice(h, vals[:])
+ h = hashValue(h, vals[0])
+ h = hashValue(h, vals[1])
+ h = hashValue(h, vals[2])
case [4]Value:
- h = hashValueSlice(h, vals[:])
+ h = hashValue(h, vals[0])
+ h = hashValue(h, vals[1])
+ h = hashValue(h, vals[2])
+ h = hashValue(h, vals[3])
case [5]Value:
- h = hashValueSlice(h, vals[:])
+ h = hashValue(h, vals[0])
+ h = hashValue(h, vals[1])
+ h = hashValue(h, vals[2])
+ h = hashValue(h, vals[3])
+ h = hashValue(h, vals[4])
default:
rv := reflect.ValueOf(v.slice)
for i := 0; i < rv.Len(); i++ {
h = hashValue(h, rv.Index(i).Interface().(Value))
}
}
+ case MAP:
+ h = h.Uint64(mapID)
+ switch vals := v.slice.(type) {
+ case [0]KeyValue:
+ // No values to hash, but the type identifier is still hashed above.
+ case [1]KeyValue:
+ h = h.String(string(vals[0].Key))
+ h = hashValue(h, vals[0].Value)
+ case [2]KeyValue:
+ h = h.String(string(vals[0].Key))
+ h = hashValue(h, vals[0].Value)
+ h = h.String(string(vals[1].Key))
+ h = hashValue(h, vals[1].Value)
+ case [3]KeyValue:
+ h = h.String(string(vals[0].Key))
+ h = hashValue(h, vals[0].Value)
+ h = h.String(string(vals[1].Key))
+ h = hashValue(h, vals[1].Value)
+ h = h.String(string(vals[2].Key))
+ h = hashValue(h, vals[2].Value)
+ case [4]KeyValue:
+ h = h.String(string(vals[0].Key))
+ h = hashValue(h, vals[0].Value)
+ h = h.String(string(vals[1].Key))
+ h = hashValue(h, vals[1].Value)
+ h = h.String(string(vals[2].Key))
+ h = hashValue(h, vals[2].Value)
+ h = h.String(string(vals[3].Key))
+ h = hashValue(h, vals[3].Value)
+ case [5]KeyValue:
+ h = h.String(string(vals[0].Key))
+ h = hashValue(h, vals[0].Value)
+ h = h.String(string(vals[1].Key))
+ h = hashValue(h, vals[1].Value)
+ h = h.String(string(vals[2].Key))
+ h = hashValue(h, vals[2].Value)
+ h = h.String(string(vals[3].Key))
+ h = hashValue(h, vals[3].Value)
+ h = h.String(string(vals[4].Key))
+ h = hashValue(h, vals[4].Value)
+ default:
+ rv := reflect.ValueOf(v.slice)
+ for i := 0; i < rv.Len(); i++ {
+ kv := rv.Index(i).Interface().(KeyValue)
+ h = h.String(string(kv.Key))
+ h = hashValue(h, kv.Value)
+ }
+ }
case EMPTY:
h = h.Uint64(emptyID)
default:
@@ -121,10 +238,3 @@ func hashValue(h xxhash.Hash, v Value) xxhash.Hash {
}
return h
}
-
-func hashValueSlice(h xxhash.Hash, vals []Value) xxhash.Hash {
- for _, v := range vals {
- h = hashValue(h, v)
- }
- return h
-}
diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go b/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go
index d9f51fa2d7f9..ec4a5f07fa4b 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go
@@ -5,7 +5,7 @@
Package attribute provide several helper functions for some commonly used
logic of processing attributes.
*/
-package attribute // import "go.opentelemetry.io/otel/attribute/internal"
+package attribute
import (
"reflect"
diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go b/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go
index 113a978383bd..c851179ccaa6 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package xxhash provides a wrapper around the xxhash library for attribute hashing.
-package xxhash // import "go.opentelemetry.io/otel/attribute/internal/xxhash"
+package xxhash
import (
"encoding/binary"
diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go
index 8df6249f0237..1afd00ff08a9 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/iterator.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/iterator.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
// Iterator allows iterating over the set of attributes in order, sorted by
// key.
diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go
index cdc7089e8273..6403191c27c1 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/key.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/key.go
@@ -1,16 +1,16 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
// Key represents the key part in key-value pairs. It's a string. The
// allowed character set in the key depends on the use of the key.
type Key string
-// Bool creates a KeyValue instance with a BOOL Value.
+// Bool returns a [KeyValue] for a bool value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Bool(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [Bool] function.
func (k Key) Bool(v bool) KeyValue {
return KeyValue{
Key: k,
@@ -18,10 +18,15 @@ func (k Key) Bool(v bool) KeyValue {
}
}
-// BoolSlice creates a KeyValue instance with a BOOLSLICE Value.
+// BoolSlice returns a [KeyValue] for a []bool value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- BoolSlice(name, value).
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// If creating both a key and value at the same time, use the package-level
+// [BoolSlice] function.
func (k Key) BoolSlice(v []bool) KeyValue {
return KeyValue{
Key: k,
@@ -29,10 +34,12 @@ func (k Key) BoolSlice(v []bool) KeyValue {
}
}
-// Int creates a KeyValue instance with an INT64 Value.
+// Int returns a [KeyValue] for an int value.
+//
+// It is provided as a convenience for [Key.Int64].
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Int(name, value).
+// If creating both a key and value at the same time, use the package-level [Int]
+// function.
func (k Key) Int(v int) KeyValue {
return KeyValue{
Key: k,
@@ -40,10 +47,17 @@ func (k Key) Int(v int) KeyValue {
}
}
-// IntSlice creates a KeyValue instance with an INT64SLICE Value.
+// IntSlice returns a [KeyValue] for a []int value.
+//
+// It is provided as a convenience for [Key.Int64Slice].
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- IntSlice(name, value).
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// If creating both a key and value at the same time, use the package-level
+// [IntSlice] function.
func (k Key) IntSlice(v []int) KeyValue {
return KeyValue{
Key: k,
@@ -51,10 +65,10 @@ func (k Key) IntSlice(v []int) KeyValue {
}
}
-// Int64 creates a KeyValue instance with an INT64 Value.
+// Int64 returns a [KeyValue] for an int64 value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Int64(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [Int64] function.
func (k Key) Int64(v int64) KeyValue {
return KeyValue{
Key: k,
@@ -62,10 +76,15 @@ func (k Key) Int64(v int64) KeyValue {
}
}
-// Int64Slice creates a KeyValue instance with an INT64SLICE Value.
+// Int64Slice returns a [KeyValue] for a []int64 value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Int64Slice(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [Int64Slice] function.
func (k Key) Int64Slice(v []int64) KeyValue {
return KeyValue{
Key: k,
@@ -73,10 +92,10 @@ func (k Key) Int64Slice(v []int64) KeyValue {
}
}
-// Float64 creates a KeyValue instance with a FLOAT64 Value.
+// Float64 returns a [KeyValue] for a float64 value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Float64(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [Float64] function.
func (k Key) Float64(v float64) KeyValue {
return KeyValue{
Key: k,
@@ -84,10 +103,15 @@ func (k Key) Float64(v float64) KeyValue {
}
}
-// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value.
+// Float64Slice returns a [KeyValue] for a []float64 value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Float64(name, value).
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// If creating both a key and value at the same time, use the package-level
+// [Float64Slice] function.
func (k Key) Float64Slice(v []float64) KeyValue {
return KeyValue{
Key: k,
@@ -95,10 +119,10 @@ func (k Key) Float64Slice(v []float64) KeyValue {
}
}
-// String creates a KeyValue instance with a STRING Value.
+// String returns a [KeyValue] for a string value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- String(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [String] function.
func (k Key) String(v string) KeyValue {
return KeyValue{
Key: k,
@@ -106,10 +130,15 @@ func (k Key) String(v string) KeyValue {
}
}
-// StringSlice creates a KeyValue instance with a STRINGSLICE Value.
+// StringSlice returns a [KeyValue] for a []string value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- StringSlice(name, value).
+// If creating both a key and value at the same time, use the package-level
+// [StringSlice] function.
func (k Key) StringSlice(v []string) KeyValue {
return KeyValue{
Key: k,
@@ -117,10 +146,15 @@ func (k Key) StringSlice(v []string) KeyValue {
}
}
-// ByteSlice creates a KeyValue instance with a BYTESLICE Value.
+// ByteSlice returns a [KeyValue] for a []byte value.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- ByteSlice(name, value).
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// If creating both a key and value at the same time, use the package-level
+// [ByteSlice] function.
func (k Key) ByteSlice(v []byte) KeyValue {
return KeyValue{
Key: k,
@@ -128,10 +162,15 @@ func (k Key) ByteSlice(v []byte) KeyValue {
}
}
-// Slice creates a KeyValue instance with a SLICE Value.
+// Slice returns a [KeyValue] for a []Value value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
//
-// If creating both a key and value at the same time, use the provided
-// convenience function instead -- Slice(name, values...).
+// If creating both a key and value at the same time, use the package-level
+// [Slice] function.
func (k Key) Slice(v ...Value) KeyValue {
return KeyValue{
Key: k,
@@ -139,6 +178,27 @@ func (k Key) Slice(v ...Value) KeyValue {
}
}
+// Map returns a [KeyValue] for a []KeyValue value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// Users should avoid providing duplicate keys; many receivers handle maps
+// containing duplicate keys unpredictably.
+//
+// The order of v is not preserved.
+//
+// If creating both a key and value at the same time, use the package-level [Map]
+// function.
+func (k Key) Map(v ...KeyValue) KeyValue {
+ return KeyValue{
+ Key: k,
+ Value: MapValue(v...),
+ }
+}
+
// Defined reports whether the key is not empty.
func (k Key) Defined() bool {
return len(k) != 0
diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go
index eeb76a1348f1..c4f0dd9281ec 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/kv.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/kv.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
"fmt"
@@ -18,66 +18,120 @@ func (kv KeyValue) Valid() bool {
return kv.Key.Defined()
}
-// Bool creates a KeyValue with a BOOL Value type.
+// Bool returns a [KeyValue] for a bool value.
func Bool(k string, v bool) KeyValue {
return Key(k).Bool(v)
}
-// BoolSlice creates a KeyValue with a BOOLSLICE Value type.
+// BoolSlice returns a [KeyValue] for a []bool value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func BoolSlice(k string, v []bool) KeyValue {
return Key(k).BoolSlice(v)
}
-// Int creates a KeyValue with an INT64 Value type.
+// Int returns a [KeyValue] for an int value.
+//
+// It is provided as a convenience for [Int64].
func Int(k string, v int) KeyValue {
return Key(k).Int(v)
}
-// IntSlice creates a KeyValue with an INT64SLICE Value type.
+// IntSlice returns a [KeyValue] for a []int value.
+//
+// It is provided as a convenience for [Int64Slice].
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func IntSlice(k string, v []int) KeyValue {
return Key(k).IntSlice(v)
}
-// Int64 creates a KeyValue with an INT64 Value type.
+// Int64 returns a [KeyValue] for an int64 value.
func Int64(k string, v int64) KeyValue {
return Key(k).Int64(v)
}
-// Int64Slice creates a KeyValue with an INT64SLICE Value type.
+// Int64Slice returns a [KeyValue] for a []int64 value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func Int64Slice(k string, v []int64) KeyValue {
return Key(k).Int64Slice(v)
}
-// Float64 creates a KeyValue with a FLOAT64 Value type.
+// Float64 returns a [KeyValue] for a float64 value.
func Float64(k string, v float64) KeyValue {
return Key(k).Float64(v)
}
-// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type.
+// Float64Slice returns a [KeyValue] for a []float64 value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func Float64Slice(k string, v []float64) KeyValue {
return Key(k).Float64Slice(v)
}
-// String creates a KeyValue with a STRING Value type.
+// String returns a [KeyValue] for a string value.
func String(k, v string) KeyValue {
return Key(k).String(v)
}
-// StringSlice creates a KeyValue with a STRINGSLICE Value type.
+// StringSlice returns a [KeyValue] for a []string value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func StringSlice(k string, v []string) KeyValue {
return Key(k).StringSlice(v)
}
-// ByteSlice creates a KeyValue with a BYTESLICE Value type.
+// ByteSlice returns a [KeyValue] for a []byte value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func ByteSlice(k string, v []byte) KeyValue {
return Key(k).ByteSlice(v)
}
-// Slice creates a KeyValue with a SLICE Value type.
+// Slice returns a [KeyValue] for a []Value value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func Slice(k string, v ...Value) KeyValue {
return Key(k).Slice(v...)
}
+// Map returns a [KeyValue] for a []KeyValue value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// Users should avoid providing duplicate keys; many receivers handle maps
+// containing duplicate keys unpredictably.
+//
+// The order of v is not preserved.
+func Map(k string, v ...KeyValue) KeyValue {
+ return Key(k).Map(v...)
+}
+
// Stringer creates a new key-value pair with a passed name and a string
// value generated by the passed Stringer interface.
func Stringer(k string, v fmt.Stringer) KeyValue {
diff --git a/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go b/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go
index 5791c6e7aaa1..939e46f907c0 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
"math"
diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go
index a4b6ce81dec1..87d6f96200d2 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/set.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/set.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
"cmp"
diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go
index dbc01d3247ef..ab5da22887dc 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/type_string.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/type_string.go
@@ -19,11 +19,12 @@ func _() {
_ = x[STRINGSLICE-8]
_ = x[BYTESLICE-9]
_ = x[SLICE-10]
+ _ = x[MAP-11]
}
-const _Type_name = "EMPTYBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICEBYTESLICESLICE"
+const _Type_name = "EMPTYBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICEBYTESLICESLICEMAP"
-var _Type_index = [...]uint8{0, 5, 9, 14, 21, 27, 36, 46, 58, 69, 78, 83}
+var _Type_index = [...]uint8{0, 5, 9, 14, 21, 27, 36, 46, 58, 69, 78, 83, 86}
func (i Type) String() string {
idx := int(i) - 0
diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go
index 0529fefae237..07a0353a1efd 100644
--- a/vendor/go.opentelemetry.io/otel/attribute/value.go
+++ b/vendor/go.opentelemetry.io/otel/attribute/value.go
@@ -1,14 +1,16 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package attribute // import "go.opentelemetry.io/otel/attribute"
+package attribute
import (
+ "cmp"
"encoding/base64"
"encoding/json"
"fmt"
"math"
"reflect"
+ "slices"
"strconv"
"strings"
"unicode/utf8"
@@ -18,10 +20,10 @@ import (
//go:generate stringer -type=Type
-// Type describes the type of the data Value holds.
+// Type describes the kind of data a [Value] holds.
type Type int // nolint: revive // redefines builtin Type.
-// Value represents the value part in key-value pairs.
+// Value represents the value in key-value pairs.
//
// Note that the zero value is a valid empty value.
type Value struct {
@@ -32,35 +34,40 @@ type Value struct {
}
const (
- // EMPTY is used for a Value with no value set.
+ // EMPTY identifies a Value with no data.
EMPTY Type = iota
- // BOOL is a boolean Type Value.
+ // BOOL identifies a Value containing a bool.
BOOL
- // INT64 is a 64-bit signed integral Type Value.
+ // INT64 identifies a Value containing an int64.
INT64
- // FLOAT64 is a 64-bit floating point Type Value.
+ // FLOAT64 identifies a Value containing a float64.
FLOAT64
- // STRING is a string Type Value.
+ // STRING identifies a Value containing a string.
STRING
- // BOOLSLICE is a slice of booleans Type Value.
+ // BOOLSLICE identifies a Value containing a []bool.
BOOLSLICE
- // INT64SLICE is a slice of 64-bit signed integral numbers Type Value.
+ // INT64SLICE identifies a Value containing a []int64.
INT64SLICE
- // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value.
+ // FLOAT64SLICE identifies a Value containing a []float64.
FLOAT64SLICE
- // STRINGSLICE is a slice of strings Type Value.
+ // STRINGSLICE identifies a Value containing a []string.
STRINGSLICE
- // BYTESLICE is a slice of bytes Type Value.
+ // BYTESLICE identifies a Value containing a []byte.
BYTESLICE
- // SLICE is a slice of Value Type values.
+ // SLICE identifies a Value containing a []Value.
SLICE
+ // MAP identifies a Value containing a []KeyValue representation of a map.
+ //
+ // Note that MAP values may contain duplicate keys if duplicate keys are
+ // provided when creating the value.
+ MAP
// INVALID is used for a Value with no value set.
//
// Deprecated: Use EMPTY instead as an empty value is a valid value.
INVALID = EMPTY
)
-// BoolValue creates a BOOL Value.
+// BoolValue returns a [Value] for a bool value.
func BoolValue(v bool) Value {
return Value{
vtype: BOOL,
@@ -68,17 +75,31 @@ func BoolValue(v bool) Value {
}
}
-// BoolSliceValue creates a BOOLSLICE Value.
+// BoolSliceValue returns a [Value] for a []bool value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func BoolSliceValue(v []bool) Value {
return Value{vtype: BOOLSLICE, slice: attribute.SliceValue(v)}
}
-// IntValue creates an INT64 Value.
+// IntValue returns a [Value] for an int value.
+//
+// It is provided as a convenience for [Int64Value].
func IntValue(v int) Value {
return Int64Value(int64(v))
}
-// IntSliceValue creates an INT64SLICE Value.
+// IntSliceValue returns a [Value] for a []int value.
+//
+// It is provided as a convenience for [Int64SliceValue].
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func IntSliceValue(v []int) Value {
val := Value{vtype: INT64SLICE}
@@ -104,7 +125,7 @@ func IntSliceValue(v []int) Value {
return val
}
-// Int64Value creates an INT64 Value.
+// Int64Value returns a [Value] for an int64 value.
func Int64Value(v int64) Value {
return Value{
vtype: INT64,
@@ -112,12 +133,17 @@ func Int64Value(v int64) Value {
}
}
-// Int64SliceValue creates an INT64SLICE Value.
+// Int64SliceValue returns a [Value] for a []int64 value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func Int64SliceValue(v []int64) Value {
return Value{vtype: INT64SLICE, slice: attribute.SliceValue(v)}
}
-// Float64Value creates a FLOAT64 Value.
+// Float64Value returns a [Value] for a float64 value.
func Float64Value(v float64) Value {
return Value{
vtype: FLOAT64,
@@ -125,12 +151,17 @@ func Float64Value(v float64) Value {
}
}
-// Float64SliceValue creates a FLOAT64SLICE Value.
+// Float64SliceValue returns a [Value] for a []float64 value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func Float64SliceValue(v []float64) Value {
return Value{vtype: FLOAT64SLICE, slice: attribute.SliceValue(v)}
}
-// StringValue creates a STRING Value.
+// StringValue returns a [Value] for a string value.
func StringValue(v string) Value {
return Value{
vtype: STRING,
@@ -138,12 +169,22 @@ func StringValue(v string) Value {
}
}
-// StringSliceValue creates a STRINGSLICE Value.
+// StringSliceValue returns a [Value] for a []string value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func StringSliceValue(v []string) Value {
return Value{vtype: STRINGSLICE, slice: attribute.SliceValue(v)}
}
-// ByteSliceValue creates a BYTESLICE Value.
+// ByteSliceValue returns a [Value] for a []byte value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func ByteSliceValue(v []byte) Value {
return Value{
vtype: BYTESLICE,
@@ -151,12 +192,32 @@ func ByteSliceValue(v []byte) Value {
}
}
-// SliceValue creates a SLICE Value.
+// SliceValue returns a [Value] for a []Value value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
func SliceValue(v ...Value) Value {
return Value{vtype: SLICE, slice: sliceValue(v)}
}
-// Type returns a type of the Value.
+// MapValue returns a [Value] for a []KeyValue value.
+//
+// Note that many observability backends are not optimized to query, index, or
+// aggregate complex attribute values. Complex values may also carry
+// additional performance overhead. Prefer primitive values when
+// possible.
+//
+// Users should avoid providing duplicate keys; many receivers handle maps
+// containing duplicate keys unpredictably.
+//
+// The order of v is not preserved.
+func MapValue(v ...KeyValue) Value {
+ return Value{vtype: MAP, slice: mapValue(v)}
+}
+
+// Type returns v's type.
func (v Value) Type() Type {
return v.vtype
}
@@ -277,6 +338,53 @@ func asValueSliceReflect(v any) []Value {
return cpy
}
+// AsMap returns the []KeyValue value. Make sure that the Value's type is
+// MAP.
+//
+// The returned slice is sorted by key and may differ from the order
+// provided when creating the map value.
+//
+// The returned slice may contain duplicate keys if duplicate keys were
+// provided when creating the map value. Callers should not assume the returned
+// keys are unique.
+func (v Value) AsMap() []KeyValue {
+ if v.vtype != MAP {
+ return nil
+ }
+ return v.asMap()
+}
+
+func (v Value) asMap() []KeyValue {
+ switch vals := v.slice.(type) {
+ case [0]KeyValue:
+ return []KeyValue{}
+ case [1]KeyValue:
+ return []KeyValue{vals[0]}
+ case [2]KeyValue:
+ return []KeyValue{vals[0], vals[1]}
+ case [3]KeyValue:
+ return []KeyValue{vals[0], vals[1], vals[2]}
+ case [4]KeyValue:
+ return []KeyValue{vals[0], vals[1], vals[2], vals[3]}
+ case [5]KeyValue:
+ return []KeyValue{vals[0], vals[1], vals[2], vals[3], vals[4]}
+ default:
+ return asKeyValueSliceReflect(v.slice)
+ }
+}
+
+func asKeyValueSliceReflect(v any) []KeyValue {
+ rv := reflect.ValueOf(v)
+ if !rv.IsValid() || rv.Kind() != reflect.Array || rv.Type().Elem() != reflect.TypeFor[KeyValue]() {
+ return nil
+ }
+ cpy := make([]KeyValue, rv.Len())
+ if len(cpy) > 0 {
+ _ = reflect.Copy(reflect.ValueOf(cpy), rv)
+ }
+ return cpy
+}
+
// AsByteSlice returns the bytes value. Make sure that the Value's type
// is BYTESLICE.
func (v Value) AsByteSlice() []byte {
@@ -315,6 +423,8 @@ func (v Value) AsInterface() any {
return v.asByteSlice()
case SLICE:
return v.asSlice()
+ case MAP:
+ return v.asMap()
case EMPTY:
return nil
}
@@ -327,10 +437,10 @@ func (v Value) AsInterface() any {
// Strings are returned as-is without JSON quoting, booleans and integers use
// JSON literals, floating-point values use JSON numbers except that NaN and
// ±Inf are rendered as NaN, Infinity, and -Infinity, byte slices are
-// base64-encoded, empty values are the empty string, and slices are encoded as
-// JSON arrays. String, byte, and special floating-point values inside arrays
-// are encoded as JSON strings, and empty values inside arrays are encoded as
-// null.
+// base64-encoded, empty values are the empty string, slices are encoded as JSON
+// arrays, and maps are encoded as JSON objects. String, byte, and special
+// floating-point values inside arrays and maps are encoded as JSON strings, and
+// empty values inside arrays and maps are encoded as null.
//
// [OpenTelemetry AnyValue representation for non-OTLP protocols]: https://opentelemetry.io/docs/specs/otel/common/#anyvalue-representation-for-non-otlp-protocols
func (v Value) String() string {
@@ -355,6 +465,8 @@ func (v Value) String() string {
return formatByteSlice(v.stringly)
case SLICE:
return formatValueSliceValue(v.slice)
+ case MAP:
+ return formatMapValue(v.slice)
case EMPTY:
return ""
default:
@@ -399,6 +511,8 @@ func (v Value) Emit() string {
return formatByteSlice(v.stringly)
case SLICE:
return formatValueSliceValue(v.slice)
+ case MAP:
+ return formatMapValue(v.slice)
case EMPTY:
return ""
default:
@@ -439,6 +553,47 @@ func sliceValueReflect(v []Value) any {
return cp.Interface()
}
+func mapValue(v []KeyValue) any {
+ switch len(v) {
+ case 0:
+ return [0]KeyValue{}
+ case 1:
+ return [1]KeyValue{v[0]}
+ case 2:
+ vals := [2]KeyValue{v[0], v[1]}
+ sortKeyValues(vals[:])
+ return vals
+ case 3:
+ vals := [3]KeyValue{v[0], v[1], v[2]}
+ sortKeyValues(vals[:])
+ return vals
+ case 4:
+ vals := [4]KeyValue{v[0], v[1], v[2], v[3]}
+ sortKeyValues(vals[:])
+ return vals
+ case 5:
+ vals := [5]KeyValue{v[0], v[1], v[2], v[3], v[4]}
+ sortKeyValues(vals[:])
+ return vals
+ default:
+ return mapValueReflect(v)
+ }
+}
+
+func mapValueReflect(v []KeyValue) any {
+ cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeFor[KeyValue]())).Elem()
+ reflect.Copy(cp, reflect.ValueOf(v))
+ vals := cp.Slice(0, len(v)).Interface().([]KeyValue)
+ sortKeyValues(vals)
+ return cp.Interface()
+}
+
+func sortKeyValues(vals []KeyValue) {
+ slices.SortStableFunc(vals, func(a, b KeyValue) int {
+ return cmp.Compare(a.Key, b.Key)
+ })
+}
+
func formatBoolSliceValue(v any) string {
switch vals := v.(type) {
case [0]bool:
@@ -807,6 +962,37 @@ func formatValueSliceReflect(v any) string {
return b.String()
}
+func formatMapValue(v any) string {
+ switch vals := v.(type) {
+ case [0]KeyValue:
+ return "{}"
+ case [1]KeyValue:
+ return formatMap(vals[:])
+ case [2]KeyValue:
+ return formatMap(vals[:])
+ case [3]KeyValue:
+ return formatMap(vals[:])
+ case [4]KeyValue:
+ return formatMap(vals[:])
+ case [5]KeyValue:
+ return formatMap(vals[:])
+ default:
+ return formatMapReflect(v)
+ }
+}
+
+func formatMap(vals []KeyValue) string {
+ var b strings.Builder
+ appendMap(&b, vals)
+ return b.String()
+}
+
+func formatMapReflect(v any) string {
+ var b strings.Builder
+ appendMapReflect(&b, reflect.ValueOf(v))
+ return b.String()
+}
+
func appendValueSliceValue(dst *strings.Builder, v any) {
switch vals := v.(type) {
case [0]Value:
@@ -852,6 +1038,68 @@ func appendValueSliceReflect(dst *strings.Builder, rv reflect.Value) {
_ = dst.WriteByte(']')
}
+func appendMapValue(dst *strings.Builder, v any) {
+ switch vals := v.(type) {
+ case [0]KeyValue:
+ _, _ = dst.WriteString("{}")
+ case [1]KeyValue:
+ appendMap(dst, vals[:])
+ case [2]KeyValue:
+ appendMap(dst, vals[:])
+ case [3]KeyValue:
+ appendMap(dst, vals[:])
+ case [4]KeyValue:
+ appendMap(dst, vals[:])
+ case [5]KeyValue:
+ appendMap(dst, vals[:])
+ default:
+ appendMapReflect(dst, reflect.ValueOf(v))
+ }
+}
+
+func appendMap(dst *strings.Builder, vals []KeyValue) {
+ // Estimate 32 bytes per value for small values, plus key quotes, colon,
+ // and commas. Escaped keys and larger values grow the builder as needed.
+ size := len("{}") + len(vals)*commaLen + len(vals)*32
+ for _, val := range vals {
+ size += len(val.Key) + len(`"":`)
+ }
+
+ dst.Grow(size)
+ _ = dst.WriteByte('{')
+ for i, val := range vals {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ appendJSONString(dst, string(val.Key))
+ _ = dst.WriteByte(':')
+ appendJSONValue(dst, val.Value)
+ }
+ _ = dst.WriteByte('}')
+}
+
+func appendMapReflect(dst *strings.Builder, rv reflect.Value) {
+ // Estimate 32 bytes per value for small values, plus key quotes, colon,
+ // and commas. Escaped keys and larger values grow the builder as needed.
+ size := len("{}") + rv.Len()*commaLen + rv.Len()*32
+ for i := 0; i < rv.Len(); i++ {
+ size += len(rv.Index(i).Field(0).String()) + len(`"":`)
+ }
+
+ dst.Grow(size)
+ _ = dst.WriteByte('{')
+ for i := 0; i < rv.Len(); i++ {
+ if i > 0 {
+ _ = dst.WriteByte(',')
+ }
+ val := rv.Index(i).Interface().(KeyValue)
+ appendJSONString(dst, string(val.Key))
+ _ = dst.WriteByte(':')
+ appendJSONValue(dst, val.Value)
+ }
+ _ = dst.WriteByte('}')
+}
+
func appendJSONValue(dst *strings.Builder, v Value) {
switch v.Type() {
case BOOL:
@@ -894,6 +1142,8 @@ func appendJSONValue(dst *strings.Builder, v Value) {
_ = dst.WriteByte('"')
case SLICE:
appendValueSliceValue(dst, v.slice)
+ case MAP:
+ appendMapValue(dst, v.slice)
case EMPTY:
_, _ = dst.WriteString("null")
default:
diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
index b290c6d6cc86..25c739d08251 100644
--- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go
+++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package baggage // import "go.opentelemetry.io/otel/baggage"
+package baggage
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go
index a572461a05f2..4d09b59aad58 100644
--- a/vendor/go.opentelemetry.io/otel/baggage/context.go
+++ b/vendor/go.opentelemetry.io/otel/baggage/context.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package baggage // import "go.opentelemetry.io/otel/baggage"
+package baggage
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go
index b51d87cab704..74d3a8709fca 100644
--- a/vendor/go.opentelemetry.io/otel/baggage/doc.go
+++ b/vendor/go.opentelemetry.io/otel/baggage/doc.go
@@ -6,4 +6,4 @@ Package baggage provides functionality for storing and retrieving
baggage items in Go context. For propagating the baggage, see the
go.opentelemetry.io/otel/propagation package.
*/
-package baggage // import "go.opentelemetry.io/otel/baggage"
+package baggage
diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go
index d48847ed86cf..9355545a8c75 100644
--- a/vendor/go.opentelemetry.io/otel/codes/codes.go
+++ b/vendor/go.opentelemetry.io/otel/codes/codes.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package codes // import "go.opentelemetry.io/otel/codes"
+package codes
import (
"encoding/json"
@@ -81,7 +81,7 @@ func (c *Code) UnmarshalJSON(b []byte) error {
case float64:
if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {
if ci >= maxCode {
- return fmt.Errorf("invalid code: %q", ci)
+ return fmt.Errorf("invalid code: %d", ci)
}
*c = Code(ci) // nolint: gosec // Bit size of 32 check above.
diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go
index ee8db448b8bf..1073f6543963 100644
--- a/vendor/go.opentelemetry.io/otel/codes/doc.go
+++ b/vendor/go.opentelemetry.io/otel/codes/doc.go
@@ -7,4 +7,4 @@ Package codes defines the canonical error codes used by OpenTelemetry.
It conforms to [the OpenTelemetry
specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status).
*/
-package codes // import "go.opentelemetry.io/otel/codes"
+package codes
diff --git a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
index 74fa510bc84f..20eecba40dac 100644
--- a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
+++ b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile
@@ -1,4 +1,4 @@
# This is a renovate-friendly source of Docker images.
FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python
-FROM otel/weaver:v0.23.0@sha256:7984ecb55b859eb3034ae9d836c4eeda137e2bdd0873b7ba2bb6c3d24d6ff457 AS weaver
+FROM otel/weaver:v0.25.1@sha256:9ad46ca9cd4fa5974b121f886aa3e9946a8ef8ea905001a96c018d21f9db87ca AS weaver
FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown
diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go
index 921f85961ad4..92b7a0566ea2 100644
--- a/vendor/go.opentelemetry.io/otel/doc.go
+++ b/vendor/go.opentelemetry.io/otel/doc.go
@@ -22,4 +22,4 @@ To read more about logs, see go.opentelemetry.io/otel/log.
To read more about propagation, see go.opentelemetry.io/otel/propagation and
go.opentelemetry.io/otel/baggage.
*/
-package otel // import "go.opentelemetry.io/otel"
+package otel
diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go
index 67414c71e052..06fd49da2b65 100644
--- a/vendor/go.opentelemetry.io/otel/error_handler.go
+++ b/vendor/go.opentelemetry.io/otel/error_handler.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
// ErrorHandler handles irremediable events.
type ErrorHandler interface {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/client.go
index 22b8450531d4..ee6b018ddfef 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/client.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/client.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+package otlpmetricgrpc
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go
index 47eb85e9f2f6..8f6fec81f0d4 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+package otlpmetricgrpc
import (
"fmt"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/doc.go
index 62b05626fc2f..938cb6a483b3 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/doc.go
@@ -84,4 +84,4 @@ the experimental features.
[Explicit Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation
[Base2 Exponential Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#base2-exponential-bucket-histogram-aggregation
*/
-package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+package otlpmetricgrpc
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go
index b567800e3d35..302c992ee6c6 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+package otlpmetricgrpc
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter/counter.go
index df6b830d3136..57c6acb781df 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter/counter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter/counter.go
@@ -1,14 +1,14 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/counter/counter.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/counter/counter.go.tmpl
+
// Package counter provides a simple counter for generating unique IDs.
//
// This package is used to generate unique IDs while allowing testing packages
// to reset the counter.
-package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter"
+package counter
import "sync/atomic"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envconfig/envconfig.go
index 2cd98b929e14..87764a6952d1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envconfig/envconfig.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
+
// Package envconfig provides functionality to parse configuration from
// environment variables.
-package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envconfig"
+package envconfig
import (
"crypto/tls"
@@ -60,7 +60,7 @@ func WithString(n string, fn func(string)) func(e *EnvOptionsReader) {
func WithBool(n string, fn func(bool)) ConfigFn {
return func(e *EnvOptionsReader) {
if v, ok := e.GetEnvValue(n); ok {
- b := strings.ToLower(v) == "true"
+ b := strings.EqualFold(v, "true")
fn(b)
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/gen.go
index c94f85ef4475..df08789be828 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/gen.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/gen.go
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionally for the otlpmetricgrpc package.
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal"
+package internal
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess.go.tmpl "--data={}" --out=partialsuccess.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess_test.go.tmpl "--data={}" --out=partialsuccess_test.go
-//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target.go.tmpl "--data={ \"pkg\": \"observ\", \"pkg_path\": \"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ\" }" --out=observ/target.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target.go.tmpl "--data={ \"pkg\": \"observ\" }" --out=observ/target.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target_test.go.tmpl "--data={ \"pkg\": \"observ\" }" --out=observ/target_test.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/retry/retry.go.tmpl "--data={}" --out=retry/retry.go
@@ -34,7 +34,7 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/o
//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl "--data={}" --out=transform/metricdata.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlpmetric/transform/metricdata_test.go.tmpl "--data={}" --out=transform/metricdata_test.go
-//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/counter\" }" --out=counter/counter.go
+//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={}" --out=counter/counter.go
//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go
//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc\" }" --out=x/x.go
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/instrumentation.go
index 2b4dbb5d8aff..a8ffd871bea9 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/instrumentation.go
@@ -3,7 +3,7 @@
// Package observ provides self-observability metrics for OTLP metric exporters.
// This is an experimental feature controlled by the x.Observability feature flag.
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ"
+package observ
import (
"context"
@@ -17,8 +17,8 @@ import (
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/target.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/target.go
index 0be4501ece57..4d0665894174 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/target.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ/target.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/observ/target.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/observ"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/observ/target.go.tmpl
+
+package observ
import (
"errors"
@@ -41,11 +41,10 @@ func ParseCanonicalTarget(target string) (string, int, error) {
const sep = "://"
// Find scheme. Do not allocate the string by using url.Parse.
- idx := strings.Index(target, sep)
- if idx == -1 {
+ scheme, endpoint, found := strings.Cut(target, sep)
+ if !found {
return "", -1, fmt.Errorf("invalid target %q: missing scheme", target)
}
- scheme, endpoint := target[:idx], target[idx+len(sep):]
// Check for unix schemes.
if scheme == schemeUnix || scheme == schemeUnixAbstract {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/envconfig.go
index 7f947273b5e9..700dc0d1c6c4 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/envconfig.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/envconfig.go.tmpl
+
+package oconf
import (
"crypto/tls"
@@ -51,31 +51,37 @@ func getOptionsFromEnv() []GenericOption {
tlsConf := &tls.Config{}
DefaultEnvOptionsReader.Apply(
envconfig.WithURL("ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Metrics.Endpoint = u.Host
- // For OTLP/HTTP endpoint URLs without a per-signal
- // configuration, the passed endpoint is used as a base URL
- // and the signals are sent to these paths relative to that.
- cfg.Metrics.URLPath = path.Join(u.Path, DefaultMetricsPath)
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Metrics.Endpoint = u.Host
+ // For OTLP/HTTP endpoint URLs without a per-signal
+ // configuration, the passed endpoint is used as a base URL
+ // and the signals are sent to these paths relative to that.
+ cfg.Metrics.URLPath = path.Join(u.Path, DefaultMetricsPath)
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithURL("METRICS_ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Metrics.Endpoint = u.Host
- // For endpoint URLs for OTLP/HTTP per-signal variables, the
- // URL MUST be used as-is without any modification. The only
- // exception is that if an URL contains no path part, the root
- // path / MUST be used.
- path := u.Path
- if path == "" {
- path = "/"
- }
- cfg.Metrics.URLPath = path
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Metrics.Endpoint = u.Host
+ // For endpoint URLs for OTLP/HTTP per-signal variables, the
+ // URL MUST be used as-is without any modification. The only
+ // exception is that if an URL contains no path part, the root
+ // path / MUST be used.
+ path := u.Path
+ if path == "" {
+ path = "/"
+ }
+ cfg.Metrics.URLPath = path
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithCertPool("CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
envconfig.WithCertPool("METRICS_CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
@@ -152,7 +158,7 @@ func withInsecure(b bool) GenericOption {
}
func withTLSConfig(c *tls.Config, fn func(*tls.Config)) func(e *envconfig.EnvOptionsReader) {
- return func(e *envconfig.EnvOptionsReader) {
+ return func(*envconfig.EnvOptionsReader) {
if c.RootCAs != nil || len(c.Certificates) > 0 {
fn(c)
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go
index b89d7eeb710a..4b4f164e1be3 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/options.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/options.go.tmpl
+
// Package oconf provides configuration for the otlpmetric exporters.
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf"
+package oconf
import (
"crypto/tls"
@@ -112,7 +112,7 @@ func NewHTTPConfig(opts ...HTTPOption) Config {
// cleanPath returns a path with all spaces trimmed. If urlPath is empty,
// defaultPath is returned instead.
-func cleanPath(urlPath string, defaultPath string) string {
+func cleanPath(urlPath, defaultPath string) string {
tmp := strings.TrimSpace(urlPath)
if tmp == "" || tmp == "." {
return defaultPath
@@ -148,7 +148,7 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultServiceConfig(cfg.ServiceConfig))
}
// Prioritize GRPCCredentials over Insecure (passing both is an error).
- if cfg.Metrics.GRPCCredentials != nil {
+ if cfg.Metrics.GRPCCredentials != nil { //nolint:gocritic // if-else is clearer than switch
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(cfg.Metrics.GRPCCredentials))
} else if cfg.Metrics.Insecure {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
@@ -242,7 +242,7 @@ func (g *splitOption) ApplyHTTPOption(cfg Config) Config {
func (splitOption) private() {}
-func newSplitOption(httpFn func(cfg Config) Config, grpcFn func(cfg Config) Config) GenericOption {
+func newSplitOption(httpFn, grpcFn func(cfg Config) Config) GenericOption {
return &splitOption{httpFn: httpFn, grpcFn: grpcFn}
}
@@ -295,6 +295,11 @@ func WithEndpointURL(v string) GenericOption {
cfg.Metrics.Endpoint = u.Host
cfg.Metrics.URLPath = u.Path
+ if cfg.Metrics.URLPath == "" {
+ // For HTTP exporters, a URL without a path targets the root path. Set it explicitly so the default signal
+ // path is not appended by cleanPath. (URLPath is ignored by gRPC exporters.)
+ cfg.Metrics.URLPath = "/"
+ }
cfg.Metrics.Insecure = u.Scheme != "https"
return cfg
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/optiontypes.go
index c18a6b1f2a47..79f77841aa1f 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/optiontypes.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/optiontypes.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl
+
+package oconf
import "time"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/tls.go
index e4547b3a63b1..4ed82885a5e2 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/tls.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/tls.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/tls.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/tls.go.tmpl
+
+package oconf
import (
"crypto/tls"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/partialsuccess.go
index 243abcb1718d..1138f2e718bb 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/partialsuccess.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/partialsuccess.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/partialsuccess.go
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/partialsuccess.go
+
+package internal
import "fmt"
@@ -41,7 +41,7 @@ func (ps PartialSuccess) As(target any) bool {
}
// Is supports the errors.Is() interface.
-func (ps PartialSuccess) Is(err error) bool {
+func (PartialSuccess) Is(err error) bool {
_, ok := err.(PartialSuccess)
return ok
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go
index c14e5ae78a04..1883d0600a83 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go
@@ -1,13 +1,13 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/retry/retry.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/retry/retry.go.tmpl
+
// Package retry provides request retry functionality that can perform
// configurable exponential backoff for transient errors and honor any
// explicit throttle responses received.
-package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry"
+package retry
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/attribute.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/attribute.go
index 96420d421e0e..9fea51b46cc6 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/attribute.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/attribute.go
@@ -1,14 +1,15 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/attribute.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/attribute.go.tmpl
+
+package transform
import (
- "go.opentelemetry.io/otel/attribute"
cpb "go.opentelemetry.io/proto/otlp/common/v1"
+
+ "go.opentelemetry.io/otel/attribute"
)
// AttrIter transforms an attribute iterator into OTLP key-values.
@@ -91,6 +92,12 @@ func Value(v attribute.Value) *cpb.AnyValue {
Values: attrValues(v.AsSlice()),
},
}
+ case attribute.MAP:
+ av.Value = &cpb.AnyValue_KvlistValue{
+ KvlistValue: &cpb.KeyValueList{
+ Values: KeyValues(v.AsMap()),
+ },
+ }
case attribute.STRINGSLICE:
av.Value = &cpb.AnyValue_ArrayValue{
ArrayValue: &cpb.ArrayValue{
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go
index f03bfec419a9..728502222cc3 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/error.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/error.go.tmpl
+
+package transform
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go
index 9c156e91b1d3..6c07896a835d 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go
@@ -1,21 +1,22 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl
+
// Package transform provides transformation functionality from the
// sdk/metric/metricdata data-types into OTLP data-types.
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform"
+package transform
import (
"fmt"
"time"
- "go.opentelemetry.io/otel/sdk/metric/metricdata"
cpb "go.opentelemetry.io/proto/otlp/common/v1"
mpb "go.opentelemetry.io/proto/otlp/metrics/v1"
rpb "go.opentelemetry.io/proto/otlp/resource/v1"
+
+ "go.opentelemetry.io/otel/sdk/metric/metricdata"
)
// ResourceMetrics returns an OTLP ResourceMetrics generated from rm. If rm
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/observ.go
index cc055ea4799f..f292e095c4a0 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/observ.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/observ.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x"
+package x
import "strings"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/x.go
index d42827877a42..02d7fbefe64b 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x/x.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/x/x.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc].
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x"
+package x
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go
index 8ee005c63382..4ab57afe2de7 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go
@@ -1,9 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
+package otlpmetricgrpc
// Version is the current release version of the OpenTelemetry OTLP over gRPC metrics exporter in use.
func Version() string {
- return "1.44.0"
+ return "1.45.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go
index b7ca17fe3313..41aa7ff34686 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
+package otlpmetrichttp
import (
"bytes"
@@ -341,7 +341,7 @@ func (r *request) reset(ctx context.Context) {
// retryableError represents a request failure that can be retried.
type retryableError struct {
- throttle int64
+ throttle time.Duration
err error
}
@@ -351,15 +351,29 @@ type retryableError struct {
func newResponseError(header http.Header, wrapped error) error {
var rErr retryableError
if v := header.Get("Retry-After"); v != "" {
- if t, err := strconv.ParseInt(v, 10, 64); err == nil {
- rErr.throttle = t
- }
+ rErr.throttle = retryAfterDuration(v)
}
rErr.err = wrapped
return rErr
}
+func retryAfterDuration(v string) time.Duration {
+ if t, err := strconv.ParseInt(v, 10, 64); err == nil && t >= 0 {
+ const maxRetryAfterSeconds = int64(1<<63-1) / int64(time.Second)
+ if t > maxRetryAfterSeconds {
+ return time.Duration(1<<63 - 1)
+ }
+ return time.Duration(t) * time.Second
+ }
+
+ if date, err := http.ParseTime(v); err == nil {
+ return max(time.Until(date), 0)
+ }
+
+ return 0
+}
+
func (e retryableError) Error() string {
if e.err != nil {
return "retry-able request failure: " + e.err.Error()
@@ -401,5 +415,5 @@ func evaluate(err error) (bool, time.Duration) {
return false, 0
}
- return true, time.Duration(rErr.throttle)
+ return true, rErr.throttle
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/config.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/config.go
index c6175507a98a..35e6bb12d265 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/config.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
+package otlpmetrichttp
import (
"crypto/tls"
@@ -86,6 +86,11 @@ func WithEndpoint(endpoint string) Option {
//
// If an invalid URL is provided, the default value will be kept.
//
+// The path of the provided URL is used as-is; with one exception: if the URL has
+// no path, it is normalized to the root path ("/"). The default metrics path
+// ("/v1/metrics") is not appended automatically. Use WithEndpoint if you want
+// that behavior, or pass a URL that includes that path.
+//
// By default, if an environment variable is not set, and this option is not
// passed, "localhost:4318" will be used.
//
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/doc.go
index a2ea04922e29..a5e15efd6345 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/doc.go
@@ -84,4 +84,4 @@ The configuration can be overridden by [WithAggregationSelector] option.
[Explicit Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation
[Base2 Exponential Bucket Histogram Aggregation]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.26.0/specification/metrics/sdk.md#base2-exponential-bucket-histogram-aggregation
*/
-package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
+package otlpmetrichttp
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go
index 292645a38cca..ea4e20c23bd9 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
+package otlpmetrichttp
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter/counter.go
index 267cb03d9236..57c6acb781df 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter/counter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter/counter.go
@@ -1,14 +1,14 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/counter/counter.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/counter/counter.go.tmpl
+
// Package counter provides a simple counter for generating unique IDs.
//
// This package is used to generate unique IDs while allowing testing packages
// to reset the counter.
-package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter"
+package counter
import "sync/atomic"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envconfig/envconfig.go
index 8be035fcabc9..87764a6952d1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envconfig/envconfig.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
+
// Package envconfig provides functionality to parse configuration from
// environment variables.
-package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envconfig"
+package envconfig
import (
"crypto/tls"
@@ -60,7 +60,7 @@ func WithString(n string, fn func(string)) func(e *EnvOptionsReader) {
func WithBool(n string, fn func(bool)) ConfigFn {
return func(e *EnvOptionsReader) {
if v, ok := e.GetEnvValue(n); ok {
- b := strings.ToLower(v) == "true"
+ b := strings.EqualFold(v, "true")
fn(b)
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/gen.go
index f3d165a571fa..9b1727caaa1d 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/gen.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/gen.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionally for the otlpmetrichttp package.
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal"
+package internal
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess.go.tmpl "--data={}" --out=partialsuccess.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess_test.go.tmpl "--data={}" --out=partialsuccess_test.go
@@ -31,7 +31,7 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/o
//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl "--data={}" --out=transform/metricdata.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlpmetric/transform/metricdata_test.go.tmpl "--data={}" --out=transform/metricdata_test.go
-//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/counter\" }" --out=counter/counter.go
+//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={}" --out=counter/counter.go
//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go
//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x\" }" --out=x/x.go
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/count.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/count.go
index 8b5bb1faaf92..b046b195e020 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/count.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/count.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ"
+package observ
import metricpb "go.opentelemetry.io/proto/otlp/metrics/v1"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/instrumentation.go
index 5db984a235db..b28b2f88698d 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ/instrumentation.go
@@ -3,7 +3,7 @@
// Package observ provides experimental observability instrumentation for the
// otlpmetrichttp exporter.
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/observ"
+package observ
import (
"context"
@@ -25,8 +25,8 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/metric"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/envconfig.go
index 69224c97de8b..c0a6392dd35f 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/envconfig.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/envconfig.go.tmpl
+
+package oconf
import (
"crypto/tls"
@@ -51,31 +51,37 @@ func getOptionsFromEnv() []GenericOption {
tlsConf := &tls.Config{}
DefaultEnvOptionsReader.Apply(
envconfig.WithURL("ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Metrics.Endpoint = u.Host
- // For OTLP/HTTP endpoint URLs without a per-signal
- // configuration, the passed endpoint is used as a base URL
- // and the signals are sent to these paths relative to that.
- cfg.Metrics.URLPath = path.Join(u.Path, DefaultMetricsPath)
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Metrics.Endpoint = u.Host
+ // For OTLP/HTTP endpoint URLs without a per-signal
+ // configuration, the passed endpoint is used as a base URL
+ // and the signals are sent to these paths relative to that.
+ cfg.Metrics.URLPath = path.Join(u.Path, DefaultMetricsPath)
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithURL("METRICS_ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Metrics.Endpoint = u.Host
- // For endpoint URLs for OTLP/HTTP per-signal variables, the
- // URL MUST be used as-is without any modification. The only
- // exception is that if an URL contains no path part, the root
- // path / MUST be used.
- path := u.Path
- if path == "" {
- path = "/"
- }
- cfg.Metrics.URLPath = path
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Metrics.Endpoint = u.Host
+ // For endpoint URLs for OTLP/HTTP per-signal variables, the
+ // URL MUST be used as-is without any modification. The only
+ // exception is that if an URL contains no path part, the root
+ // path / MUST be used.
+ path := u.Path
+ if path == "" {
+ path = "/"
+ }
+ cfg.Metrics.URLPath = path
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithCertPool("CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
envconfig.WithCertPool("METRICS_CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
@@ -152,7 +158,7 @@ func withInsecure(b bool) GenericOption {
}
func withTLSConfig(c *tls.Config, fn func(*tls.Config)) func(e *envconfig.EnvOptionsReader) {
- return func(e *envconfig.EnvOptionsReader) {
+ return func(*envconfig.EnvOptionsReader) {
if c.RootCAs != nil || len(c.Certificates) > 0 {
fn(c)
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go
index 3fa7cbe5f652..a3e4641c2030 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/options.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/options.go.tmpl
+
// Package oconf provides configuration for the otlpmetric exporters.
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf"
+package oconf
import (
"crypto/tls"
@@ -112,7 +112,7 @@ func NewHTTPConfig(opts ...HTTPOption) Config {
// cleanPath returns a path with all spaces trimmed. If urlPath is empty,
// defaultPath is returned instead.
-func cleanPath(urlPath string, defaultPath string) string {
+func cleanPath(urlPath, defaultPath string) string {
tmp := strings.TrimSpace(urlPath)
if tmp == "" || tmp == "." {
return defaultPath
@@ -148,7 +148,7 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultServiceConfig(cfg.ServiceConfig))
}
// Prioritize GRPCCredentials over Insecure (passing both is an error).
- if cfg.Metrics.GRPCCredentials != nil {
+ if cfg.Metrics.GRPCCredentials != nil { //nolint:gocritic // if-else is clearer than switch
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(cfg.Metrics.GRPCCredentials))
} else if cfg.Metrics.Insecure {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
@@ -242,7 +242,7 @@ func (g *splitOption) ApplyHTTPOption(cfg Config) Config {
func (splitOption) private() {}
-func newSplitOption(httpFn func(cfg Config) Config, grpcFn func(cfg Config) Config) GenericOption {
+func newSplitOption(httpFn, grpcFn func(cfg Config) Config) GenericOption {
return &splitOption{httpFn: httpFn, grpcFn: grpcFn}
}
@@ -295,6 +295,11 @@ func WithEndpointURL(v string) GenericOption {
cfg.Metrics.Endpoint = u.Host
cfg.Metrics.URLPath = u.Path
+ if cfg.Metrics.URLPath == "" {
+ // For HTTP exporters, a URL without a path targets the root path. Set it explicitly so the default signal
+ // path is not appended by cleanPath. (URLPath is ignored by gRPC exporters.)
+ cfg.Metrics.URLPath = "/"
+ }
cfg.Metrics.Insecure = u.Scheme != "https"
return cfg
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/optiontypes.go
index d7b005c97d6e..79f77841aa1f 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/optiontypes.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/optiontypes.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/optiontypes.go.tmpl
+
+package oconf
import "time"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/tls.go
index e335cbd090ac..4ed82885a5e2 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/tls.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/tls.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/oconf/tls.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package oconf // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/oconf/tls.go.tmpl
+
+package oconf
import (
"crypto/tls"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/partialsuccess.go
index 04190f5301e7..1138f2e718bb 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/partialsuccess.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/partialsuccess.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/partialsuccess.go
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/partialsuccess.go
+
+package internal
import "fmt"
@@ -41,7 +41,7 @@ func (ps PartialSuccess) As(target any) bool {
}
// Is supports the errors.Is() interface.
-func (ps PartialSuccess) Is(err error) bool {
+func (PartialSuccess) Is(err error) bool {
_, ok := err.(PartialSuccess)
return ok
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go
index b4b5c013d4c0..1883d0600a83 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go
@@ -1,13 +1,13 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/retry/retry.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/retry/retry.go.tmpl
+
// Package retry provides request retry functionality that can perform
// configurable exponential backoff for transient errors and honor any
// explicit throttle responses received.
-package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry"
+package retry
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/attribute.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/attribute.go
index 6a91ff2af2ad..9fea51b46cc6 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/attribute.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/attribute.go
@@ -1,14 +1,15 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/attribute.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/attribute.go.tmpl
+
+package transform
import (
- "go.opentelemetry.io/otel/attribute"
cpb "go.opentelemetry.io/proto/otlp/common/v1"
+
+ "go.opentelemetry.io/otel/attribute"
)
// AttrIter transforms an attribute iterator into OTLP key-values.
@@ -91,6 +92,12 @@ func Value(v attribute.Value) *cpb.AnyValue {
Values: attrValues(v.AsSlice()),
},
}
+ case attribute.MAP:
+ av.Value = &cpb.AnyValue_KvlistValue{
+ KvlistValue: &cpb.KeyValueList{
+ Values: KeyValues(v.AsMap()),
+ },
+ }
case attribute.STRINGSLICE:
av.Value = &cpb.AnyValue_ArrayValue{
ArrayValue: &cpb.ArrayValue{
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go
index f65c87cbfd58..728502222cc3 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/error.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/error.go.tmpl
+
+package transform
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go
index 5e5f26aa409d..6c07896a835d 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go
@@ -1,21 +1,22 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlpmetric/transform/metricdata.go.tmpl
+
// Package transform provides transformation functionality from the
// sdk/metric/metricdata data-types into OTLP data-types.
-package transform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform"
+package transform
import (
"fmt"
"time"
- "go.opentelemetry.io/otel/sdk/metric/metricdata"
cpb "go.opentelemetry.io/proto/otlp/common/v1"
mpb "go.opentelemetry.io/proto/otlp/metrics/v1"
rpb "go.opentelemetry.io/proto/otlp/resource/v1"
+
+ "go.opentelemetry.io/otel/sdk/metric/metricdata"
)
// ResourceMetrics returns an OTLP ResourceMetrics generated from rm. If rm
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/version.go
index 103ac79d0ee0..fdd5f6bddd19 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/version.go
@@ -1,8 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal"
+package internal
// Version is the current release version of the OpenTelemetry OTLP HTTP metric
// exporter in use.
-const Version = "1.44.0"
+const Version = "1.45.0"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/README.md b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/README.md
index ef239cbae0a5..745170a8039a 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/README.md
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/README.md
@@ -24,7 +24,7 @@ When enabled, the exporter will create the following metrics using the global `M
Please see the [Semantic conventions for OpenTelemetry SDK metrics] documentation for more details on these metrics.
-[Semantic conventions for OpenTelemetry SDK metrics]: https://github.com/open-telemetry/semantic-conventions/blob/v1.41.0/docs/otel/sdk-metrics.md
+[Semantic conventions for OpenTelemetry SDK metrics]: https://github.com/open-telemetry/semantic-conventions/blob/v1.43.0/docs/otel/sdk-metrics.md
## Compatibility and Stability
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/observ.go
index 296946a3b7b3..76b6fdebdb04 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/observ.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/observ.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x"
+package x
import "strings"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/x.go
index 663375f63af3..87c19a26887e 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x/x.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/x/x.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x].
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x"
+package x
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go
index da551839dc35..273e5e791eef 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp"
+package otlpmetrichttp
// Version is the current release version of the OpenTelemetry OTLP over HTTP/protobuf metrics exporter in use.
func Version() string {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
index 3c1a625c0678..d97fada29fb2 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+package otlptrace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
index 09ad5eadb6fa..5fd4bf5bb550 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
@@ -7,4 +7,4 @@ See the official OTLP span exporter implementations:
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc],
- [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp].
*/
-package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+package otlptrace
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
index 30446bd28b64..037d485d5e00 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+package otlptrace
import (
"context"
@@ -97,9 +97,9 @@ func NewUnstarted(client Client) *Exporter {
func (e *Exporter) MarshalLog() any {
return struct {
Type string
- Client Client
+ Client string
}{
Type: "otlptrace",
- Client: e.client,
+ Client: fmt.Sprintf("%T", e.client),
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
index 0d43a5dc5b7f..86a34d3b9fb6 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
@@ -3,7 +3,7 @@
// Package tracetransform provides conversion functionality for the otlptrace
// exporters.
-package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+package tracetransform
import (
commonpb "go.opentelemetry.io/proto/otlp/common/v1"
@@ -97,6 +97,12 @@ func Value(v attribute.Value) *commonpb.AnyValue {
Values: values(v.AsSlice()),
},
}
+ case attribute.MAP:
+ av.Value = &commonpb.AnyValue_KvlistValue{
+ KvlistValue: &commonpb.KeyValueList{
+ Values: KeyValues(v.AsMap()),
+ },
+ }
case attribute.STRINGSLICE:
av.Value = &commonpb.AnyValue_ArrayValue{
ArrayValue: &commonpb.ArrayValue{
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
index 43359c894496..078a9db0ab96 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+package tracetransform
import (
commonpb "go.opentelemetry.io/proto/otlp/common/v1"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
index 526bb5e070b5..14e5bdc56300 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+package tracetransform
import (
resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
index d431fc4517d9..3ab14b54fd13 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+package tracetransform
import (
"math"
@@ -37,21 +37,22 @@ func Spans(sdl []tracesdk.ReadOnlySpan) []*tracepb.ResourceSpans {
}
rKey := sd.Resource().Equivalent()
+ scope := sd.InstrumentationScope()
k := key{
r: rKey,
- is: sd.InstrumentationScope(),
+ is: scope,
}
scopeSpan, iOk := ssm[k]
if !iOk {
// Either the resource or instrumentation scope were unknown.
scopeSpan = &tracepb.ScopeSpans{
- Scope: InstrumentationScope(sd.InstrumentationScope()),
+ Scope: InstrumentationScope(scope),
Spans: []*tracepb.Span{},
- SchemaUrl: sd.InstrumentationScope().SchemaURL,
+ SchemaUrl: scope.SchemaURL,
}
+ ssm[k] = scopeSpan
}
scopeSpan.Spans = append(scopeSpan.Spans, span(sd))
- ssm[k] = scopeSpan
rs, rOk := rsm[rKey]
if !rOk {
@@ -90,14 +91,16 @@ func span(sd tracesdk.ReadOnlySpan) *tracepb.Span {
return nil
}
- tid := sd.SpanContext().TraceID()
- sid := sd.SpanContext().SpanID()
+ spanContext := sd.SpanContext()
+ tid := spanContext.TraceID()
+ sid := spanContext.SpanID()
+ sdStatus := sd.Status()
s := &tracepb.Span{
TraceId: tid[:],
SpanId: sid[:],
- TraceState: sd.SpanContext().TraceState().String(),
- Status: status(sd.Status().Code, sd.Status().Description),
+ TraceState: spanContext.TraceState().String(),
+ Status: status(sdStatus.Code, sdStatus.Description),
StartTimeUnixNano: uint64(max(0, sd.StartTime().UnixNano())), // nolint:gosec // Overflow checked.
EndTimeUnixNano: uint64(max(0, sd.EndTime().UnixNano())), // nolint:gosec // Overflow checked.
Links: links(sd.Links()),
@@ -110,10 +113,11 @@ func span(sd tracesdk.ReadOnlySpan) *tracepb.Span {
DroppedLinksCount: clampUint32(sd.DroppedLinks()),
}
- if psid := sd.Parent().SpanID(); psid.IsValid() {
+ sdParent := sd.Parent()
+ if psid := sdParent.SpanID(); psid.IsValid() {
s.ParentSpanId = psid[:]
}
- s.Flags = buildSpanFlagsWith(sd.SpanContext().TraceFlags(), sd.Parent())
+ s.Flags = buildSpanFlagsWith(spanContext.TraceFlags(), sdParent)
return s
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
index e8b33d3fa553..494bece44ea1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+package otlptracegrpc
import (
"context"
@@ -328,12 +328,10 @@ func throttleDelay(s *status.Status) (bool, time.Duration) {
}
// MarshalLog is the marshaling function used by the logging system to represent this Client.
-func (c *client) MarshalLog() any {
+func (*client) MarshalLog() any {
return struct {
- Type string
- Endpoint string
+ Type string
}{
- Type: "otlptracegrpc",
- Endpoint: c.endpoint,
+ Type: "otlptracegrpc",
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
index b7bd429ffdff..b01358fc83ce 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
@@ -62,4 +62,4 @@ The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] opti
[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
*/
-package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+package otlptracegrpc
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go
index b826b84247e0..d75b18443d34 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+package otlptracegrpc
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go
index 323b2a2c9a6f..57c6acb781df 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter/counter.go
@@ -1,14 +1,14 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/counter/counter.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/counter/counter.go.tmpl
+
// Package counter provides a simple counter for generating unique IDs.
//
// This package is used to generate unique IDs while allowing testing packages
// to reset the counter.
-package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter"
+package counter
import "sync/atomic"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
index 6eacdf311d28..87764a6952d1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
+
// Package envconfig provides functionality to parse configuration from
// environment variables.
-package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig"
+package envconfig
import (
"crypto/tls"
@@ -60,7 +60,7 @@ func WithString(n string, fn func(string)) func(e *EnvOptionsReader) {
func WithBool(n string, fn func(bool)) ConfigFn {
return func(e *EnvOptionsReader) {
if v, ok := e.GetEnvValue(n); ok {
- b := strings.ToLower(v) == "true"
+ b := strings.EqualFold(v, "true")
fn(b)
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go
index 7fe9c9f3a335..ec16d01457f9 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionally for the otlptracegrpc package.
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+package internal
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess.go.tmpl "--data={}" --out=partialsuccess.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess_test.go.tmpl "--data={}" --out=partialsuccess_test.go
@@ -27,8 +27,8 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/ot
//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc\" }" --out=x/x.go
//go:generate gotmpl --body=../../../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go
-//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target.go.tmpl "--data={ \"pkg\": \"observ\", \"pkg_path\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ\" }" --out=observ/target.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target.go.tmpl "--data={ \"pkg\": \"observ\" }" --out=observ/target.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/observ/target_test.go.tmpl "--data={ \"pkg\": \"observ\" }" --out=observ/target_test.go
-//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/counter\" }" --out=counter/counter.go
+//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={}" --out=counter/counter.go
//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go
index 0dd54e4b9690..32188bf72be7 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/doc.go
@@ -3,4 +3,4 @@
// Package observ provides experimental observability instrumentation for the
// otlptracegrpc exporter.
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ"
+package observ
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
index 676a93514bd7..d6730bc1ecdf 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/instrumentation.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ"
+package observ
import (
"context"
@@ -18,8 +18,8 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/metric"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go
index 34eee27db0dc..4d0665894174 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/target.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/observ/target.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/observ/target.go.tmpl
+
+package observ
import (
"errors"
@@ -41,11 +41,10 @@ func ParseCanonicalTarget(target string) (string, int, error) {
const sep = "://"
// Find scheme. Do not allocate the string by using url.Parse.
- idx := strings.Index(target, sep)
- if idx == -1 {
+ scheme, endpoint, found := strings.Cut(target, sep)
+ if !found {
return "", -1, fmt.Errorf("invalid target %q: missing scheme", target)
}
- scheme, endpoint := target[:idx], target[idx+len(sep):]
// Check for unix schemes.
if scheme == schemeUnix || scheme == schemeUnixAbstract {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go
index 1d840be205b7..8b3f729fde20 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl
+
+package otlpconfig
import (
"crypto/tls"
@@ -49,31 +49,37 @@ func getOptionsFromEnv() []GenericOption {
tlsConf := &tls.Config{}
DefaultEnvOptionsReader.Apply(
envconfig.WithURL("ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Traces.Endpoint = u.Host
- // For OTLP/HTTP endpoint URLs without a per-signal
- // configuration, the passed endpoint is used as a base URL
- // and the signals are sent to these paths relative to that.
- cfg.Traces.URLPath = path.Join(u.Path, DefaultTracesPath)
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For OTLP/HTTP endpoint URLs without a per-signal
+ // configuration, the passed endpoint is used as a base URL
+ // and the signals are sent to these paths relative to that.
+ cfg.Traces.URLPath = path.Join(u.Path, DefaultTracesPath)
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithURL("TRACES_ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Traces.Endpoint = u.Host
- // For endpoint URLs for OTLP/HTTP per-signal variables, the
- // URL MUST be used as-is without any modification. The only
- // exception is that if an URL contains no path part, the root
- // path / MUST be used.
- path := u.Path
- if path == "" {
- path = "/"
- }
- cfg.Traces.URLPath = path
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For endpoint URLs for OTLP/HTTP per-signal variables, the
+ // URL MUST be used as-is without any modification. The only
+ // exception is that if an URL contains no path part, the root
+ // path / MUST be used.
+ path := u.Path
+ if path == "" {
+ path = "/"
+ }
+ cfg.Traces.URLPath = path
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithCertPool("CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
envconfig.WithCertPool("TRACES_CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
@@ -142,7 +148,7 @@ func withInsecure(b bool) GenericOption {
}
func withTLSConfig(c *tls.Config, fn func(*tls.Config)) func(e *envconfig.EnvOptionsReader) {
- return func(e *envconfig.EnvOptionsReader) {
+ return func(*envconfig.EnvOptionsReader) {
if c.RootCAs != nil || len(c.Certificates) > 0 {
fn(c)
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
index d940b67625fa..36cf1e267cbc 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl
+
// Package otlpconfig provides configuration for the otlptrace exporters.
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+package otlpconfig
import (
"crypto/tls"
@@ -99,7 +99,7 @@ func NewHTTPConfig(opts ...HTTPOption) Config {
// cleanPath returns a path with all spaces trimmed. If urlPath is empty,
// defaultPath is returned instead.
-func cleanPath(urlPath string, defaultPath string) string {
+func cleanPath(urlPath, defaultPath string) string {
tmp := strings.TrimSpace(urlPath)
if tmp == "" || tmp == "." {
return defaultPath
@@ -134,7 +134,7 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultServiceConfig(cfg.ServiceConfig))
}
// Prioritize GRPCCredentials over Insecure (passing both is an error).
- if cfg.Traces.GRPCCredentials != nil {
+ if cfg.Traces.GRPCCredentials != nil { //nolint:gocritic // if-else is clearer than switch
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(cfg.Traces.GRPCCredentials))
} else if cfg.Traces.Insecure {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
@@ -228,7 +228,7 @@ func (g *splitOption) ApplyHTTPOption(cfg Config) Config {
func (splitOption) private() {}
-func newSplitOption(httpFn func(cfg Config) Config, grpcFn func(cfg Config) Config) GenericOption {
+func newSplitOption(httpFn, grpcFn func(cfg Config) Config) GenericOption {
return &splitOption{httpFn: httpFn, grpcFn: grpcFn}
}
@@ -286,6 +286,11 @@ func WithEndpointURL(v string) GenericOption {
cfg.Traces.Endpoint = u.Host
cfg.Traces.URLPath = u.Path
+ if cfg.Traces.URLPath == "" {
+ // For HTTP exporters, a URL without a path targets the root path. Set it explicitly so the default signal
+ // path is not appended by cleanPath. (URLPath is ignored by gRPC exporters.)
+ cfg.Traces.URLPath = "/"
+ }
cfg.Traces.Insecure = u.Scheme != "https"
return cfg
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go
index 91849038722e..213c3605f201 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl
+
+package otlpconfig
const (
// DefaultCollectorGRPCPort is the default gRPC port of the collector.
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go
index ba6e411835f4..a14d5e6ecfe7 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl
+
+package otlpconfig
import (
"crypto/tls"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go
index a811a07b3529..1138f2e718bb 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/partialsuccess.go
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/partialsuccess.go
+
+package internal
import "fmt"
@@ -41,7 +41,7 @@ func (ps PartialSuccess) As(target any) bool {
}
// Is supports the errors.Is() interface.
-func (ps PartialSuccess) Is(err error) bool {
+func (PartialSuccess) Is(err error) bool {
_, ok := err.(PartialSuccess)
return ok
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go
index a7b8e81a7868..1883d0600a83 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go
@@ -1,13 +1,13 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/retry/retry.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/retry/retry.go.tmpl
+
// Package retry provides request retry functionality that can perform
// configurable exponential backoff for transient errors and honor any
// explicit throttle responses received.
-package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
+package retry
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
index 28e51e443fca..942d37af7cb8 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/version.go
@@ -1,8 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+package internal
// Version is the current release version of the OpenTelemetry OTLP gRPC trace
// exporter in use.
-const Version = "1.44.0"
+const Version = "1.45.0"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go
index 4e89c6524f0b..76b6fdebdb04 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/observ.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x"
+package x
import "strings"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go
index 741ba62c97f7..69ce31eef35a 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x/x.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/x/x.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc].
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x"
+package x
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
index b320060525ec..ea20363c05fc 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+package otlptracegrpc
import (
"fmt"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
index f81098b38110..5b122f3c4d47 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
+package otlptracehttp
import (
"bytes"
@@ -334,15 +334,11 @@ func (c *client) newRequest(body []byte) (request, error) {
}
// MarshalLog is the marshaling function used by the logging system to represent this Client.
-func (c *client) MarshalLog() any {
+func (*client) MarshalLog() any {
return struct {
- Type string
- Endpoint string
- Insecure bool
+ Type string
}{
- Type: "otlptracehttp",
- Endpoint: c.cfg.Endpoint,
- Insecure: c.cfg.Insecure,
+ Type: "otlptracehttp",
}
}
@@ -376,7 +372,7 @@ func (r *request) reset(ctx context.Context) {
// retryableError represents a request failure that can be retried.
type retryableError struct {
- throttle int64
+ throttle time.Duration
err error
}
@@ -385,16 +381,30 @@ type retryableError struct {
// if it is not nil.
func newResponseError(header http.Header, wrapped error) error {
var rErr retryableError
- if s, ok := header["Retry-After"]; ok {
- if t, err := strconv.ParseInt(s[0], 10, 64); err == nil {
- rErr.throttle = t
- }
+ if v := header.Get("Retry-After"); v != "" {
+ rErr.throttle = retryAfterDuration(v)
}
rErr.err = wrapped
return rErr
}
+func retryAfterDuration(v string) time.Duration {
+ if t, err := strconv.ParseInt(v, 10, 64); err == nil && t >= 0 {
+ const maxRetryAfterSeconds = int64(1<<63-1) / int64(time.Second)
+ if t > maxRetryAfterSeconds {
+ return time.Duration(1<<63 - 1)
+ }
+ return time.Duration(t) * time.Second
+ }
+
+ if date, err := http.ParseTime(v); err == nil {
+ return max(time.Until(date), 0)
+ }
+
+ return 0
+}
+
func (e retryableError) Error() string {
if e.err != nil {
return "retry-able request failure: " + e.err.Error()
@@ -436,7 +446,7 @@ func evaluate(err error) (bool, time.Duration) {
return false, 0
}
- return true, time.Duration(rErr.throttle)
+ return true, rErr.throttle
}
func (c *client) getScheme() string {
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
index 85645e118e5a..2064db57126c 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/doc.go
@@ -65,4 +65,4 @@ The configuration can be overridden by [WithTLSClientConfig] option.
[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
*/
-package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
+package otlptracehttp
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
index fae89ea4fe67..b6e1214c88e1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
+package otlptracehttp
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
index 75e5c0c7ed38..57c6acb781df 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter/counter.go
@@ -1,14 +1,14 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/counter/counter.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/counter/counter.go.tmpl
+
// Package counter provides a simple counter for generating unique IDs.
//
// This package is used to generate unique IDs while allowing testing packages
// to reset the counter.
-package counter // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter"
+package counter
import "sync/atomic"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
index f4385fb4e9ea..87764a6952d1 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig/envconfig.go
@@ -1,12 +1,12 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
+
// Package envconfig provides functionality to parse configuration from
// environment variables.
-package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig"
+package envconfig
import (
"crypto/tls"
@@ -60,7 +60,7 @@ func WithString(n string, fn func(string)) func(e *EnvOptionsReader) {
func WithBool(n string, fn func(bool)) ConfigFn {
return func(e *EnvOptionsReader) {
if v, ok := e.GetEnvValue(n); ok {
- b := strings.ToLower(v) == "true"
+ b := strings.EqualFold(v, "true")
fn(b)
}
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
index ca387432fd5b..9064f6564e3c 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/gen.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionally for the otlptracehttp package.
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal"
+package internal
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess.go.tmpl "--data={}" --out=partialsuccess.go
//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess_test.go.tmpl "--data={}" --out=partialsuccess_test.go
@@ -26,6 +26,6 @@ package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/ot
//go:generate gotmpl --body=../../../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp\" }" --out=x/x.go
-//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/counter\" }" --out=counter/counter.go
+//go:generate gotmpl --body=../../../../../internal/shared/counter/counter.go.tmpl "--data={}" --out=counter/counter.go
//go:generate gotmpl --body=../../../../../internal/shared/counter/counter_test.go.tmpl "--data={}" --out=counter/counter_test.go
//go:generate gotmpl --body=../../../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
index 1f4fc55c6f6c..14ef0bbd839f 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ/instrumentation.go
@@ -3,7 +3,7 @@
// Package observ provides experimental observability instrumentation for the
// otlptracehttp exporter.
-package observ // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/observ"
+package observ
import (
"context"
@@ -23,8 +23,8 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/metric"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
index 121b02f5cd32..f630d66b8fce 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl
+
+package otlpconfig
import (
"crypto/tls"
@@ -49,31 +49,37 @@ func getOptionsFromEnv() []GenericOption {
tlsConf := &tls.Config{}
DefaultEnvOptionsReader.Apply(
envconfig.WithURL("ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Traces.Endpoint = u.Host
- // For OTLP/HTTP endpoint URLs without a per-signal
- // configuration, the passed endpoint is used as a base URL
- // and the signals are sent to these paths relative to that.
- cfg.Traces.URLPath = path.Join(u.Path, DefaultTracesPath)
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For OTLP/HTTP endpoint URLs without a per-signal
+ // configuration, the passed endpoint is used as a base URL
+ // and the signals are sent to these paths relative to that.
+ cfg.Traces.URLPath = path.Join(u.Path, DefaultTracesPath)
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithURL("TRACES_ENDPOINT", func(u *url.URL) {
- opts = append(opts, withEndpointScheme(u))
- opts = append(opts, newSplitOption(func(cfg Config) Config {
- cfg.Traces.Endpoint = u.Host
- // For endpoint URLs for OTLP/HTTP per-signal variables, the
- // URL MUST be used as-is without any modification. The only
- // exception is that if an URL contains no path part, the root
- // path / MUST be used.
- path := u.Path
- if path == "" {
- path = "/"
- }
- cfg.Traces.URLPath = path
- return cfg
- }, withEndpointForGRPC(u)))
+ opts = append(
+ opts,
+ withEndpointScheme(u),
+ newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For endpoint URLs for OTLP/HTTP per-signal variables, the
+ // URL MUST be used as-is without any modification. The only
+ // exception is that if an URL contains no path part, the root
+ // path / MUST be used.
+ path := u.Path
+ if path == "" {
+ path = "/"
+ }
+ cfg.Traces.URLPath = path
+ return cfg
+ }, withEndpointForGRPC(u)),
+ )
}),
envconfig.WithCertPool("CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
envconfig.WithCertPool("TRACES_CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
@@ -142,7 +148,7 @@ func withInsecure(b bool) GenericOption {
}
func withTLSConfig(c *tls.Config, fn func(*tls.Config)) func(e *envconfig.EnvOptionsReader) {
- return func(e *envconfig.EnvOptionsReader) {
+ return func(*envconfig.EnvOptionsReader) {
if c.RootCAs != nil || len(c.Certificates) > 0 {
fn(c)
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
index 2abde6615070..eccabc0c2dbb 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl
+
// Package otlpconfig provides configuration for the otlptrace exporters.
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig"
+package otlpconfig
import (
"crypto/tls"
@@ -99,7 +99,7 @@ func NewHTTPConfig(opts ...HTTPOption) Config {
// cleanPath returns a path with all spaces trimmed. If urlPath is empty,
// defaultPath is returned instead.
-func cleanPath(urlPath string, defaultPath string) string {
+func cleanPath(urlPath, defaultPath string) string {
tmp := strings.TrimSpace(urlPath)
if tmp == "" || tmp == "." {
return defaultPath
@@ -134,7 +134,7 @@ func NewGRPCConfig(opts ...GRPCOption) Config {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultServiceConfig(cfg.ServiceConfig))
}
// Prioritize GRPCCredentials over Insecure (passing both is an error).
- if cfg.Traces.GRPCCredentials != nil {
+ if cfg.Traces.GRPCCredentials != nil { //nolint:gocritic // if-else is clearer than switch
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(cfg.Traces.GRPCCredentials))
} else if cfg.Traces.Insecure {
cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
@@ -228,7 +228,7 @@ func (g *splitOption) ApplyHTTPOption(cfg Config) Config {
func (splitOption) private() {}
-func newSplitOption(httpFn func(cfg Config) Config, grpcFn func(cfg Config) Config) GenericOption {
+func newSplitOption(httpFn, grpcFn func(cfg Config) Config) GenericOption {
return &splitOption{httpFn: httpFn, grpcFn: grpcFn}
}
@@ -286,6 +286,11 @@ func WithEndpointURL(v string) GenericOption {
cfg.Traces.Endpoint = u.Host
cfg.Traces.URLPath = u.Path
+ if cfg.Traces.URLPath == "" {
+ // For HTTP exporters, a URL without a path targets the root path. Set it explicitly so the default signal
+ // path is not appended by cleanPath. (URLPath is ignored by gRPC exporters.)
+ cfg.Traces.URLPath = "/"
+ }
cfg.Traces.Insecure = u.Scheme != "https"
return cfg
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
index 6a52b58cc0b7..213c3605f201 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/optiontypes.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl
+
+package otlpconfig
const (
// DefaultCollectorGRPCPort is the default gRPC port of the collector.
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
index 5b389cb03fa3..a14d5e6ecfe7 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/tls.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl
+
+package otlpconfig
import (
"crypto/tls"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
index 33ff6c02438e..1138f2e718bb 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/partialsuccess.go
@@ -1,10 +1,10 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/partialsuccess.go
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/partialsuccess.go
+
+package internal
import "fmt"
@@ -41,7 +41,7 @@ func (ps PartialSuccess) As(target any) bool {
}
// Is supports the errors.Is() interface.
-func (ps PartialSuccess) Is(err error) bool {
+func (PartialSuccess) Is(err error) bool {
_, ok := err.(PartialSuccess)
return ok
}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
index bf39808254fc..1883d0600a83 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go
@@ -1,13 +1,13 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/otlp/retry/retry.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/otlp/retry/retry.go.tmpl
+
// Package retry provides request retry functionality that can perform
// configurable exponential backoff for transient errors and honor any
// explicit throttle responses received.
-package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry"
+package retry
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
index 882b67138041..6e753209afe5 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/version.go
@@ -1,8 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal"
+package internal
// Version is the current release version of the OpenTelemetry OTLP HTTP trace
// exporter in use.
-const Version = "1.44.0"
+const Version = "1.45.0"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
index ecae4a79cacb..76b6fdebdb04 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/observ.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x"
+package x
import "strings"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
index 099dab007105..9e7537b9b066 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x/x.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/x/x.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
// Package x documents experimental features for [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp].
-package x // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/x"
+package x
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
index 291b5f9b64aa..ad6a2d7486ba 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/options.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptracehttp // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
+package otlptracehttp
import (
"crypto/tls"
@@ -93,6 +93,11 @@ func WithEndpoint(endpoint string) Option {
//
// If an invalid URL is provided, the default value will be kept.
//
+// The path of the provided URL is used as-is; with one exception: if the URL has
+// no path, it is normalized to the root path ("/"). The default traces path
+// ("/v1/traces") is not appended automatically. Use WithEndpoint if you want
+// that behavior, or pass a URL that includes that path.
+//
// By default, if an environment variable is not set, and this option is not
// passed, "localhost:4318" will be used.
//
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
index d847210dbaf4..da70f3f54029 100644
--- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
@@ -1,9 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+package otlptrace
// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
func Version() string {
- return "1.44.0"
+ return "1.45.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go
index 07623b679145..1f45ea38835f 100644
--- a/vendor/go.opentelemetry.io/otel/handler.go
+++ b/vendor/go.opentelemetry.io/otel/handler.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
import (
"go.opentelemetry.io/otel/internal/global"
diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go
index b4f85f44a93e..cbeb14fcd875 100644
--- a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go
+++ b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go
@@ -10,7 +10,7 @@ this need this package would not need to exist and the
`go.opentelemetry.io/otel/baggage` package would be the singular place where
W3C baggage is handled.
*/
-package baggage // import "go.opentelemetry.io/otel/internal/baggage"
+package baggage
// List is the collection of baggage members. The W3C allows for duplicates,
// but OpenTelemetry does not, therefore, this is represented as a map.
diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go
index 3aea9c491f0b..f3bece16526d 100644
--- a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go
+++ b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package baggage // import "go.opentelemetry.io/otel/internal/baggage"
+package baggage
import "context"
diff --git a/vendor/go.opentelemetry.io/otel/internal/errorhandler/errorhandler.go b/vendor/go.opentelemetry.io/otel/internal/errorhandler/errorhandler.go
index 3f0ab3131234..de294461c7fd 100644
--- a/vendor/go.opentelemetry.io/otel/internal/errorhandler/errorhandler.go
+++ b/vendor/go.opentelemetry.io/otel/internal/errorhandler/errorhandler.go
@@ -5,7 +5,7 @@
//
// This package has no OTel dependencies, allowing it to be imported by any
// package in the module without creating import cycles.
-package errorhandler // import "go.opentelemetry.io/otel/internal/errorhandler"
+package errorhandler
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/handler.go b/vendor/go.opentelemetry.io/otel/internal/global/handler.go
index 77d0425f54e8..6fb8034f8aa5 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/handler.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/handler.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package global provides the OpenTelemetry global API.
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"go.opentelemetry.io/otel/internal/errorhandler"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go
index 55255cddfc6e..4db3fdcde7e4 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go
index 86d7f4ba0864..8e1327354aaa 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"log"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go
index 50043d669baa..48be49037dd2 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"container/list"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go
index 38560ff9915f..90c462ef0dd1 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go
index 225c9e50155e..f8fcb82bcb0f 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/state.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go
index bf5cf3119b24..45899f8c0102 100644
--- a/vendor/go.opentelemetry.io/otel/internal/global/trace.go
+++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package global // import "go.opentelemetry.io/otel/internal/global"
+package global
/*
This file contains the forwarding implementation of the TracerProvider used as
diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go
index 6de7f2e4d886..3f6b7b10dd1c 100644
--- a/vendor/go.opentelemetry.io/otel/internal_logging.go
+++ b/vendor/go.opentelemetry.io/otel/internal_logging.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
import (
"github.com/go-logr/logr"
diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go
index 527d9aec86b5..30dbb411889e 100644
--- a/vendor/go.opentelemetry.io/otel/metric.go
+++ b/vendor/go.opentelemetry.io/otel/metric.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
import (
"go.opentelemetry.io/otel/internal/global"
diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
index 1d21e2eb7520..11e5b282f341 100644
--- a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
index 9d45a4d416b0..f5577b0c5190 100644
--- a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go
index 889545e235d1..31a5da817099 100644
--- a/vendor/go.opentelemetry.io/otel/metric/config.go
+++ b/vendor/go.opentelemetry.io/otel/metric/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"slices"
diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go
index 794e1a8baea7..235e81f3a6d4 100644
--- a/vendor/go.opentelemetry.io/otel/metric/doc.go
+++ b/vendor/go.opentelemetry.io/otel/metric/doc.go
@@ -201,4 +201,4 @@ fully implement all the API interfaces when a user updates their API.
[OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/
[GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider
*/
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go
index 1a9dc68093fe..10f361b5bf20 100644
--- a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go
+++ b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go
@@ -11,7 +11,7 @@
// the API package).
//
// [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric
-package embedded // import "go.opentelemetry.io/otel/metric/embedded"
+package embedded
// MeterProvider is embedded in
// [go.opentelemetry.io/otel/metric.MeterProvider].
diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go
index 2e79ab56832d..e8c1c96cb14d 100644
--- a/vendor/go.opentelemetry.io/otel/metric/instrument.go
+++ b/vendor/go.opentelemetry.io/otel/metric/instrument.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"go.opentelemetry.io/otel/attribute"
diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go
index 5606ec4bd9e1..70ff4c73184c 100644
--- a/vendor/go.opentelemetry.io/otel/metric/meter.go
+++ b/vendor/go.opentelemetry.io/otel/metric/meter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go
index 634e73aee0b8..80c0f2f2291c 100644
--- a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go
+++ b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go
@@ -10,7 +10,7 @@
// This implementation can be embedded in other implementations of the
// OpenTelemetry metric API. Doing so will mean the implementation defaults to
// no operation for methods it does not implement.
-package noop // import "go.opentelemetry.io/otel/metric/noop"
+package noop
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
index 2101f686aef2..2770ac2dcb65 100644
--- a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"context"
@@ -158,6 +158,8 @@ type Float64Histogram interface {
// Record adds an additional value to the distribution.
//
+ // The incr value is expected to be non-negative.
+ //
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go
index 425c1a0d5137..c8a739c90df9 100644
--- a/vendor/go.opentelemetry.io/otel/metric/syncint64.go
+++ b/vendor/go.opentelemetry.io/otel/metric/syncint64.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/metric"
+package metric
import (
"context"
@@ -158,6 +158,8 @@ type Int64Histogram interface {
// Record adds an additional value to the distribution.
//
+ // The incr value is expected to be non-negative.
+ //
// Use the WithAttributeSet (or, if performance is not a concern,
// the WithAttributes) option to include measurement attributes.
//
diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go
index 2fd9497338ff..05e9b11ceb75 100644
--- a/vendor/go.opentelemetry.io/otel/propagation.go
+++ b/vendor/go.opentelemetry.io/otel/propagation.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
import (
"go.opentelemetry.io/otel/internal/global"
diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
index d81b709a2c15..9d7ef7c89d27 100644
--- a/vendor/go.opentelemetry.io/otel/propagation/baggage.go
+++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package propagation // import "go.opentelemetry.io/otel/propagation"
+package propagation
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go
index 33a3baf15f15..6e2bbbb18f38 100644
--- a/vendor/go.opentelemetry.io/otel/propagation/doc.go
+++ b/vendor/go.opentelemetry.io/otel/propagation/doc.go
@@ -10,4 +10,4 @@ package is the W3C Trace Context encoding
(https://www.w3.org/TR/trace-context/), and W3C Baggage
(https://www.w3.org/TR/baggage/).
*/
-package propagation // import "go.opentelemetry.io/otel/propagation"
+package propagation
diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go
index 0a32c59aa3b1..a3891fbe75af 100644
--- a/vendor/go.opentelemetry.io/otel/propagation/propagation.go
+++ b/vendor/go.opentelemetry.io/otel/propagation/propagation.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package propagation // import "go.opentelemetry.io/otel/propagation"
+package propagation
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go
index 11f404deb737..ffaa903039ca 100644
--- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go
+++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package propagation // import "go.opentelemetry.io/otel/propagation"
+package propagation
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/requirements.txt b/vendor/go.opentelemetry.io/otel/requirements.txt
index 7c541dee79e3..b2666ab4836c 100644
--- a/vendor/go.opentelemetry.io/otel/requirements.txt
+++ b/vendor/go.opentelemetry.io/otel/requirements.txt
@@ -1 +1 @@
-codespell==2.4.2
+codespell==2.4.3
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go
index a4faa6a03d50..39b34eabeaee 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go
@@ -10,4 +10,4 @@
// and
// https://github.com/open-telemetry/oteps/blob/d226b677d73a785523fe9b9701be13225ebc528d/text/0201-scope-attributes.md
// for more information.
-package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
+package instrumentation
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go
index f2cdf3c6518c..8baf8dbb3590 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
+package instrumentation
// Library represents the instrumentation library.
//
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go
index 34852a47b219..1fd06db75b7e 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
+package instrumentation
import "go.opentelemetry.io/otel/attribute"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/dedup.go b/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/dedup.go
new file mode 100644
index 000000000000..fe9ddc96db71
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/dedup.go
@@ -0,0 +1,300 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/attrnorm/dedup.go.tmpl
+
+// Package attrnorm normalizes attribute values.
+package attrnorm
+
+import (
+ "reflect"
+ "unsafe"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+var (
+ keyValueType = reflect.TypeFor[attribute.KeyValue]()
+ valueType = reflect.TypeFor[attribute.Value]()
+)
+
+// rawValue mirrors attribute.Value. It is used only to read immutable slice
+// storage without calling AsMap or AsSlice on no-op paths.
+type rawValue struct {
+ vtype attribute.Type
+ numeric uint64
+ stringly string
+ slice any
+}
+
+// Value returns value with all map values deduplicated and whether it changed.
+//
+// Duplicate map keys are resolved using last-value-wins semantics.
+func Value(value attribute.Value) (attribute.Value, bool) {
+ switch value.Type() {
+ case attribute.SLICE:
+ return deduplicateSliceValue(value)
+ case attribute.MAP:
+ return deduplicateMapValue(value)
+ default:
+ return value, false
+ }
+}
+
+// KeyValue returns kv with all map values deduplicated and whether it changed.
+func KeyValue(kv attribute.KeyValue) (attribute.KeyValue, bool) {
+ value, changed := Value(kv.Value)
+ if changed {
+ kv.Value = value
+ }
+ return kv, changed
+}
+
+// KeyValues returns kvs with all map values deduplicated and whether they changed.
+//
+// The returned slice is the original kvs slice if no value needs
+// deduplication. Top-level keys in kvs are not deduplicated.
+func KeyValues(kvs []attribute.KeyValue) ([]attribute.KeyValue, bool) {
+ // Preserve the caller's slice on the common no-op path. Once a changed
+ // value is found, copy the prior values exactly once and fill the rest in
+ // place as the scan continues.
+ var normalized []attribute.KeyValue
+ for i, kv := range kvs {
+ kv, changed := KeyValue(kv)
+ if normalized != nil {
+ normalized[i] = kv
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.KeyValue, len(kvs))
+ copy(normalized, kvs[:i])
+ normalized[i] = kv
+ }
+ if normalized == nil {
+ return kvs, false
+ }
+ return normalized, true
+}
+
+// Set returns set with all map values deduplicated and whether it changed.
+//
+// The returned Set is the original set if no value needs deduplication.
+// Top-level key uniqueness remains attribute.Set's responsibility; this only
+// normalizes map attribute values.
+func Set(set attribute.Set) (attribute.Set, bool) {
+ if set.Len() == 0 {
+ return set, false
+ }
+
+ // Most attribute sets contain no duplicate map keys. Delay allocation until
+ // the first changed value so the no-op path returns the original Set.
+ var normalized []attribute.KeyValue
+ for i := range set.Len() {
+ kv, _ := set.Get(i)
+ kv, changed := KeyValue(kv)
+ if normalized != nil {
+ normalized = append(normalized, kv)
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.KeyValue, 0, set.Len())
+ for j := range i {
+ prior, _ := set.Get(j)
+ normalized = append(normalized, prior)
+ }
+ normalized = append(normalized, kv)
+ }
+ if normalized == nil {
+ return set, false
+ }
+
+ return attribute.NewSet(normalized...), true
+}
+
+func deduplicateSliceValue(value attribute.Value) (attribute.Value, bool) {
+ storage := valueStorage(value)
+ length := valueLen(storage)
+
+ // Slice values can contain map values, so recurse into each element while
+ // keeping the original attribute.Value when no element changes.
+ var normalized []attribute.Value
+ for i := range length {
+ elem := valueAt(storage, i)
+ elem, changed := Value(elem)
+ if normalized != nil {
+ normalized[i] = elem
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.Value, length)
+ for j := range i {
+ normalized[j] = valueAt(storage, j)
+ }
+ normalized[i] = elem
+ }
+ if normalized == nil {
+ return value, false
+ }
+ return attribute.SliceValue(normalized...), true
+}
+
+func deduplicateMapValue(value attribute.Value) (attribute.Value, bool) {
+ storage := valueStorage(value)
+ length := keyValueLen(storage)
+ if length <= 1 {
+ // A single map entry cannot duplicate its own key, but its value might
+ // contain a map or slice that needs recursive normalization.
+ if length == 1 {
+ kv, changed := KeyValue(keyValueAt(storage, 0))
+ if changed {
+ return attribute.MapValue(kv), true
+ }
+ }
+ return value, false
+ }
+
+ var normalized []attribute.KeyValue
+ for i := 0; i < length; {
+ // attribute.MapValue stores key-values sorted by key using a stable
+ // sort. Equal keys therefore form a contiguous run, and the last
+ // element in that run is the last value provided by the caller.
+ first := keyValueAt(storage, i)
+ j := i + 1
+ for j < length && keyValueAt(storage, j).Key == first.Key {
+ j++
+ }
+
+ kv, nestedChanged := KeyValue(keyValueAt(storage, j-1))
+ // j-i > 1 means the current key run contained duplicates.
+ changed := nestedChanged || j-i > 1
+ if normalized != nil {
+ normalized = append(normalized, kv)
+ } else if changed {
+ normalized = make([]attribute.KeyValue, 0, length)
+ for k := range i {
+ normalized = append(normalized, keyValueAt(storage, k))
+ }
+ normalized = append(normalized, kv)
+ }
+ i = j
+ }
+ if normalized == nil {
+ return value, false
+ }
+ return attribute.MapValue(normalized...), true
+}
+
+func valueStorage(value attribute.Value) any {
+ // attribute.Value does not expose allocation-free map/slice iteration.
+ // The raw mirror lets us read the immutable backing array directly and
+ // reserve AsMap/AsSlice-style allocation for paths that actually change.
+ return (*rawValue)(
+ unsafe.Pointer(&value),
+ ).slice //nolint:gosec // Read-only mirror of attribute.Value for allocation-free iteration.
+}
+
+func valueLen(storage any) int {
+ // attribute.Value stores small slices in fixed-size array values. Handle
+ // the common sizes directly and fall back to reflection for larger arrays.
+ switch storage.(type) {
+ case [0]attribute.Value:
+ return 0
+ case [1]attribute.Value:
+ return 1
+ case [2]attribute.Value:
+ return 2
+ case [3]attribute.Value:
+ return 3
+ case [4]attribute.Value:
+ return 4
+ case [5]attribute.Value:
+ return 5
+ default:
+ return arrayLen(storage, valueType)
+ }
+}
+
+func valueAt(storage any, i int) attribute.Value {
+ switch values := storage.(type) {
+ case [1]attribute.Value:
+ return values[i]
+ case [2]attribute.Value:
+ return values[i]
+ case [3]attribute.Value:
+ return values[i]
+ case [4]attribute.Value:
+ return values[i]
+ case [5]attribute.Value:
+ return values[i]
+ default:
+ return arrayAt[attribute.Value](storage, valueType, i)
+ }
+}
+
+func keyValueLen(storage any) int {
+ // attribute.Value stores small maps in fixed-size key-value arrays. Handle
+ // the common sizes directly and fall back to reflection for larger arrays.
+ switch storage.(type) {
+ case [0]attribute.KeyValue:
+ return 0
+ case [1]attribute.KeyValue:
+ return 1
+ case [2]attribute.KeyValue:
+ return 2
+ case [3]attribute.KeyValue:
+ return 3
+ case [4]attribute.KeyValue:
+ return 4
+ case [5]attribute.KeyValue:
+ return 5
+ default:
+ return arrayLen(storage, keyValueType)
+ }
+}
+
+func keyValueAt(storage any, i int) attribute.KeyValue {
+ switch kvs := storage.(type) {
+ case [1]attribute.KeyValue:
+ return kvs[i]
+ case [2]attribute.KeyValue:
+ return kvs[i]
+ case [3]attribute.KeyValue:
+ return kvs[i]
+ case [4]attribute.KeyValue:
+ return kvs[i]
+ case [5]attribute.KeyValue:
+ return kvs[i]
+ default:
+ return arrayAt[attribute.KeyValue](storage, keyValueType, i)
+ }
+}
+
+func arrayLen(storage any, elem reflect.Type) int {
+ // Be defensive around invalid or unexpected Value storage. Returning zero
+ // makes malformed storage a no-op instead of panicking in telemetry paths.
+ array := reflect.ValueOf(storage)
+ if array.Kind() != reflect.Array || array.Type().Elem() != elem {
+ return 0
+ }
+ return array.Len()
+}
+
+func arrayAt[T any](storage any, elem reflect.Type, i int) T {
+ // Match arrayLen's fail-closed behavior for unexpected storage.
+ array := reflect.ValueOf(storage)
+ if array.Kind() != reflect.Array || array.Type().Elem() != elem || i < 0 || i >= array.Len() {
+ var zero T
+ return zero
+ }
+ return array.Index(i).Interface().(T)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/truncate.go b/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/truncate.go
new file mode 100644
index 000000000000..9955e9072681
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/attrnorm/truncate.go
@@ -0,0 +1,232 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/attrnorm/truncate.go.tmpl
+
+package attrnorm
+
+import (
+ "slices"
+ "strings"
+ "unicode/utf8"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+// Truncate returns a truncated version of attr. Only string, string slice,
+// byte slice, slice, and map attribute values are truncated. String values are
+// truncated to at most a length of limit. Each string slice value is truncated
+// in this fashion (the slice length itself is unaffected), and byte slice
+// values are truncated to at most limit bytes. For slice and map attribute
+// values, the limit is applied recursively to contained values.
+//
+// No truncation is performed for a negative limit.
+func Truncate(limit int, attr attribute.KeyValue) attribute.KeyValue {
+ if limit < 0 {
+ return attr
+ }
+ switch attr.Value.Type() {
+ case attribute.STRING:
+ v := attr.Value.AsString()
+ return attr.Key.String(truncate(limit, v))
+ case attribute.STRINGSLICE:
+ v := attr.Value.AsStringSlice()
+ for i := range v {
+ v[i] = truncate(limit, v[i])
+ }
+ return attr.Key.StringSlice(v)
+ case attribute.BYTESLICE:
+ v := attr.Value.AsString()
+ if len(v) > limit {
+ return attr.Key.ByteSlice([]byte(v[:limit]))
+ }
+ return attr
+ case attribute.SLICE:
+ v := attr.Value.AsSlice()
+ if !slices.ContainsFunc(v, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
+ return attr
+ }
+ newV := make([]attribute.Value, len(v))
+ for i, elem := range v {
+ newV[i] = TruncateValue(limit, elem)
+ }
+ return attr.Key.Slice(newV...)
+ case attribute.MAP:
+ v := attr.Value.AsMap()
+ if !slices.ContainsFunc(v, func(kv attribute.KeyValue) bool { return needsTruncation(limit, kv.Value) }) {
+ return attr
+ }
+ newV := make([]attribute.KeyValue, len(v))
+ for i, elem := range v {
+ elem.Value = TruncateValue(limit, elem.Value)
+ newV[i] = elem
+ }
+ return attr.Key.Map(newV...)
+ }
+ return attr
+}
+
+// TruncateValue returns a truncated version of v. Only string, string
+// slice, byte slice, and (recursively) slice and map values are modified.
+//
+// No truncation is performed for a negative limit.
+func TruncateValue(limit int, v attribute.Value) attribute.Value {
+ if limit < 0 {
+ return v
+ }
+
+ switch v.Type() {
+ case attribute.STRING:
+ return attribute.StringValue(truncate(limit, v.AsString()))
+ case attribute.STRINGSLICE:
+ ss := v.AsStringSlice()
+ for i := range ss {
+ ss[i] = truncate(limit, ss[i])
+ }
+ return attribute.StringSliceValue(ss)
+ case attribute.BYTESLICE:
+ // len(v.AsString()) is identical to len(v.AsByteSlice()) but
+ // avoids allocating the full slice before truncation.
+ s := v.AsString()
+ if limit >= 0 && len(s) > limit {
+ return attribute.ByteSliceValue([]byte(s[:limit]))
+ }
+ case attribute.SLICE:
+ sl := v.AsSlice()
+ if !slices.ContainsFunc(sl, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
+ return v
+ }
+ newSl := make([]attribute.Value, len(sl))
+ for i, elem := range sl {
+ newSl[i] = TruncateValue(limit, elem)
+ }
+ return attribute.SliceValue(newSl...)
+ case attribute.MAP:
+ m := v.AsMap()
+ if !slices.ContainsFunc(m, func(kv attribute.KeyValue) bool { return needsTruncation(limit, kv.Value) }) {
+ return v
+ }
+ newM := make([]attribute.KeyValue, len(m))
+ for i, elem := range m {
+ elem.Value = TruncateValue(limit, elem.Value)
+ newM[i] = elem
+ }
+ return attribute.MapValue(newM...)
+ }
+ return v
+}
+
+// stringNeedsTruncation reports whether s would be modified by truncate for the
+// given limit.
+func stringNeedsTruncation(limit int, s string) bool {
+ if limit < 0 || len(s) <= limit {
+ return false
+ }
+ return utf8.RuneCountInString(s) > limit || !utf8.ValidString(s)
+}
+
+// needsTruncation reports whether v would be modified by TruncateValue for the
+// given limit.
+func needsTruncation(limit int, v attribute.Value) bool {
+ switch v.Type() {
+ case attribute.STRING:
+ return stringNeedsTruncation(limit, v.AsString())
+ case attribute.BYTESLICE:
+ // len(v.AsString()) is identical to len(v.AsByteSlice()) but
+ // avoids memory allocation.
+ if limit >= 0 && len(v.AsString()) > limit {
+ return true
+ }
+ case attribute.STRINGSLICE:
+ for _, s := range v.AsStringSlice() {
+ if stringNeedsTruncation(limit, s) {
+ return true
+ }
+ }
+ case attribute.SLICE:
+ return slices.ContainsFunc(v.AsSlice(), func(e attribute.Value) bool { return needsTruncation(limit, e) })
+ case attribute.MAP:
+ return slices.ContainsFunc(
+ v.AsMap(),
+ func(kv attribute.KeyValue) bool { return needsTruncation(limit, kv.Value) },
+ )
+ }
+ return false
+}
+
+// truncate returns a truncated version of s such that it contains less than
+// the limit number of characters. Truncation is applied by returning the limit
+// number of valid characters contained in s.
+//
+// If limit is negative, it returns the original string.
+//
+// UTF-8 is supported. When truncating, all invalid characters are dropped
+// before applying truncation.
+//
+// If s already contains less than the limit number of bytes, it is returned
+// unchanged. No invalid characters are removed.
+func truncate(limit int, s string) string {
+ // This prioritize performance in the following order based on the most
+ // common expected use-cases.
+ //
+ // - Short values less than the default limit (128).
+ // - Strings with valid encodings that exceed the limit.
+ // - No limit.
+ // - Strings with invalid encodings that exceed the limit.
+ if limit < 0 || len(s) <= limit {
+ return s
+ }
+
+ // Optimistically, assume all valid UTF-8.
+ var b strings.Builder
+ count := 0
+ for i, c := range s {
+ if c != utf8.RuneError {
+ count++
+ if count > limit {
+ return s[:i]
+ }
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // Invalid encoding.
+ b.Grow(len(s) - 1)
+ _, _ = b.WriteString(s[:i])
+ s = s[i:]
+ break
+ }
+ }
+
+ // Fast-path, no invalid input.
+ if b.Cap() == 0 {
+ return s
+ }
+
+ // Truncate while validating UTF-8.
+ for i := 0; i < len(s) && count < limit; {
+ c := s[i]
+ if c < utf8.RuneSelf {
+ // Optimization for single byte runes (common case).
+ _ = b.WriteByte(c)
+ i++
+ count++
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // We checked for all 1-byte runes above, this is a RuneError.
+ i++
+ continue
+ }
+
+ _, _ = b.WriteString(s[i : i+size])
+ i += size
+ count++
+ }
+
+ return b.String()
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go
index 694b64a31805..13ff34b276f8 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package x documents experimental features for [go.opentelemetry.io/otel/sdk].
-package x // import "go.opentelemetry.io/otel/sdk/internal/x"
+package x
import "strings"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go
index 13347e56052e..e829d179488d 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go
@@ -1,11 +1,11 @@
-// Code generated by gotmpl. DO NOT MODIFY.
-// source: internal/shared/x/x.go.tmpl
-
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
// Package x documents experimental features for [go.opentelemetry.io/otel/sdk].
-package x // import "go.opentelemetry.io/otel/sdk/internal/x"
+package x
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/aggregation.go b/vendor/go.opentelemetry.io/otel/sdk/metric/aggregation.go
index e6f5cfb2ad95..f52e7ea5421c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/aggregation.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/aggregation.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/cache.go b/vendor/go.opentelemetry.io/otel/sdk/metric/cache.go
index 63b88f08664b..1d6f6a089aac 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/cache.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/cache.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"sync"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/config.go b/vendor/go.opentelemetry.io/otel/sdk/metric/config.go
index dda4e086db8f..444a8cfda91a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/config.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
@@ -157,6 +157,8 @@ func WithView(views ...View) Option {
// exemplar reservoir, but the exemplar reservoir makes the final decision of
// whether to store an exemplar.
//
+// The filter must not be nil.
+//
// By default, the [exemplar.TraceBasedFilter]
// is used. Exemplars can be entirely disabled by providing the
// [exemplar.AlwaysOffFilter].
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go
index 51e168c75048..61410b330912 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/doc.go
@@ -86,4 +86,4 @@
//
// See [go.opentelemetry.io/otel/sdk/metric/internal/x] for information about
// the experimental features.
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/env.go b/vendor/go.opentelemetry.io/otel/sdk/metric/env.go
index a6c403797f6c..132664a7e61c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/env.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/env.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go
index 993f001ae913..fb124052c630 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"reflect"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/doc.go
index 9f238937688d..f7e54761769e 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/doc.go
@@ -3,4 +3,4 @@
// Package exemplar provides an implementation of the OpenTelemetry exemplar
// reservoir to be used in metric collection pipelines.
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/exemplar.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/exemplar.go
index 1ab69467868a..32913a6e5d42 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/exemplar.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/exemplar.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"time"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/filter.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/filter.go
index b50f5c1531c6..a9efd20d1ad2 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/filter.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/filter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go
index ce97ab1bf729..48f2b464cb87 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/fixed_size_reservoir.go
@@ -1,12 +1,10 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"context"
- "math"
- "math/rand/v2"
"sync"
"time"
@@ -26,7 +24,12 @@ func FixedSizeReservoirProvider(k int) ReservoirProvider {
// sample each one. If there are more than k, the Reservoir will then randomly
// sample all additional measurement with a decreasing probability.
func NewFixedSizeReservoir(k int) *FixedSizeReservoir {
- return newFixedSizeReservoir(newStorage(k))
+ r := &FixedSizeReservoir{
+ storage: make([]measurement, k),
+ }
+ r.nt.k = k
+ r.nt.reset()
+ return r
}
var _ Reservoir = &FixedSizeReservoir{}
@@ -37,43 +40,9 @@ var _ Reservoir = &FixedSizeReservoir{}
// additional measurement with a decreasing probability.
type FixedSizeReservoir struct {
reservoir.ConcurrentSafe
- *storage
- mu sync.Mutex
-
- // count is the number of measurement seen.
- count int64
- // next is the next count that will store a measurement at a random index
- // once the reservoir has been filled.
- next int64
- // w is the largest random number in a distribution that is used to compute
- // the next next.
- w float64
-}
-
-func newFixedSizeReservoir(s *storage) *FixedSizeReservoir {
- r := &FixedSizeReservoir{
- storage: s,
- }
- if cap(r.measurements) > 0 {
- r.reset()
- }
- return r
-}
-
-// randomFloat64 returns, as a float64, a uniform pseudo-random number in the
-// open interval (0.0,1.0).
-func (*FixedSizeReservoir) randomFloat64() float64 {
- // TODO: Use an algorithm that avoids rejection sampling. For example:
- //
- // const precision = 1 << 53 // 2^53
- // // Generate an integer in [1, 2^53 - 1]
- // v := rand.Uint64() % (precision - 1) + 1
- // return float64(v) / float64(precision)
- f := rand.Float64()
- for f == 0 {
- f = rand.Float64()
- }
- return f
+ mu sync.Mutex
+ storage []measurement
+ nt nextTracker
}
// Offer accepts the parameters associated with a measurement. The
@@ -88,128 +57,39 @@ func (*FixedSizeReservoir) randomFloat64() float64 {
// parameters are the value and dropped (filtered) attributes of the
// measurement respectively.
func (r *FixedSizeReservoir) Offer(ctx context.Context, t time.Time, n Value, a []attribute.KeyValue) {
- if cap(r.measurements) == 0 {
+ if len(r.storage) == 0 {
return
}
- // The following algorithm is "Algorithm L" from Li, Kim-Hung (4 December
- // 1994). "Reservoir-Sampling Algorithms of Time Complexity
- // O(n(1+log(N/n)))". ACM Transactions on Mathematical Software. 20 (4):
- // 481–493 (https://dl.acm.org/doi/10.1145/198429.198435).
- //
- // A high-level overview of "Algorithm L":
- // 0) Pre-calculate the random count greater than the storage size when
- // an exemplar will be replaced.
- // 1) Accept all measurements offered until the configured storage size is
- // reached.
- // 2) Loop:
- // a) When the pre-calculate count is reached, replace a random
- // existing exemplar with the offered measurement.
- // b) Calculate the next random count greater than the existing one
- // which will replace another exemplars
- //
- // The way a "replacement" count is computed is by looking at `n` number of
- // independent random numbers each corresponding to an offered measurement.
- // Of these numbers the smallest `k` (the same size as the storage
- // capacity) of them are kept as a subset. The maximum value in this
- // subset, called `w` is used to weight another random number generation
- // for the next count that will be considered.
- //
- // By weighting the next count computation like described, it is able to
- // perform a uniformly-weighted sampling algorithm based on the number of
- // samples the reservoir has seen so far. The sampling will "slow down" as
- // more and more samples are offered so as to reduce a bias towards those
- // offered just prior to the end of the collection.
- //
- // This algorithm is preferred because of its balance of simplicity and
- // performance. It will compute three random numbers (the bulk of
- // computation time) for each item that becomes part of the reservoir, but
- // it does not spend any time on items that do not. In particular it has an
- // asymptotic runtime of O(k(1 + log(n/k)) where n is the number of
- // measurements offered and k is the reservoir size.
- //
- // See https://en.wikipedia.org/wiki/Reservoir_sampling for an overview of
- // this and other reservoir sampling algorithms. See
- // https://github.com/MrAlias/reservoir-sampling for a performance
- // comparison of reservoir sampling algorithms.
-
r.mu.Lock()
defer r.mu.Unlock()
- if int(r.count) < cap(r.measurements) {
- r.store(ctx, int(r.count), t, n, a)
- } else if r.count == r.next {
- // Overwrite a random existing measurement with the one offered.
- idx := int(rand.Int64N(int64(cap(r.measurements))))
- r.store(ctx, idx, t, n, a)
- r.advance()
+ sampled, idx := r.nt.shouldSample()
+ if sampled {
+ r.storage[idx].store(ctx, t, n, a)
}
- r.count++
-}
-
-// reset resets r to the initial state.
-func (r *FixedSizeReservoir) reset() {
- // This resets the number of exemplars known.
- r.count = 0
- // Random index inserts should only happen after the storage is full.
- r.next = int64(cap(r.measurements))
-
- // Initial random number in the series used to generate r.next.
- //
- // This is set before r.advance to reset or initialize the random number
- // series. Without doing so it would always be 0 or never restart a new
- // random number series.
- //
- // This maps the uniform random number in (0,1) to a geometric distribution
- // over the same interval. The mean of the distribution is inversely
- // proportional to the storage capacity.
- r.w = math.Exp(math.Log(r.randomFloat64()) / float64(cap(r.measurements)))
-
- r.advance()
-}
-
-// advance updates the count at which the offered measurement will overwrite an
-// existing exemplar.
-func (r *FixedSizeReservoir) advance() {
- // Calculate the next value in the random number series.
- //
- // The current value of r.w is based on the max of a distribution of random
- // numbers (i.e. `w = max(u_1,u_2,...,u_k)` for `k` equal to the capacity
- // of the storage and each `u` in the interval (0,w)). To calculate the
- // next r.w we use the fact that when the next exemplar is selected to be
- // included in the storage an existing one will be dropped, and the
- // corresponding random number in the set used to calculate r.w will also
- // be replaced. The replacement random number will also be within (0,w),
- // therefore the next r.w will be based on the same distribution (i.e.
- // `max(u_1,u_2,...,u_k)`). Therefore, we can sample the next r.w by
- // computing the next random number `u` and take r.w as `w * u^(1/k)`.
- r.w *= math.Exp(math.Log(r.randomFloat64()) / float64(cap(r.measurements)))
- // Use the new random number in the series to calculate the count of the
- // next measurement that will be stored.
- //
- // Given 0 < r.w < 1, each iteration will result in subsequent r.w being
- // smaller. This translates here into the next next being selected against
- // a distribution with a higher mean (i.e. the expected value will increase
- // and replacements become less likely)
- //
- // Important to note, the new r.next will always be at least 1 more than
- // the last r.next.
- r.next += int64(math.Log(r.randomFloat64())/math.Log(1-r.w)) + 1
}
// Collect returns all the held exemplars.
//
-// The Reservoir state is preserved after this call.
+// The stored exemplars are preserved after this call, but the sampling state is reset.
func (r *FixedSizeReservoir) Collect(dest *[]Exemplar) {
- if cap(r.measurements) == 0 {
+ if len(r.storage) == 0 {
*dest = (*dest)[:0]
return
}
r.mu.Lock()
defer r.mu.Unlock()
- r.storage.Collect(dest)
+ *dest = reset(*dest, len(r.storage), len(r.storage))
+ var n int
+ for i := range r.storage {
+ if r.storage[i].exemplar(&(*dest)[n]) {
+ n++
+ }
+ }
+ *dest = (*dest)[:n]
// Call reset here even though it will reset r.count and restart the random
// number series. This will persist any old exemplars as long as no new
// measurements are offered, but it will also prioritize those new
// measurements that are made over the older collection cycle ones.
- r.reset()
+ r.nt.reset()
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go
index dacac3ebaec8..e1001e4dc742 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/histogram_reservoir.go
@@ -1,12 +1,13 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"context"
"slices"
"sort"
+ "sync"
"time"
"go.opentelemetry.io/otel/attribute"
@@ -22,29 +23,39 @@ func HistogramReservoirProvider(bounds []float64) ReservoirProvider {
}
}
-// NewHistogramReservoir returns a [HistogramReservoir] that samples the last
-// measurement that falls within a histogram bucket. The histogram bucket
-// upper-boundaries are define by bounds.
+type bucket struct {
+ mu sync.Mutex
+ nt nextTracker
+ measurement
+}
+
+// NewHistogramReservoir returns a [HistogramReservoir] that samples
+// measurements that fall within a histogram bucket using Algorithm L. The
+// histogram bucket upper-boundaries are defined by bounds.
//
// The passed bounds must be sorted before calling this function.
func NewHistogramReservoir(bounds []float64) *HistogramReservoir {
+ buckets := make([]bucket, len(bounds)+1)
+ for i := range buckets {
+ buckets[i].nt.k = 1
+ buckets[i].nt.reset()
+ }
return &HistogramReservoir{
bounds: bounds,
- storage: newStorage(len(bounds) + 1),
+ buckets: buckets,
}
}
var _ Reservoir = &HistogramReservoir{}
-// HistogramReservoir is a [Reservoir] that samples the last measurement that
-// falls within a histogram bucket. The histogram bucket upper-boundaries are
-// define by bounds.
+// HistogramReservoir is a [Reservoir] that samples
+// measurements that fall within a histogram bucket using Algorithm L. The
+// histogram bucket upper-boundaries are defined by bounds.
type HistogramReservoir struct {
reservoir.ConcurrentSafe
- *storage
-
// bounds are bucket bounds in ascending order.
- bounds []float64
+ bounds []float64
+ buckets []bucket
}
// Offer accepts the parameters associated with a measurement. The
@@ -69,14 +80,31 @@ func (r *HistogramReservoir) Offer(ctx context.Context, t time.Time, v Value, a
panic("unknown value type")
}
- idx := sort.SearchFloat64s(r.bounds, n)
+ b := &r.buckets[sort.SearchFloat64s(r.bounds, n)]
- r.store(ctx, idx, t, v, a)
+ b.mu.Lock()
+ defer b.mu.Unlock()
+
+ sampled, _ := b.nt.shouldSample()
+ if sampled {
+ b.store(ctx, t, v, a)
+ }
}
// Collect returns all the held exemplars.
//
-// The Reservoir state is preserved after this call.
+// The stored exemplars are preserved after this call, but the sampling state is reset.
func (r *HistogramReservoir) Collect(dest *[]Exemplar) {
- r.storage.Collect(dest)
+ *dest = reset(*dest, len(r.buckets), len(r.buckets))
+ var n int
+ for i := range r.buckets {
+ b := &r.buckets[i]
+ b.mu.Lock()
+ if b.exemplar(&(*dest)[n]) {
+ n++
+ }
+ b.nt.reset()
+ b.mu.Unlock()
+ }
+ *dest = (*dest)[:n]
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/next_tracker.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/next_tracker.go
new file mode 100644
index 000000000000..da5eb241c81a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/next_tracker.go
@@ -0,0 +1,154 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package exemplar
+
+import (
+ "math"
+ "math/rand/v2"
+)
+
+// nextTracker tracks the next measurement that should be sampled using Algorithm L.
+type nextTracker struct {
+ // count is the number of measurements seen.
+ count int64
+ // next is the next count that will store a measurement at a random index
+ // once the reservoir has been filled.
+ next int64
+ // w is the largest random number in a distribution that is used to compute
+ // the next next.
+ w float64
+ // k is the size of the reservoir.
+ k int
+}
+
+// reset resets the tracker to the initial state for a reservoir of size k.
+func (t *nextTracker) reset() {
+ t.count = 0
+ if t.k <= 0 {
+ return
+ }
+ // Random index inserts should only happen after the storage is full.
+ // -1 accounts for the fact that advance() will unconditionally add 1 to
+ // t.next below.
+ t.next = int64(t.k) - 1
+
+ // Initial random number in the series used to generate t.next.
+ //
+ // This is set before t.advance to reset or initialize the random number
+ // series. Without doing so it would always be 0 or never restart a new
+ // random number series.
+ //
+ // This maps the uniform random number in (0,1) to a geometric distribution
+ // over the same interval. The mean of the distribution is inversely
+ // proportional to the storage capacity.
+ t.w = math.Exp(math.Log(randomFloat64()) / float64(t.k))
+ t.advance()
+}
+
+// advance updates the count at which the offered measurement will overwrite an
+// existing exemplar.
+func (t *nextTracker) advance() {
+ // Use the current random number in the series to calculate the count of the
+ // next measurement that will be stored.
+ //
+ // Given 0 < t.w < 1, each iteration will result in subsequent t.w being
+ // smaller. This translates here into the next next being selected against
+ // a distribution with a higher mean (i.e. the expected value will increase
+ // and replacements become less likely)
+ //
+ // Important to note, the new t.next will always be at least 1 more than
+ // the last t.next.
+ t.next += int64(math.Log(randomFloat64())/math.Log(1-t.w)) + 1
+
+ // Calculate the next value in the random number series.
+ //
+ // The current value of t.w is based on the max of a distribution of random
+ // numbers (i.e. `w = max(u_1,u_2,...,u_k)` for `k` equal to the capacity
+ // of the storage and each `u` in the interval (0,w)). To calculate the
+ // next t.w we use the fact that when the next exemplar is selected to be
+ // included in the storage an existing one will be dropped, and the
+ // corresponding random number in the set used to calculate t.w will also
+ // be replaced. The replacement random number will also be within (0,w),
+ // therefore the next t.w will be based on the same distribution (i.e.
+ // `max(u_1,u_2,...,u_k)`). Therefore, we can sample the next t.w by
+ // computing the next random number `u` and take t.w as `w * u^(1/k)`.
+ t.w *= math.Exp(math.Log(randomFloat64()) / float64(t.k))
+}
+
+// shouldSample returns true if the measurement should be sampled.
+// It also returns the index at which the measurement should be stored.
+//
+// The following algorithm is "Algorithm L" from Li, Kim-Hung (4 December
+// 1994). "Reservoir-Sampling Algorithms of Time Complexity
+// O(n(1+log(N/n)))". ACM Transactions on Mathematical Software. 20 (4):
+// 481–493 (https://dl.acm.org/doi/10.1145/198429.198435).
+//
+// A high-level overview of "Algorithm L":
+// 0. Pre-calculate the random count greater than the storage size when
+// an exemplar will be replaced.
+// 1. Accept all measurements offered until the configured storage size is
+// reached.
+// 2. Loop:
+// a) When the pre-calculate count is reached, replace a random
+// existing exemplar with the offered measurement.
+// b) Calculate the next random count greater than the existing one
+// which will replace another exemplars
+//
+// The way a "replacement" count is computed is by looking at `n` number of
+// independent random numbers each corresponding to an offered measurement.
+// Of these numbers the smallest `k` (the same size as the storage
+// capacity) of them are kept as a subset. The maximum value in this
+// subset, called `w` is used to weight another random number generation
+// for the next count that will be considered.
+//
+// By weighting the next count computation like described, it is able to
+// perform a uniformly-weighted sampling algorithm based on the number of
+// samples the reservoir has seen so far. The sampling will "slow down" as
+// more and more samples are offered so as to reduce a bias towards those
+// offered just prior to the end of the collection.
+//
+// This algorithm is preferred because of its balance of simplicity and
+// performance. It will compute three random numbers (the bulk of
+// computation time) for each item that becomes part of the reservoir, but
+// it does not spend any time on items that do not. In particular it has an
+// asymptotic runtime of O(k(1 + log(n/k))) where n is the number of
+// measurements offered and k is the reservoir size.
+//
+// See https://en.wikipedia.org/wiki/Reservoir_sampling for an overview of
+// this and other reservoir sampling algorithms. See
+// https://github.com/MrAlias/reservoir-sampling for a performance
+// comparison of reservoir sampling algorithms.
+func (t *nextTracker) shouldSample() (bool, int) {
+ if t.k <= 0 {
+ return false, 0
+ }
+ if t.count < int64(t.k) {
+ idx := int(t.count)
+ t.count++
+ return true, idx
+ }
+ if t.count == t.next {
+ idx := 0
+ if t.k > 1 {
+ idx = int(rand.Int64N(int64(t.k)))
+ }
+ t.advance()
+ t.count++
+ return true, idx
+ }
+ t.count++
+ return false, 0
+}
+
+// randomFloat64 returns a pseudo-random value uniformly selected from
+// {k / 2^53 | 1 <= k < 2^53}.
+func randomFloat64() float64 {
+ // rand.Float64 returns a value in [0, 1). Retry in the extremely
+ // unlikely event that it returns zero to produce a value in (0, 1).
+ f := rand.Float64()
+ for f == 0 {
+ f = rand.Float64()
+ }
+ return f
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go
index ba5cd1a6b3d7..a6cfdf44f99d 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/reservoir.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go
index 790496027da4..9a0be05a24ae 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/storage.go
@@ -1,74 +1,41 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import (
"context"
- "sync"
"time"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
-// storage is an exemplar storage for [Reservoir] implementations.
-type storage struct {
- // measurements are the measurements sampled.
- //
- // This does not use []metricdata.Exemplar because it potentially would
- // require an allocation for trace and span IDs in the hot path of Offer.
- measurements []measurement
-}
-
-func newStorage(n int) *storage {
- return &storage{measurements: make([]measurement, n)}
-}
-
-func (r *storage) store(ctx context.Context, idx int, ts time.Time, v Value, droppedAttr []attribute.KeyValue) {
- r.measurements[idx].mux.Lock()
- defer r.measurements[idx].mux.Unlock()
- r.measurements[idx].FilteredAttributes = droppedAttr
- r.measurements[idx].Time = ts
- r.measurements[idx].Value = v
- r.measurements[idx].Ctx = ctx
- r.measurements[idx].valid = true
-}
-
-// Collect returns all the held exemplars.
-//
-// The Reservoir state is preserved after this call.
-func (r *storage) Collect(dest *[]Exemplar) {
- *dest = reset(*dest, len(r.measurements), len(r.measurements))
- var n int
- for i := range r.measurements {
- if r.measurements[i].exemplar(&(*dest)[n]) {
- n++
- }
- }
- *dest = (*dest)[:n]
-}
-
// measurement is a measurement made by a telemetry system.
type measurement struct {
- mux sync.Mutex
// FilteredAttributes are the attributes dropped during the measurement.
FilteredAttributes []attribute.KeyValue
// Time is the time when the measurement was made.
Time time.Time
// Value is the value of the measurement.
Value Value
- // Ctx is the context active when a measurement was made.
- Ctx context.Context
+ // SpanContext is the SpanContext active when a measurement was made.
+ SpanContext trace.SpanContext
valid bool
}
+func (m *measurement) store(ctx context.Context, ts time.Time, v Value, droppedAttr []attribute.KeyValue) {
+ m.FilteredAttributes = droppedAttr
+ m.Time = ts
+ m.Value = v
+ m.SpanContext = trace.SpanContextFromContext(ctx)
+ m.valid = true
+}
+
// exemplar returns m as an [Exemplar].
// returns true if it populated the exemplar.
func (m *measurement) exemplar(dest *Exemplar) bool {
- m.mux.Lock()
- defer m.mux.Unlock()
if !m.valid {
return false
}
@@ -77,7 +44,7 @@ func (m *measurement) exemplar(dest *Exemplar) bool {
dest.Time = m.Time
dest.Value = m.Value
- sc := trace.SpanContextFromContext(m.Ctx)
+ sc := m.SpanContext
if sc.HasTraceID() {
traceID := sc.TraceID()
dest.TraceID = traceID[:]
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/value.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/value.go
index 590b089a806c..c7d1645b6e98 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/value.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar/value.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package exemplar // import "go.opentelemetry.io/otel/sdk/metric/exemplar"
+package exemplar
import "math"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exporter.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exporter.go
index 1969cb42cf44..7bec415296f4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go
index dfb4964d9f85..31f7afef9037 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go
@@ -3,7 +3,7 @@
//go:generate stringer -type=InstrumentKind -trimprefix=InstrumentKind
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
@@ -16,6 +16,7 @@ import (
"go.opentelemetry.io/otel/metric/embedded"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+ "go.opentelemetry.io/otel/sdk/metric/internal/attrnorm"
)
var zeroScope instrumentation.Scope
@@ -180,6 +181,46 @@ func (i instID) normalize() instID {
return i
}
+type rawAttributesOption interface {
+ RawAttributes() []attribute.KeyValue
+ Experimental()
+}
+
+func extractRawKVs[T any](opts []T) []attribute.KeyValue {
+ var rawKVs []attribute.KeyValue
+ var count int
+ for _, opt := range opts {
+ if r, ok := any(opt).(rawAttributesOption); ok {
+ count++
+ if count == 1 {
+ rawKVs = r.RawAttributes()
+ } else {
+ if count == 2 {
+ // Create a new slice to avoid modifying the original slice from the first option.
+ rawKVs = append([]attribute.KeyValue(nil), rawKVs...)
+ }
+ rawKVs = append(rawKVs, r.RawAttributes()...)
+ }
+ }
+ }
+ return rawKVs
+}
+
+func resolveAttributes(configAttrs attribute.Set, rawKVs []attribute.KeyValue) attribute.Set {
+ configAttrs, _ = attrnorm.Set(configAttrs)
+ if len(rawKVs) == 0 {
+ return configAttrs
+ }
+ rawKVs, _ = attrnorm.KeyValues(rawKVs)
+ merged := make([]attribute.KeyValue, 0, configAttrs.Len()+len(rawKVs))
+ merged = append(merged, configAttrs.ToSlice()...)
+ // rawKVs are appended after configAttrs, meaning they will override any duplicate keys in configAttrs.
+ // This behavior is documented in WithUnsafeAttributes.
+ merged = append(merged, rawKVs...)
+ // TODO(#7743): Defer computing the full attribute.NewSet.
+ return attribute.NewSet(merged...)
+}
+
type int64Inst struct {
measures []aggregate.Measure[int64]
@@ -198,12 +239,14 @@ var (
func (i *int64Inst) Add(ctx context.Context, val int64, opts ...metric.AddOption) {
c := metric.NewAddConfig(opts)
- i.aggregate(ctx, val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ i.aggregate(ctx, val, resolveAttributes(c.Attributes(), rawKVs))
}
func (i *int64Inst) Record(ctx context.Context, val int64, opts ...metric.RecordOption) {
c := metric.NewRecordConfig(opts)
- i.aggregate(ctx, val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ i.aggregate(ctx, val, resolveAttributes(c.Attributes(), rawKVs))
}
func (i *int64Inst) Enabled(context.Context) bool {
@@ -238,12 +281,14 @@ var (
func (i *float64Inst) Add(ctx context.Context, val float64, opts ...metric.AddOption) {
c := metric.NewAddConfig(opts)
- i.aggregate(ctx, val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ i.aggregate(ctx, val, resolveAttributes(c.Attributes(), rawKVs))
}
func (i *float64Inst) Record(ctx context.Context, val float64, opts ...metric.RecordOption) {
c := metric.NewRecordConfig(opts)
- i.aggregate(ctx, val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ i.aggregate(ctx, val, resolveAttributes(c.Attributes(), rawKVs))
}
func (i *float64Inst) Enabled(context.Context) bool {
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go
index a35f3bcc1bbd..696fc21cab17 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go
index eb69e9650798..675c23fc3c97 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/atomic.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"math"
@@ -221,23 +221,23 @@ func (l *hotColdWaitGroup) swapHotAndWait() uint64 {
// limitedSyncMap is a sync.Map which enforces the aggregation limit on
// attribute sets and provides a Len() function.
-type limitedSyncMap struct {
+type limitedSyncMap[V any] struct {
sync.Map
aggLimit int
len int
lenMux sync.Mutex
}
-func (m *limitedSyncMap) LoadOrStoreAttr(fltrAttr attribute.Set, newValue func(attribute.Set) any) any {
+func (m *limitedSyncMap[V]) LoadOrStoreAttr(fltrAttr attribute.Set, newValue func(attribute.Set) V) V {
actual, loaded := m.Load(fltrAttr.Equivalent())
if loaded {
- return actual
+ return actual.(V)
}
// If the overflow set exists, assume we have already overflowed and don't
// bother with the slow path below.
actual, loaded = m.Load(overflowSet.Equivalent())
if loaded {
- return actual
+ return actual.(V)
}
// Slow path: add a new attribute set.
m.lenMux.Lock()
@@ -248,7 +248,7 @@ func (m *limitedSyncMap) LoadOrStoreAttr(fltrAttr attribute.Set, newValue func(a
// concurrently.
actual, loaded = m.Load(fltrAttr.Equivalent())
if loaded {
- return actual
+ return actual.(V)
}
if m.aggLimit > 0 && m.len >= m.aggLimit-1 {
@@ -258,17 +258,17 @@ func (m *limitedSyncMap) LoadOrStoreAttr(fltrAttr attribute.Set, newValue func(a
if !loaded {
m.len++
}
- return actual
+ return actual.(V)
}
-func (m *limitedSyncMap) Clear() {
+func (m *limitedSyncMap[V]) Clear() {
m.lenMux.Lock()
defer m.lenMux.Unlock()
m.len = 0
m.Map.Clear()
}
-func (m *limitedSyncMap) Len() int {
+func (m *limitedSyncMap[V]) Len() int {
m.lenMux.Lock()
defer m.lenMux.Unlock()
return m.len
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/doc.go
index 7b7225e6ef9b..c0399c4087ba 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/doc.go
@@ -4,4 +4,4 @@
// Package aggregate provides aggregate types used compute aggregations and
// cycle the state of metric measurements made by the SDK. These types and
// functionality are meant only for internal SDK use.
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/drop.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/drop.go
index 7adfcaf85317..47ec26dba916 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/drop.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/drop.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exemplar.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exemplar.go
index 25d709948e9c..45b620419259 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exemplar.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exemplar.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"sync"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go
index 767b1d6dc7d0..77c20a315c23 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
@@ -412,12 +412,15 @@ func (e *expoHistogram[N]) delta(
if !e.noSum {
hDPts[i].Sum = val.sum.load()
+ } else {
+ hDPts[i].Sum = 0
}
- if !e.noMinMax {
- if val.minMax.set.Load() {
- hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
- hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
- }
+ if !e.noMinMax && val.minMax.set.Load() {
+ hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
+ hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
+ } else {
+ hDPts[i].Min = metricdata.Extrema[N]{}
+ hDPts[i].Max = metricdata.Extrema[N]{}
}
collectExemplars(&hDPts[i].Exemplars, val.res.Collect)
@@ -488,12 +491,15 @@ func (e *expoHistogram[N]) cumulative(
if !e.noSum {
hDPts[i].Sum = val.sum.load()
+ } else {
+ hDPts[i].Sum = 0
}
- if !e.noMinMax {
- if val.minMax.set.Load() {
- hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
- hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
- }
+ if !e.noMinMax && val.minMax.set.Load() {
+ hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
+ hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
+ } else {
+ hDPts[i].Min = metricdata.Extrema[N]{}
+ hDPts[i].Max = metricdata.Extrema[N]{}
}
collectExemplars(&hDPts[i].Exemplars, val.res.Collect)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go
index e4f9409bc809..9aac90f03505 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/filtered_reservoir.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go
index 50c82ff32f96..17807e11e4e8 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
@@ -44,8 +44,6 @@ type histogramPointCounters[N int64 | float64] struct {
}
func (b *histogramPointCounters[N]) loadCountsInto(into *[]uint64) uint64 {
- // TODO (#3047): Making copies for counts incurs a large
- // memory allocation footprint. Alternatives should be explored.
counts := reset(*into, len(b.counts), len(b.counts))
count := uint64(0)
for i := range b.counts {
@@ -97,7 +95,7 @@ func (b *histogramPointCounters[N]) mergeIntoAndReset( // nolint:revive // Inten
// unused attribute sets do not report in subsequent collect() calls.
type deltaHistogram[N int64 | float64] struct {
hcwg hotColdWaitGroup
- hotColdValMap [2]limitedSyncMap
+ hotColdValMap [2]limitedSyncMap[*histogramPoint[N]]
start time.Time
noMinMax bool
@@ -114,7 +112,7 @@ func (s *deltaHistogram[N]) measure(
) {
hotIdx := s.hcwg.start()
defer s.hcwg.done(hotIdx)
- h := s.hotColdValMap[hotIdx].LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any {
+ h := s.hotColdValMap[hotIdx].LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) *histogramPoint[N] {
r := s.newRes(attr)
_, isDrop := r.(*dropRes[N])
hPt := &histogramPoint[N]{
@@ -131,7 +129,7 @@ func (s *deltaHistogram[N]) measure(
histogramPointCounters: histogramPointCounters[N]{counts: make([]atomic.Uint64, len(s.bounds)+1)},
}
return hPt
- }).(*histogramPoint[N])
+ })
// This search will return an index in the range [0, len(s.bounds)], where
// it will return len(s.bounds) if value is greater than the last element
@@ -171,7 +169,7 @@ func newDeltaHistogram[N int64 | float64](
noSum: noSum,
bounds: b,
newRes: r,
- hotColdValMap: [2]limitedSyncMap{
+ hotColdValMap: [2]limitedSyncMap[*histogramPoint[N]]{
{aggLimit: limit},
{aggLimit: limit},
},
@@ -212,13 +210,16 @@ func (s *deltaHistogram[N]) collect(
if !s.noSum {
hDPts[i].Sum = val.total.load()
+ } else {
+ hDPts[i].Sum = 0
}
- if !s.noMinMax {
- if val.minMax.set.Load() {
- hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
- hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
- }
+ if !s.noMinMax && val.minMax.set.Load() {
+ hDPts[i].Min = metricdata.NewExtrema(val.minMax.minimum.Load())
+ hDPts[i].Max = metricdata.NewExtrema(val.minMax.maximum.Load())
+ } else {
+ hDPts[i].Min = metricdata.Extrema[N]{}
+ hDPts[i].Max = metricdata.Extrema[N]{}
}
collectExemplars(&hDPts[i].Exemplars, val.res.Collect)
@@ -249,7 +250,7 @@ func (s *deltaHistogram[N]) collect(
// to reading. Unlike deltaHistogram, this maintains a single map so that the
// preserved attribute sets do not change when collect() is called.
type cumulativeHistogram[N int64 | float64] struct {
- values limitedSyncMap
+ values limitedSyncMap[*hotColdHistogramPoint[N]]
start time.Time
noMinMax bool
@@ -278,7 +279,7 @@ func newCumulativeHistogram[N int64 | float64](
noSum: noSum,
bounds: b,
newRes: r,
- values: limitedSyncMap{aggLimit: limit},
+ values: limitedSyncMap[*hotColdHistogramPoint[N]]{aggLimit: limit},
}
}
@@ -288,7 +289,7 @@ func (s *cumulativeHistogram[N]) measure(
fltrAttr attribute.Set,
droppedAttr []attribute.KeyValue,
) {
- h := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any {
+ h := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) *hotColdHistogramPoint[N] {
r := s.newRes(attr)
_, isDrop := r.(*dropRes[N])
hPt := &hotColdHistogramPoint[N]{
@@ -313,7 +314,7 @@ func (s *cumulativeHistogram[N]) measure(
},
}
return hPt
- }).(*hotColdHistogramPoint[N])
+ })
// This search will return an index in the range [0, len(s.bounds)], where
// it will return len(s.bounds) if value is greater than the last element
@@ -350,9 +351,16 @@ func (s *cumulativeHistogram[N]) collect(
// Do not allow modification of our copy of bounds.
bounds := slices.Clone(s.bounds)
- // Values are being concurrently written while we iterate, so only use the
- // current length for capacity.
- hDPts := reset(h.DataPoints, 0, s.values.Len())
+ // Pre-size hDPts so per-series destination slots are addressable by index.
+ // This lets loadCountsInto and collectExemplars reuse each slot's existing
+ // BucketCounts/Exemplars slices from the previous cycle. s.values is
+ // append-only here during cumulative collect, and limitedSyncMap only
+ // increments its len after a successful underlying LoadOrStore, so Range
+ // will visit at least n entries. Concurrent measurers may add more between
+ // Len() and Range; those extra slots are appended on demand inside the
+ // loop.
+ n := s.values.Len()
+ hDPts := reset(h.DataPoints, n, n)
perSeriesStartTimeEnabled := x.PerSeriesStartTimestamps.Enabled()
@@ -366,35 +374,41 @@ func (s *cumulativeHistogram[N]) collect(
}
// swap, observe, and clear the point
readIdx := val.hcwg.swapHotAndWait()
- var bucketCounts []uint64
- count := val.hotColdPoint[readIdx].loadCountsInto(&bucketCounts)
- newPt := metricdata.HistogramDataPoint[N]{
- Attributes: val.attrs,
- StartTime: startTime,
- Time: t,
- Count: count,
- Bounds: bounds,
- // The HistogramDataPoint field values returned need to be copies of
- // the histogramPoint value as we will keep updating them.
- BucketCounts: bucketCounts,
- }
+ // Concurrent writers can grow s.values between Len() and Range.
+ // Cold-path grow.
+ if i >= len(hDPts) {
+ hDPts = append(hDPts, metricdata.HistogramDataPoint[N]{})
+ }
+ dp := &hDPts[i]
+
+ count := val.hotColdPoint[readIdx].loadCountsInto(&dp.BucketCounts)
+ dp.Attributes = val.attrs
+ dp.StartTime = startTime
+ dp.Time = t
+ dp.Count = count
+ dp.Bounds = bounds
if !s.noSum {
- newPt.Sum = val.hotColdPoint[readIdx].total.load()
+ dp.Sum = val.hotColdPoint[readIdx].total.load()
+ } else {
+ // Slot may be reused; clear stale Sum from previous series.
+ var zero N
+ dp.Sum = zero
}
- if !s.noMinMax {
- if val.hotColdPoint[readIdx].minMax.set.Load() {
- newPt.Min = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.minimum.Load())
- newPt.Max = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.maximum.Load())
- }
+ if !s.noMinMax && val.hotColdPoint[readIdx].minMax.set.Load() {
+ dp.Min = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.minimum.Load())
+ dp.Max = metricdata.NewExtrema(val.hotColdPoint[readIdx].minMax.maximum.Load())
+ } else {
+ // Slot may be reused; clear stale Min/Max from previous series.
+ dp.Min = metricdata.Extrema[N]{}
+ dp.Max = metricdata.Extrema[N]{}
}
// Once we've read the point, merge it back into the hot histogram
// point since it is cumulative.
hotIdx := (readIdx + 1) % 2
val.hotColdPoint[readIdx].mergeIntoAndReset(&val.hotColdPoint[hotIdx], s.noMinMax, s.noSum)
- collectExemplars(&newPt.Exemplars, val.res.Collect)
- hDPts = append(hDPts, newPt)
+ collectExemplars(&dp.Exemplars, val.res.Collect)
i++
// TODO (#3006): This will use an unbounded amount of memory if there
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go
index 2af252ec5df9..0fddc9dcc9e7 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
@@ -24,7 +24,7 @@ type lastValuePoint[N int64 | float64] struct {
// lastValueMap summarizes a set of measurements as the last one made.
type lastValueMap[N int64 | float64] struct {
newRes func(attribute.Set) FilteredExemplarReservoir[N]
- values limitedSyncMap
+ values limitedSyncMap[*lastValuePoint[N]]
}
func (s *lastValueMap[N]) measure(
@@ -33,7 +33,7 @@ func (s *lastValueMap[N]) measure(
fltrAttr attribute.Set,
droppedAttr []attribute.KeyValue,
) {
- lv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any {
+ lv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) *lastValuePoint[N] {
r := s.newRes(attr)
_, isDrop := r.(*dropRes[N])
p := &lastValuePoint[N]{
@@ -44,7 +44,7 @@ func (s *lastValueMap[N]) measure(
}
p.value.Store(value)
return p
- }).(*lastValuePoint[N])
+ })
lv.value.Store(value)
if !lv.dropExemplars {
@@ -61,12 +61,12 @@ func newDeltaLastValue[N int64 | float64](
start: now(),
hotColdValMap: [2]lastValueMap[N]{
{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*lastValuePoint[N]]{aggLimit: limit},
},
{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*lastValuePoint[N]]{aggLimit: limit},
},
},
}
@@ -148,8 +148,8 @@ func newCumulativeLastValue[N int64 | float64](
) *cumulativeLastValue[N] {
return &cumulativeLastValue[N]{
lastValueMap: lastValueMap[N]{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*lastValuePoint[N]]{aggLimit: limit},
},
start: now(),
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go
index c19a1aff68f7..426a8b275ed8 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/limit.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import "go.opentelemetry.io/otel/attribute"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go
index 0cd3c94575bf..bee5ca370105 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package aggregate // import "go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
+package aggregate
import (
"context"
@@ -21,8 +21,8 @@ type sumValue[N int64 | float64] struct {
}
type sumValueMap[N int64 | float64] struct {
- values limitedSyncMap
newRes func(attribute.Set) FilteredExemplarReservoir[N]
+ values limitedSyncMap[*sumValue[N]]
}
func (s *sumValueMap[N]) measure(
@@ -31,7 +31,7 @@ func (s *sumValueMap[N]) measure(
fltrAttr attribute.Set,
droppedAttr []attribute.KeyValue,
) {
- sv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) any {
+ sv := s.values.LoadOrStoreAttr(fltrAttr, func(attr attribute.Set) *sumValue[N] {
r := s.newRes(attr)
_, isDrop := r.(*dropRes[N])
return &sumValue[N]{
@@ -40,7 +40,7 @@ func (s *sumValueMap[N]) measure(
startTime: now(),
dropExemplars: isDrop,
}
- }).(*sumValue[N])
+ })
sv.n.add(value)
// It is possible for collection to race with measurement and observe the
// exemplar in the batch of metrics after the add() for cumulative sums.
@@ -63,12 +63,12 @@ func newDeltaSum[N int64 | float64](
start: now(),
hotColdValMap: [2]sumValueMap[N]{
{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*sumValue[N]]{aggLimit: limit},
},
{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*sumValue[N]]{aggLimit: limit},
},
},
}
@@ -140,8 +140,8 @@ func newCumulativeSum[N int64 | float64](
monotonic: monotonic,
start: now(),
sumValueMap: sumValueMap[N]{
- values: limitedSyncMap{aggLimit: limit},
newRes: r,
+ values: limitedSyncMap[*sumValue[N]]{aggLimit: limit},
},
}
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/attrnorm/dedup.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/attrnorm/dedup.go
new file mode 100644
index 000000000000..fe9ddc96db71
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/attrnorm/dedup.go
@@ -0,0 +1,300 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/attrnorm/dedup.go.tmpl
+
+// Package attrnorm normalizes attribute values.
+package attrnorm
+
+import (
+ "reflect"
+ "unsafe"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+var (
+ keyValueType = reflect.TypeFor[attribute.KeyValue]()
+ valueType = reflect.TypeFor[attribute.Value]()
+)
+
+// rawValue mirrors attribute.Value. It is used only to read immutable slice
+// storage without calling AsMap or AsSlice on no-op paths.
+type rawValue struct {
+ vtype attribute.Type
+ numeric uint64
+ stringly string
+ slice any
+}
+
+// Value returns value with all map values deduplicated and whether it changed.
+//
+// Duplicate map keys are resolved using last-value-wins semantics.
+func Value(value attribute.Value) (attribute.Value, bool) {
+ switch value.Type() {
+ case attribute.SLICE:
+ return deduplicateSliceValue(value)
+ case attribute.MAP:
+ return deduplicateMapValue(value)
+ default:
+ return value, false
+ }
+}
+
+// KeyValue returns kv with all map values deduplicated and whether it changed.
+func KeyValue(kv attribute.KeyValue) (attribute.KeyValue, bool) {
+ value, changed := Value(kv.Value)
+ if changed {
+ kv.Value = value
+ }
+ return kv, changed
+}
+
+// KeyValues returns kvs with all map values deduplicated and whether they changed.
+//
+// The returned slice is the original kvs slice if no value needs
+// deduplication. Top-level keys in kvs are not deduplicated.
+func KeyValues(kvs []attribute.KeyValue) ([]attribute.KeyValue, bool) {
+ // Preserve the caller's slice on the common no-op path. Once a changed
+ // value is found, copy the prior values exactly once and fill the rest in
+ // place as the scan continues.
+ var normalized []attribute.KeyValue
+ for i, kv := range kvs {
+ kv, changed := KeyValue(kv)
+ if normalized != nil {
+ normalized[i] = kv
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.KeyValue, len(kvs))
+ copy(normalized, kvs[:i])
+ normalized[i] = kv
+ }
+ if normalized == nil {
+ return kvs, false
+ }
+ return normalized, true
+}
+
+// Set returns set with all map values deduplicated and whether it changed.
+//
+// The returned Set is the original set if no value needs deduplication.
+// Top-level key uniqueness remains attribute.Set's responsibility; this only
+// normalizes map attribute values.
+func Set(set attribute.Set) (attribute.Set, bool) {
+ if set.Len() == 0 {
+ return set, false
+ }
+
+ // Most attribute sets contain no duplicate map keys. Delay allocation until
+ // the first changed value so the no-op path returns the original Set.
+ var normalized []attribute.KeyValue
+ for i := range set.Len() {
+ kv, _ := set.Get(i)
+ kv, changed := KeyValue(kv)
+ if normalized != nil {
+ normalized = append(normalized, kv)
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.KeyValue, 0, set.Len())
+ for j := range i {
+ prior, _ := set.Get(j)
+ normalized = append(normalized, prior)
+ }
+ normalized = append(normalized, kv)
+ }
+ if normalized == nil {
+ return set, false
+ }
+
+ return attribute.NewSet(normalized...), true
+}
+
+func deduplicateSliceValue(value attribute.Value) (attribute.Value, bool) {
+ storage := valueStorage(value)
+ length := valueLen(storage)
+
+ // Slice values can contain map values, so recurse into each element while
+ // keeping the original attribute.Value when no element changes.
+ var normalized []attribute.Value
+ for i := range length {
+ elem := valueAt(storage, i)
+ elem, changed := Value(elem)
+ if normalized != nil {
+ normalized[i] = elem
+ continue
+ }
+ if !changed {
+ continue
+ }
+
+ normalized = make([]attribute.Value, length)
+ for j := range i {
+ normalized[j] = valueAt(storage, j)
+ }
+ normalized[i] = elem
+ }
+ if normalized == nil {
+ return value, false
+ }
+ return attribute.SliceValue(normalized...), true
+}
+
+func deduplicateMapValue(value attribute.Value) (attribute.Value, bool) {
+ storage := valueStorage(value)
+ length := keyValueLen(storage)
+ if length <= 1 {
+ // A single map entry cannot duplicate its own key, but its value might
+ // contain a map or slice that needs recursive normalization.
+ if length == 1 {
+ kv, changed := KeyValue(keyValueAt(storage, 0))
+ if changed {
+ return attribute.MapValue(kv), true
+ }
+ }
+ return value, false
+ }
+
+ var normalized []attribute.KeyValue
+ for i := 0; i < length; {
+ // attribute.MapValue stores key-values sorted by key using a stable
+ // sort. Equal keys therefore form a contiguous run, and the last
+ // element in that run is the last value provided by the caller.
+ first := keyValueAt(storage, i)
+ j := i + 1
+ for j < length && keyValueAt(storage, j).Key == first.Key {
+ j++
+ }
+
+ kv, nestedChanged := KeyValue(keyValueAt(storage, j-1))
+ // j-i > 1 means the current key run contained duplicates.
+ changed := nestedChanged || j-i > 1
+ if normalized != nil {
+ normalized = append(normalized, kv)
+ } else if changed {
+ normalized = make([]attribute.KeyValue, 0, length)
+ for k := range i {
+ normalized = append(normalized, keyValueAt(storage, k))
+ }
+ normalized = append(normalized, kv)
+ }
+ i = j
+ }
+ if normalized == nil {
+ return value, false
+ }
+ return attribute.MapValue(normalized...), true
+}
+
+func valueStorage(value attribute.Value) any {
+ // attribute.Value does not expose allocation-free map/slice iteration.
+ // The raw mirror lets us read the immutable backing array directly and
+ // reserve AsMap/AsSlice-style allocation for paths that actually change.
+ return (*rawValue)(
+ unsafe.Pointer(&value),
+ ).slice //nolint:gosec // Read-only mirror of attribute.Value for allocation-free iteration.
+}
+
+func valueLen(storage any) int {
+ // attribute.Value stores small slices in fixed-size array values. Handle
+ // the common sizes directly and fall back to reflection for larger arrays.
+ switch storage.(type) {
+ case [0]attribute.Value:
+ return 0
+ case [1]attribute.Value:
+ return 1
+ case [2]attribute.Value:
+ return 2
+ case [3]attribute.Value:
+ return 3
+ case [4]attribute.Value:
+ return 4
+ case [5]attribute.Value:
+ return 5
+ default:
+ return arrayLen(storage, valueType)
+ }
+}
+
+func valueAt(storage any, i int) attribute.Value {
+ switch values := storage.(type) {
+ case [1]attribute.Value:
+ return values[i]
+ case [2]attribute.Value:
+ return values[i]
+ case [3]attribute.Value:
+ return values[i]
+ case [4]attribute.Value:
+ return values[i]
+ case [5]attribute.Value:
+ return values[i]
+ default:
+ return arrayAt[attribute.Value](storage, valueType, i)
+ }
+}
+
+func keyValueLen(storage any) int {
+ // attribute.Value stores small maps in fixed-size key-value arrays. Handle
+ // the common sizes directly and fall back to reflection for larger arrays.
+ switch storage.(type) {
+ case [0]attribute.KeyValue:
+ return 0
+ case [1]attribute.KeyValue:
+ return 1
+ case [2]attribute.KeyValue:
+ return 2
+ case [3]attribute.KeyValue:
+ return 3
+ case [4]attribute.KeyValue:
+ return 4
+ case [5]attribute.KeyValue:
+ return 5
+ default:
+ return arrayLen(storage, keyValueType)
+ }
+}
+
+func keyValueAt(storage any, i int) attribute.KeyValue {
+ switch kvs := storage.(type) {
+ case [1]attribute.KeyValue:
+ return kvs[i]
+ case [2]attribute.KeyValue:
+ return kvs[i]
+ case [3]attribute.KeyValue:
+ return kvs[i]
+ case [4]attribute.KeyValue:
+ return kvs[i]
+ case [5]attribute.KeyValue:
+ return kvs[i]
+ default:
+ return arrayAt[attribute.KeyValue](storage, keyValueType, i)
+ }
+}
+
+func arrayLen(storage any, elem reflect.Type) int {
+ // Be defensive around invalid or unexpected Value storage. Returning zero
+ // makes malformed storage a no-op instead of panicking in telemetry paths.
+ array := reflect.ValueOf(storage)
+ if array.Kind() != reflect.Array || array.Type().Elem() != elem {
+ return 0
+ }
+ return array.Len()
+}
+
+func arrayAt[T any](storage any, elem reflect.Type, i int) T {
+ // Match arrayLen's fail-closed behavior for unexpected storage.
+ array := reflect.ValueOf(storage)
+ if array.Kind() != reflect.Array || array.Type().Elem() != elem || i < 0 || i >= array.Len() {
+ var zero T
+ return zero
+ }
+ return array.Index(i).Interface().(T)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/gen.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/gen.go
new file mode 100644
index 000000000000..5f077dfe93b2
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/gen.go
@@ -0,0 +1,10 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package internal provides internal functionality for the sdk/metric package.
+package internal
+
+//go:generate gotmpl --body=../../../internal/shared/x/x.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/otel/sdk/metric\" }" --out=x/x.go
+//go:generate gotmpl --body=../../../internal/shared/x/x_test.go.tmpl "--data={}" --out=x/x_test.go
+//go:generate gotmpl --body=../../../internal/shared/attrnorm/dedup.go.tmpl "--data={}" --out=attrnorm/dedup.go
+//go:generate gotmpl --body=../../../internal/shared/attrnorm/dedup_test.go.tmpl "--data={}" --out=attrnorm/dedup_test.go
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go
index c580dcc30d26..b09748a79fa8 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/observ/instrumentation.go
@@ -3,7 +3,7 @@
// Package observ provides experimental observability instrumentation for the
// metric reader.
-package observ // import "go.opentelemetry.io/otel/sdk/metric/internal/observ"
+package observ
import (
"context"
@@ -16,8 +16,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go
index 3be234a41085..8542fd94bd7c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/concurrent_safe.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package reservoir // import "go.opentelemetry.io/otel/sdk/metric/internal/reservoir"
+package reservoir
// ConcurrentSafe is an interface that can be embedded in an
// exemplar.Reservoir to indicate to the SDK that it is safe to invoke its
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go
index 6cd213b5f326..6dbf906c8ad0 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reservoir/doc.go
@@ -3,4 +3,4 @@
// Package reservoir contains experimental features used by built-in exemplar
// reservoirs which require coordination with the metrics SDK.
-package reservoir // import "go.opentelemetry.io/otel/sdk/metric/internal/reservoir"
+package reservoir
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reuse_slice.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reuse_slice.go
index ea452be6c2cd..6ddf01473b4c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reuse_slice.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/reuse_slice.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package internal provides internal functionality for the metric package.
-package internal // import "go.opentelemetry.io/otel/sdk/metric/internal"
+package internal
// ReuseSlice returns a zeroed view of slice if its capacity is greater than or
// equal to n. Otherwise, it returns a new []T with capacity equal to n.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/features.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/features.go
new file mode 100644
index 000000000000..a8268702a6d1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/features.go
@@ -0,0 +1,22 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package x
+
+import "strconv"
+
+// MetricExportBatchSize is an experimental feature flag that controls the
+// max export batch size for metric data.
+//
+// To enable this feature set the OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE environment
+// variable to a positive integer value.
+var MetricExportBatchSize = newFeature(
+ []string{"METRIC_EXPORT_BATCH_SIZE"},
+ func(v string) (int, bool) {
+ val, err := strconv.Atoi(v)
+ if err == nil && val > 0 {
+ return val, true
+ }
+ return 0, false
+ },
+)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go
index 8e3c62a13d2d..f501984ae540 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/x/x.go
@@ -1,36 +1,38 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-// Package x contains support for OTel metric SDK experimental features.
-//
-// This package should only be used for features defined in the specification.
-// It should not be used for experiments or new project ideas.
-package x // import "go.opentelemetry.io/otel/sdk/metric/internal/x"
+// DO NOT MODIFY. Generated by gotmpl.
+// source: internal/shared/x/x.go.tmpl
+
+// Package x documents experimental features for [go.opentelemetry.io/otel/sdk/metric].
+package x
import (
"os"
- "strconv"
)
// Feature is an experimental feature control flag. It provides a uniform way
// to interact with these feature flags and parse their values.
type Feature[T any] struct {
- key string
+ keys []string
parse func(v string) (T, bool)
}
-//nolint:unused
-func newFeature[T any](suffix string, parse func(string) (T, bool)) Feature[T] {
+func newFeature[T any](suffix []string, parse func(string) (T, bool)) Feature[T] {
const envKeyRoot = "OTEL_GO_X_"
+ keys := make([]string, 0, len(suffix))
+ for _, s := range suffix {
+ keys = append(keys, envKeyRoot+s)
+ }
return Feature[T]{
- key: envKeyRoot + suffix,
+ keys: keys,
parse: parse,
}
}
-// Key returns the environment variable key that needs to be set to enable the
+// Keys returns the environment variable keys that can be set to enable the
// feature.
-func (f Feature[T]) Key() string { return f.key }
+func (f Feature[T]) Keys() []string { return f.keys }
// Lookup returns the user configured value for the feature and true if the
// user has enabled the feature. Otherwise, if the feature is not enabled, a
@@ -40,11 +42,13 @@ func (f Feature[T]) Lookup() (v T, ok bool) {
//
// > The SDK MUST interpret an empty value of an environment variable the
// > same way as when the variable is unset.
- vRaw := os.Getenv(f.key)
- if vRaw == "" {
- return v, ok
+ for _, key := range f.keys {
+ vRaw := os.Getenv(key)
+ if vRaw != "" {
+ return f.parse(vRaw)
+ }
}
- return f.parse(vRaw)
+ return v, ok
}
// Enabled reports whether the feature is enabled.
@@ -52,19 +56,3 @@ func (f Feature[T]) Enabled() bool {
_, ok := f.Lookup()
return ok
}
-
-// MetricExportBatchSize is an experimental feature flag that controls the
-// max export batch size for metric data.
-//
-// To enable this feature set the OTEL_GO_X_METRIC_EXPORT_BATCH_SIZE environment
-// variable to a positive integer value.
-var MetricExportBatchSize = newFeature(
- "METRIC_EXPORT_BATCH_SIZE",
- func(v string) (int, bool) {
- val, err := strconv.Atoi(v)
- if err == nil && val > 0 {
- return val, true
- }
- return 0, false
- },
-)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go
index 7e0cccdff608..b98e255d8c42 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/meter.go b/vendor/go.opentelemetry.io/otel/sdk/metric/meter.go
index e9a2d59572ef..8c54974e062b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/meter.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/meter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
@@ -593,11 +593,13 @@ func (r observer) ObserveFloat64(o metric.Float64Observable, v float64, opts ...
return
}
c := metric.NewObserveConfig(opts)
+ rawKVs := extractRawKVs(opts)
+ set := resolveAttributes(c.Attributes(), rawKVs)
// Access to r.pipe.float64Measure is already guarded by a lock in pipeline.produce.
// TODO (#5946): Refactor pipeline and observable measures.
measures := r.pipe.float64Measures[oImpl.observableID]
for _, m := range measures {
- m(context.Background(), v, c.Attributes())
+ m(context.Background(), v, set)
}
}
@@ -624,11 +626,13 @@ func (r observer) ObserveInt64(o metric.Int64Observable, v int64, opts ...metric
return
}
c := metric.NewObserveConfig(opts)
+ rawKVs := extractRawKVs(opts)
+ set := resolveAttributes(c.Attributes(), rawKVs)
// Access to r.pipe.int64Measures is already guarded b a lock in pipeline.produce.
// TODO (#5946): Refactor pipeline and observable measures.
measures := r.pipe.int64Measures[oImpl.observableID]
for _, m := range measures {
- m(context.Background(), v, c.Attributes())
+ m(context.Background(), v, set)
}
}
@@ -793,7 +797,8 @@ type int64Observer struct {
func (o int64Observer) Observe(val int64, opts ...metric.ObserveOption) {
c := metric.NewObserveConfig(opts)
- o.observe(val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ o.observe(val, resolveAttributes(c.Attributes(), rawKVs))
}
type float64Observer struct {
@@ -803,7 +808,8 @@ type float64Observer struct {
func (o float64Observer) Observe(val float64, opts ...metric.ObserveOption) {
c := metric.NewObserveConfig(opts)
- o.observe(val, c.Attributes())
+ rawKVs := extractRawKVs(opts)
+ o.observe(val, resolveAttributes(c.Attributes(), rawKVs))
}
func defaultAttributes[T any](opts []T) []attribute.Key {
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go
index af835e9d9923..1caed336e951 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/data.go
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// Package metricdata provides types for the metric SDK data model.
-package metricdata // import "go.opentelemetry.io/otel/sdk/metric/metricdata"
+package metricdata
import (
"encoding/json"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality.go b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality.go
index 2ac840ff3561..8d7c89d857f4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/metricdata/temporality.go
@@ -3,7 +3,7 @@
//go:generate stringer -type=Temporality
-package metricdata // import "go.opentelemetry.io/otel/sdk/metric/metricdata"
+package metricdata
// Temporality defines the window that an aggregation was calculated over.
type Temporality uint8
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
index c1c2e3e2f0ab..9f7712bd516b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
@@ -16,7 +16,7 @@ import (
"go.opentelemetry.io/otel/sdk/metric/internal/observ"
"go.opentelemetry.io/otel/sdk/metric/internal/x"
"go.opentelemetry.io/otel/sdk/metric/metricdata"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
// Default periodic reader timing.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
index 09d10eeb5f29..f04c2ddcecd1 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"container/list"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/provider.go b/vendor/go.opentelemetry.io/otel/sdk/metric/provider.go
index fd4cdccd0ff0..9f9f01f4323d 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/provider.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/provider.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
@@ -12,6 +12,7 @@ import (
"go.opentelemetry.io/otel/metric/embedded"
"go.opentelemetry.io/otel/metric/noop"
"go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/metric/internal/attrnorm"
)
// MeterProvider handles the creation and coordination of Meters. All Meters
@@ -76,11 +77,12 @@ func (mp *MeterProvider) Meter(name string, options ...metric.MeterOption) metri
}
c := metric.NewMeterConfig(options...)
+ attrs, _ := attrnorm.Set(c.InstrumentationAttributes())
s := instrumentation.Scope{
Name: name,
Version: c.InstrumentationVersion(),
SchemaURL: c.SchemaURL(),
- Attributes: c.InstrumentationAttributes(),
+ Attributes: attrs,
}
global.Info(
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go
index 556afcea6bba..505c9ad93882 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/reader.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/splitmetrics.go b/vendor/go.opentelemetry.io/otel/sdk/metric/splitmetrics.go
index a7931412bb24..b183cf4863cd 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/splitmetrics.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/splitmetrics.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"go.opentelemetry.io/otel/sdk/metric/metricdata"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
index 3e1bea4b4460..4c1cd75e2c03 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go
@@ -1,9 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
// version is the current release version of the metric SDK in use.
func version() string {
- return "1.44.0"
+ return "1.45.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/view.go b/vendor/go.opentelemetry.io/otel/sdk/metric/view.go
index 13fb7143ce0d..3f98928f96ad 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/metric/view.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/metric/view.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package metric // import "go.opentelemetry.io/otel/sdk/metric"
+package metric
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go b/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
index c02aeefdde53..8754313af995 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
index 28823edd53d2..d5f6dc0a6d36 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
type (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/config.go b/vendor/go.opentelemetry.io/otel/sdk/resource/config.go
index a3d647d92c29..c5ffa45d0220 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/config.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
@@ -23,7 +23,9 @@ type Option interface {
apply(config) config
}
-// WithAttributes adds attributes to the configured Resource.
+// WithAttributes adds attributes to the configured Resource. Duplicate
+// top-level attribute keys and duplicate keys inside map values are
+// resolved using last-value-wins semantics.
func WithAttributes(attributes ...attribute.KeyValue) Option {
return WithDetectors(detectAttributes{attributes})
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
index ce03e24c4199..c81163bf85e4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"bufio"
@@ -11,7 +11,7 @@ import (
"os"
"regexp"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
type containerIDProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go b/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go
index 64939a271315..f5a79d3fe499 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go
@@ -17,4 +17,4 @@
//
// While this package provides a stable API,
// the attributes added by resource detectors may change.
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
index ac5691c08d99..0eeb1e2ae5e1 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
@@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
index cb38fa1a8b02..47219be223a4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
@@ -1,14 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
"errors"
"strings"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
type hostIDProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go
index 4c1c30f2560b..bcd174342b2f 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go
@@ -3,7 +3,7 @@
//go:build dragonfly || freebsd || netbsd || openbsd || solaris
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
var platformHostIDReader hostIDReader = &hostIDReaderBSD{
execCommand: execCommand,
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go
index b09fde3b7350..81ece5b34d63 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
var platformHostIDReader hostIDReader = &hostIDReaderDarwin{
execCommand: execCommand,
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
index e239ead02879..c058f0d26b0a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
@@ -3,7 +3,7 @@
//go:build darwin || dragonfly || freebsd || netbsd || openbsd || solaris
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go
index 4a26096c8d04..26cf6a5d1e2b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go
@@ -3,7 +3,7 @@
//go:build linux
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
var platformHostIDReader hostIDReader = &hostIDReaderLinux{
readFile: readFile,
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go
index c95d87685c99..d955c2c909ff 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go
@@ -3,7 +3,7 @@
//go:build linux || dragonfly || freebsd || netbsd || openbsd || solaris
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import "os"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go
index 63ad2fa4e05f..9f6ca82118c5 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go
@@ -3,7 +3,7 @@
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
// hostIDReaderUnsupported is a placeholder implementation for operating systems
// for which this project currently doesn't support host.id
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go
index 2b8ca20b3811..e9e4a038484c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go
@@ -3,7 +3,7 @@
//go:build windows
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"golang.org/x/sys/windows/registry"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
index 4c0def414835..6af4915679f0 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
@@ -1,14 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
"strings"
"go.opentelemetry.io/otel/attribute"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
type osDescriptionProvider func() (string, error)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go
index 3d703c5d98e2..f12876d17a5a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"encoding/xml"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go
index a1763267c225..ad92858546e9 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go
@@ -3,7 +3,7 @@
//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"bufio"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
index 1cd87c398343..ba5e48db2445 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
@@ -3,7 +3,7 @@
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"fmt"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go
index 25f629532a33..e2c19c2b3aa5 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go
@@ -3,7 +3,7 @@
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
// platformOSDescription is a placeholder implementation for OSes
// for which this project currently doesn't support os.description
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
index ebd50826d6ee..9b76489577ad 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"fmt"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
index b015f8233c68..a578fc3258e4 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
@@ -11,7 +11,7 @@ import (
"path/filepath"
"runtime"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
)
type (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
index f715be53edaf..68ab274d2f1f 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package resource // import "go.opentelemetry.io/otel/sdk/resource"
+package resource
import (
"context"
@@ -11,6 +11,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/internal/attrnorm"
"go.opentelemetry.io/otel/sdk/internal/x"
)
@@ -47,6 +48,8 @@ var (
var ErrSchemaURLConflict = errors.New("conflicting Schema URL")
// New returns a [Resource] built using opts.
+// Duplicate top-level attribute keys and duplicate keys inside map
+// values are resolved using last-value-wins semantics.
//
// This may return a partial Resource along with an error containing
// [ErrPartialResource] if options that provide a [Detector] are used and that
@@ -66,25 +69,29 @@ func New(ctx context.Context, opts ...Option) (*Resource, error) {
return r, detect(ctx, r, cfg.detectors)
}
-// NewWithAttributes creates a resource from attrs and associates the resource with a
-// schema URL. If attrs contains duplicate keys, the last value will be used. If attrs
-// contains any invalid items those items will be dropped. The attrs are assumed to be
-// in a schema identified by schemaURL.
+// NewWithAttributes creates a resource from attrs and associates the resource
+// with a schema URL. If attrs contains duplicate top-level attribute keys or
+// duplicate keys inside map values, the last value will be used. If attrs
+// contains any invalid items those items will be dropped. The attrs are assumed
+// to be in a schema identified by schemaURL.
func NewWithAttributes(schemaURL string, attrs ...attribute.KeyValue) *Resource {
resource := NewSchemaless(attrs...)
resource.schemaURL = schemaURL
return resource
}
-// NewSchemaless creates a resource from attrs. If attrs contains duplicate keys,
-// the last value will be used. If attrs contains any invalid items those items will
-// be dropped. The resource will not be associated with a schema URL. If the schema
+// NewSchemaless creates a resource from attrs. If attrs contains duplicate
+// top-level attribute keys or duplicate keys inside map values, the last
+// value will be used. If attrs contains any invalid items those items will be
+// dropped. The resource will not be associated with a schema URL. If the schema
// of the attrs is known use NewWithAttributes instead.
func NewSchemaless(attrs ...attribute.KeyValue) *Resource {
if len(attrs) == 0 {
return &Resource{}
}
+ attrs, _ = attrnorm.KeyValues(attrs)
+
// Ensure attributes comply with the specification:
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/common/README.md#attribute
s, _ := attribute.NewSetWithFiltered(attrs, func(kv attribute.KeyValue) bool {
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
index f9f2a6c2c857..2b9560ee7f9a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
@@ -1,11 +1,12 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
"errors"
+ "fmt"
"sync"
"sync/atomic"
"time"
@@ -435,11 +436,11 @@ func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan)
func (bsp *batchSpanProcessor) MarshalLog() any {
return struct {
Type string
- SpanExporter SpanExporter
+ SpanExporter string
Config BatchSpanProcessorOptions
}{
Type: "BatchSpanProcessor",
- SpanExporter: bsp.e,
+ SpanExporter: fmt.Sprintf("%T", bsp.e),
Config: bsp.o,
}
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
index b502c7d4798a..b292fa3113e3 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
@@ -10,4 +10,4 @@ See https://opentelemetry.io.
See [go.opentelemetry.io/otel/sdk/internal/x] for information about
the experimental features.
*/
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/event.go b/vendor/go.opentelemetry.io/otel/sdk/trace/event.go
index 60a7ed1349b5..49eac0459f4b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/event.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/event.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"time"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
index 8c308dd60a93..1f62b528c3e8 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"slices"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
index 3649322a6e4a..be22ac63228c 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
index 58f68df44171..1385ae6fc24f 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go
@@ -3,7 +3,7 @@
// Package env provides types and functionality for environment variable support
// in the OpenTelemetry SDK.
-package env // import "go.opentelemetry.io/otel/sdk/trace/internal/env"
+package env
import (
"os"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
index c725ebf372df..896ed517f021 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ"
+package observ
import (
"context"
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
const (
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
index b542121e6a25..64fd5238d04f 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go
@@ -3,4 +3,4 @@
// Package observ provides observability instrumentation for the OTel trace SDK
// package.
-package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ"
+package observ
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
index cf4b5d481fcf..89922e4b8074 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ"
+package observ
import (
"context"
@@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
)
var measureAttrsPool = sync.Pool{
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
index 5aae89e883c4..3428aa894979 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ"
+package observ
import (
"context"
@@ -13,7 +13,7 @@ import (
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk"
"go.opentelemetry.io/otel/sdk/internal/x"
- "go.opentelemetry.io/otel/semconv/v1.41.0/otelconv"
+ "go.opentelemetry.io/otel/semconv/v1.43.0/otelconv"
"go.opentelemetry.io/otel/trace"
)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/link.go b/vendor/go.opentelemetry.io/otel/sdk/trace/link.go
index c03bdc90f68a..d4a07a714be6 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/link.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/link.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"go.opentelemetry.io/otel/attribute"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
index 9d90c2eda5a4..6b2368413a11 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
@@ -13,6 +13,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/internal/attrnorm"
"go.opentelemetry.io/otel/sdk/resource"
"go.opentelemetry.io/otel/sdk/trace/internal/observ"
"go.opentelemetry.io/otel/trace"
@@ -42,22 +43,27 @@ type tracerProviderConfig struct {
// resource contains attributes representing an entity that produces telemetry.
resource *resource.Resource
+
+ // panicRecordingDisabled disables recording exception events from panics.
+ panicRecordingDisabled bool
}
// MarshalLog is the marshaling function used by the logging system to represent this Provider.
func (cfg tracerProviderConfig) MarshalLog() any {
return struct {
- SpanProcessors []SpanProcessor
- SamplerType string
- IDGeneratorType string
- SpanLimits SpanLimits
- Resource *resource.Resource
+ SpanProcessors []SpanProcessor
+ SamplerType string
+ IDGeneratorType string
+ SpanLimits SpanLimits
+ Resource *resource.Resource
+ PanicRecordingDisabled bool
}{
- SpanProcessors: cfg.processors,
- SamplerType: fmt.Sprintf("%T", cfg.sampler),
- IDGeneratorType: fmt.Sprintf("%T", cfg.idGenerator),
- SpanLimits: cfg.spanLimits,
- Resource: cfg.resource,
+ SpanProcessors: cfg.processors,
+ SamplerType: fmt.Sprintf("%T", cfg.sampler),
+ IDGeneratorType: fmt.Sprintf("%T", cfg.idGenerator),
+ SpanLimits: cfg.spanLimits,
+ Resource: cfg.resource,
+ PanicRecordingDisabled: cfg.panicRecordingDisabled,
}
}
@@ -74,10 +80,11 @@ type TracerProvider struct {
// These fields are not protected by the lock mu. They are assumed to be
// immutable after creation of the TracerProvider.
- sampler Sampler
- idGenerator IDGenerator
- spanLimits SpanLimits
- resource *resource.Resource
+ sampler Sampler
+ idGenerator IDGenerator
+ spanLimits SpanLimits
+ resource *resource.Resource
+ panicRecordingDisabled bool
}
var _ trace.TracerProvider = &TracerProvider{}
@@ -112,11 +119,12 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
o = ensureValidTracerProviderConfig(o)
tp := &TracerProvider{
- namedTracer: make(map[instrumentation.Scope]*tracer),
- sampler: o.sampler,
- idGenerator: o.idGenerator,
- spanLimits: o.spanLimits,
- resource: o.resource,
+ namedTracer: make(map[instrumentation.Scope]*tracer),
+ sampler: o.sampler,
+ idGenerator: o.idGenerator,
+ spanLimits: o.spanLimits,
+ resource: o.resource,
+ panicRecordingDisabled: o.panicRecordingDisabled,
}
global.Info("TracerProvider created", "config", o)
@@ -142,6 +150,7 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T
return noop.NewTracerProvider().Tracer(name, opts...)
}
c := trace.NewTracerConfig(opts...)
+ attrs, _ := attrnorm.Set(c.InstrumentationAttributes())
if name == "" {
name = defaultTracerName
}
@@ -149,7 +158,7 @@ func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T
Name: name,
Version: c.InstrumentationVersion(),
SchemaURL: c.SchemaURL(),
- Attributes: c.InstrumentationAttributes(),
+ Attributes: attrs,
}
t, ok := func() (trace.Tracer, bool) {
@@ -357,6 +366,16 @@ func WithSpanProcessor(sp SpanProcessor) TracerProviderOption {
})
}
+// WithoutPanicRecording configures the TracerProvider to not record exception
+// events when a Span is ended while panicking. The panic continues to
+// propagate, and the span is ended without adding the event.
+func WithoutPanicRecording() TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ cfg.panicRecordingDisabled = true
+ return cfg
+ })
+}
+
// WithResource returns a TracerProviderOption that will configure the
// Resource r as a TracerProvider's Resource. The configured Resource is
// referenced by all the Tracers the TracerProvider creates. It represents the
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
index 9b672a1d70d4..b0fa94ed2d66 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
index 5a4c74318b86..c79177ae8d56 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
index 771e427a4c5c..e9bec4394837 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
@@ -1,10 +1,11 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
+ "fmt"
"sync"
"sync/atomic"
@@ -140,11 +141,18 @@ func (*simpleSpanProcessor) ForceFlush(context.Context) error {
// MarshalLog is the marshaling function used by the logging system to represent
// this Span Processor.
func (ssp *simpleSpanProcessor) MarshalLog() any {
+ // Shutdown clears exporter under exporterMu.
+ // Copy it while holding the same lock so MarshalLog
+ // can run concurrently without racing with Shutdown.
+ ssp.exporterMu.Lock()
+ exp := ssp.exporter
+ ssp.exporterMu.Unlock()
+
return struct {
Type string
- Exporter SpanExporter
+ Exporter string
}{
Type: "SimpleSpanProcessor",
- Exporter: ssp.exporter,
+ Exporter: fmt.Sprintf("%T", exp),
}
}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
index 63aa337800c1..8893dc39f135 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"time"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
index d1d9af29d792..0aae5f5bb2ff 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
@@ -10,17 +10,16 @@ import (
"runtime"
rt "runtime/trace"
"slices"
- "strings"
"sync"
"time"
- "unicode/utf8"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/internal/attrnorm"
"go.opentelemetry.io/otel/sdk/resource"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/embedded"
)
@@ -269,7 +268,8 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) {
s.addDroppedAttr(1)
continue
}
- a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ a = dedupAttr(a)
+ a = attrnorm.Truncate(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
s.attributes = append(s.attributes, a)
}
}
@@ -329,7 +329,8 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) {
if idx, ok := exists[a.Key]; ok {
// Perform all updates before dropping, even when at capacity.
- a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ a = dedupAttr(a)
+ a = attrnorm.Truncate(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
s.attributes[idx] = a
continue
}
@@ -339,208 +340,31 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) {
// updates are checked and performed.
s.addDroppedAttr(1)
} else {
- a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ a = dedupAttr(a)
+ a = attrnorm.Truncate(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
s.attributes = append(s.attributes, a)
exists[a.Key] = len(s.attributes) - 1
}
}
}
-// truncateAttr returns a truncated version of attr. Only string, string
-// slice, byte slice, and slice attribute values are truncated. String values are truncated
-// to at most a length of limit. Each string slice value is truncated in this
-// fashion (the slice length itself is unaffected), and byte slice values are truncated to at most
-// limit bytes. For slice attribute values, the limit is applied to each
-// element recursively.
-//
-// No truncation is performed for a negative limit.
-func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue {
- if limit < 0 {
- return attr
- }
+func dedupAttr(attr attribute.KeyValue) attribute.KeyValue {
switch attr.Value.Type() {
- case attribute.STRING:
- v := attr.Value.AsString()
- return attr.Key.String(truncate(limit, v))
- case attribute.STRINGSLICE:
- v := attr.Value.AsStringSlice()
- for i := range v {
- v[i] = truncate(limit, v[i])
- }
- return attr.Key.StringSlice(v)
- case attribute.BYTESLICE:
- v := attr.Value.AsString()
- if len(v) > limit {
- return attr.Key.ByteSlice([]byte(v[:limit]))
- }
+ case attribute.SLICE, attribute.MAP:
+ attr, _ = attrnorm.KeyValue(attr)
+ return attr
+ default:
return attr
- case attribute.SLICE:
- v := attr.Value.AsSlice()
- if !slices.ContainsFunc(v, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
- return attr
- }
- newV := make([]attribute.Value, len(v))
- for i, elem := range v {
- newV[i] = truncateValue(limit, elem)
- }
- return attr.Key.Slice(newV...)
- }
- return attr
-}
-
-// truncateValue returns a truncated version of v. Only string, string slice,
-// byte slice, and (recursively) slice values are modified.
-//
-// No truncation is performed for a negative limit.
-func truncateValue(limit int, v attribute.Value) attribute.Value {
- switch v.Type() {
- case attribute.STRING:
- return attribute.StringValue(truncate(limit, v.AsString()))
- case attribute.STRINGSLICE:
- ss := v.AsStringSlice()
- for i := range ss {
- ss[i] = truncate(limit, ss[i])
- }
- return attribute.StringSliceValue(ss)
-
- case attribute.BYTESLICE:
- // len(v.AsString()) is identical to len(v.AsByteSlice()) but
- // avoids allocating the full slice before truncation.
- s := v.AsString()
- if limit >= 0 && len(s) > limit {
- return attribute.ByteSliceValue([]byte(s[:limit]))
- }
- case attribute.SLICE:
- sl := v.AsSlice()
- if !slices.ContainsFunc(sl, func(e attribute.Value) bool { return needsTruncation(limit, e) }) {
- return v
- }
- newSl := make([]attribute.Value, len(sl))
- for i, elem := range sl {
- newSl[i] = truncateValue(limit, elem)
- }
- return attribute.SliceValue(newSl...)
- }
- return v
-}
-
-// stringNeedsTruncation reports whether s would be modified by truncate for the
-// given limit.
-func stringNeedsTruncation(limit int, s string) bool {
- if limit < 0 || len(s) <= limit {
- return false
- }
- return utf8.RuneCountInString(s) > limit || !utf8.ValidString(s)
-}
-
-// needsTruncation reports whether v would be modified by truncateValue for the
-// given limit.
-func needsTruncation(limit int, v attribute.Value) bool {
- switch v.Type() {
- case attribute.STRING:
- return stringNeedsTruncation(limit, v.AsString())
- case attribute.BYTESLICE:
- // len(v.AsString()) is identical to len(v.AsByteSlice()) but
- // avoids memory allocation.
- if limit >= 0 && len(v.AsString()) > limit {
- return true
- }
- case attribute.STRINGSLICE:
- for _, s := range v.AsStringSlice() {
- if stringNeedsTruncation(limit, s) {
- return true
- }
- }
- case attribute.SLICE:
- return slices.ContainsFunc(v.AsSlice(), func(e attribute.Value) bool { return needsTruncation(limit, e) })
- }
- return false
-}
-
-// truncate returns a truncated version of s such that it contains less than
-// the limit number of characters. Truncation is applied by returning the limit
-// number of valid characters contained in s.
-//
-// If limit is negative, it returns the original string.
-//
-// UTF-8 is supported. When truncating, all invalid characters are dropped
-// before applying truncation.
-//
-// If s already contains less than the limit number of bytes, it is returned
-// unchanged. No invalid characters are removed.
-func truncate(limit int, s string) string {
- // This prioritize performance in the following order based on the most
- // common expected use-cases.
- //
- // - Short values less than the default limit (128).
- // - Strings with valid encodings that exceed the limit.
- // - No limit.
- // - Strings with invalid encodings that exceed the limit.
- if limit < 0 || len(s) <= limit {
- return s
- }
-
- // Optimistically, assume all valid UTF-8.
- var b strings.Builder
- count := 0
- for i, c := range s {
- if c != utf8.RuneError {
- count++
- if count > limit {
- return s[:i]
- }
- continue
- }
-
- _, size := utf8.DecodeRuneInString(s[i:])
- if size == 1 {
- // Invalid encoding.
- b.Grow(len(s) - 1)
- _, _ = b.WriteString(s[:i])
- s = s[i:]
- break
- }
- }
-
- // Fast-path, no invalid input.
- if b.Cap() == 0 {
- return s
- }
-
- // Truncate while validating UTF-8.
- for i := 0; i < len(s) && count < limit; {
- c := s[i]
- if c < utf8.RuneSelf {
- // Optimization for single byte runes (common case).
- _ = b.WriteByte(c)
- i++
- count++
- continue
- }
-
- _, size := utf8.DecodeRuneInString(s[i:])
- if size == 1 {
- // We checked for all 1-byte runes above, this is a RuneError.
- i++
- continue
- }
-
- _, _ = b.WriteString(s[i : i+size])
- i += size
- count++
}
-
- return b.String()
}
// End ends the span. This method does nothing if the span is already ended or
// is not being recorded.
//
-// The only SpanEndOption currently supported are [trace.WithTimestamp], and
-// [trace.WithStackTrace].
-//
-// If this method is called while panicking an error event is added to the
-// Span before ending it and the panic is continued.
+// The only supported SpanEndOptions are [trace.WithTimestamp] and [trace.WithStackTrace].
+// If this method is called while panicking and panic recording is not disabled
+// on the TracerProvider, an error event is added to the Span before ending it
+// and the panic is continued.
func (s *recordingSpan) End(options ...trace.SpanEndOption) {
// Do not start by checking if the span is being recorded which requires
// acquiring a lock. Make a minimal check that the span is not nil.
@@ -560,23 +384,25 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) {
}
config := trace.NewSpanEndConfig(options...)
- if recovered := recover(); recovered != nil {
- // Record but don't stop the panic.
- defer panic(recovered)
- opts := []trace.EventOption{
- trace.WithAttributes(
- semconv.ExceptionType(typeStr(recovered)),
- semconv.ExceptionMessage(fmt.Sprint(recovered)),
- ),
- }
+ if !s.tracer.provider.panicRecordingDisabled {
+ if recovered := recover(); recovered != nil {
+ // Record but don't stop the panic.
+ defer panic(recovered)
+ opts := []trace.EventOption{
+ trace.WithAttributes(
+ semconv.ExceptionType(typeStr(recovered)),
+ semconv.ExceptionMessage(fmt.Sprint(recovered)),
+ ),
+ }
- if config.StackTrace() {
- opts = append(opts, trace.WithAttributes(
- semconv.ExceptionStacktrace(recordStackTrace()),
- ))
- }
+ if config.StackTrace() {
+ opts = append(opts, trace.WithAttributes(
+ semconv.ExceptionStacktrace(recordStackTrace()),
+ ))
+ }
- s.addEvent(semconv.ExceptionEventName, opts...)
+ s.addEvent(semconv.ExceptionEventName, opts...)
+ }
}
if s.executionTracerTaskEnd != nil {
@@ -690,7 +516,8 @@ func (s *recordingSpan) AddEvent(name string, o ...trace.EventOption) {
// This method assumes s.mu.Lock is held by the caller.
func (s *recordingSpan) addEvent(name string, o ...trace.EventOption) {
c := trace.NewEventConfig(o...)
- e := Event{Name: name, Attributes: c.Attributes(), Time: c.Timestamp()}
+ attrs, _ := attrnorm.KeyValues(c.Attributes())
+ e := Event{Name: name, Attributes: attrs, Time: c.Timestamp()}
// Discard attributes over limit.
limit := s.tracer.provider.spanLimits.AttributePerEventCountLimit
@@ -863,7 +690,8 @@ func (s *recordingSpan) AddLink(link trace.Link) {
return
}
- l := Link{SpanContext: link.SpanContext, Attributes: link.Attributes}
+ attrs, _ := attrnorm.KeyValues(link.Attributes)
+ l := Link{SpanContext: link.SpanContext, Attributes: attrs}
// Discard attributes over limit.
limit := s.tracer.provider.spanLimits.AttributePerLinkCountLimit
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
index 6bdda3d94a4b..fad839a24e4b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import "context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
index 348ee0e808b3..5ee15a884858 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import "go.opentelemetry.io/otel/sdk/trace/internal/env"
@@ -35,10 +35,10 @@ const (
type SpanLimits struct {
// AttributeValueLengthLimit is the maximum allowed attribute value length.
//
- // This limit only applies to string, string slice, byte slice, and slice attribute
- // values. Any string and byte slice longer than this value will be truncated to this
- // length. For slice attribute values, the limit is applied to each string and byte slice
- // element recursively.
+ // This limit only applies to string, string slice, byte slice, slice, and
+ // map attribute values. Any string and byte slice longer than this value
+ // will be truncated to this length. For slice and map attribute values,
+ // the limit is applied recursively to contained values.
//
// Setting this to a negative value means no limit is applied.
AttributeValueLengthLimit int
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
index af7f9177fc52..ffd093a2f7ea 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
index e1d08fd4d8d9..be576ffe088a 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/sdk/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/exporter.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/exporter.go
index e12fa67e63bf..4aa2d562fdd9 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/exporter.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/exporter.go
@@ -4,7 +4,7 @@
// Package tracetest is a testing helper package for the SDK. User can
// configure no-op or in-memory exporters to verify different SDK behaviors or
// custom instrumentation.
-package tracetest // import "go.opentelemetry.io/otel/sdk/trace/tracetest"
+package tracetest
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/recorder.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/recorder.go
index ca63038f34e0..11e3d5b3f614 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/recorder.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/recorder.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package tracetest // import "go.opentelemetry.io/otel/sdk/trace/tracetest"
+package tracetest
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go
index 12b384b08846..6ee1b3f98540 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracetest/span.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package tracetest // import "go.opentelemetry.io/otel/sdk/trace/tracetest"
+package tracetest
import (
"time"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go
index 218dce1f562a..1619fb3fa13b 100644
--- a/vendor/go.opentelemetry.io/otel/sdk/version.go
+++ b/vendor/go.opentelemetry.io/otel/sdk/version.go
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
// Package sdk provides the OpenTelemetry default SDK for Go.
-package sdk // import "go.opentelemetry.io/otel/sdk"
+package sdk
// Version is the current release version of the OpenTelemetry SDK in use.
func Version() string {
- return "1.44.0"
+ return "1.45.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/metricpool/pool.go b/vendor/go.opentelemetry.io/otel/semconv/internal/metricpool/pool.go
new file mode 100644
index 000000000000..c5f5ad46eafe
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/internal/metricpool/pool.go
@@ -0,0 +1,48 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package metricpool provides shared pools for semantic convention metric
+// measurement options.
+package metricpool
+
+import (
+ "sync"
+
+ "go.opentelemetry.io/otel/metric"
+)
+
+var (
+ addOptionsPool = sync.Pool{New: func() any {
+ o := make([]metric.AddOption, 0, 1)
+ return &o
+ }}
+ recOptionsPool = sync.Pool{New: func() any {
+ o := make([]metric.RecordOption, 0, 1)
+ return &o
+ }}
+)
+
+// AddOptions returns a pooled AddOption slice.
+func AddOptions() *[]metric.AddOption {
+ return addOptionsPool.Get().(*[]metric.AddOption)
+}
+
+// PutAddOptions clears, resets, and returns o to the shared AddOption pool.
+func PutAddOptions(o *[]metric.AddOption) {
+ clear(*o)
+ *o = (*o)[:0]
+ addOptionsPool.Put(o)
+}
+
+// RecordOptions returns a pooled RecordOption slice.
+func RecordOptions() *[]metric.RecordOption {
+ return recOptionsPool.Get().(*[]metric.RecordOption)
+}
+
+// PutRecordOptions clears, resets, and returns o to the shared RecordOption
+// pool.
+func PutRecordOptions(o *[]metric.RecordOption) {
+ clear(*o)
+ *o = (*o)[:0]
+ recOptionsPool.Put(o)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
index 2fcab24352ef..d20ad49ef8fd 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go
@@ -3,7 +3,7 @@
// Code generated from semantic convention specification. DO NOT EDIT.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"
+package semconv
import "go.opentelemetry.io/otel/attribute"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go
index 11101032107d..b67c64b96170 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go
@@ -6,4 +6,4 @@
// OpenTelemetry semantic conventions are agreed standardized naming
// patterns for OpenTelemetry things. This package represents the v1.37.0
// version of the OpenTelemetry semantic conventions.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"
+package semconv
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go
index 267979c051d8..719241429b7e 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"
+package semconv
import (
"reflect"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go
index e67469a4f695..3fe84aae0a93 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"
+package semconv
const (
// ExceptionEventName is the name of the Span event representing an exception.
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go
index f8a0b7044183..0009b185b9a6 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0"
+package semconv
// SchemaURL is the schema URL that matches the version of the semantic conventions
// that this package defines. Semconv packages starting from v1.4.0 must declare
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
index 7cee086802af..1c6fde30d87f 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/attribute_group.go
@@ -3,7 +3,7 @@
// Code generated from semantic convention specification. DO NOT EDIT.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
+package semconv
import "go.opentelemetry.io/otel/attribute"
@@ -1493,9 +1493,11 @@ func AWSExtendedRequestID(val string) attribute.KeyValue {
// AWSKinesisStreamName returns an attribute KeyValue conforming to the
// "aws.kinesis.stream_name" semantic conventions. It represents the name of the
// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`
-// parameter of the Kinesis [describe-stream] operation.
+//
+// parameter of the Kinesis [describe-stream] operation.
//
// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+//
// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
func AWSKinesisStreamName(val string) attribute.KeyValue {
return AWSKinesisStreamNameKey.String(val)
@@ -1505,7 +1507,8 @@ func AWSKinesisStreamName(val string) attribute.KeyValue {
// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
// ARN as provided on the `Context` passed to the function (
// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`
-// applicable).
+//
+// applicable).
func AWSLambdaInvokedARN(val string) attribute.KeyValue {
return AWSLambdaInvokedARNKey.String(val)
}
@@ -2686,7 +2689,8 @@ func CloudRegion(val string) attribute.KeyValue {
// "cloud.resource_id" semantic conventions. It represents the cloud
// provider-specific native identifier of the monitored cloud resource (e.g. an
// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]
-// on GCP).
+//
+// on GCP).
//
// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
@@ -17282,4 +17286,4 @@ func ZOSSmfID(val string) attribute.KeyValue {
// to which the z/OS system belongs too.
func ZOSSysplexName(val string) attribute.KeyValue {
return ZOSSysplexNameKey.String(val)
-}
\ No newline at end of file
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
index a45d424d8847..846bd473be04 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go
@@ -8,4 +8,4 @@
// OpenTelemetry semantic conventions are agreed standardized naming
// patterns for OpenTelemetry things. This package represents the v1.41.0
// version of the OpenTelemetry semantic conventions.
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
+package semconv
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
index 0b13f0de8e67..5d8eff2229ab 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go
@@ -3,7 +3,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
+package semconv
import (
"errors"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
index 5f0151affaba..6c9b05adbcce 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go
@@ -3,7 +3,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
+package semconv
const (
// ExceptionEventName is the name of the Span event representing an exception.
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
index d50e198493a4..367b58760206 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/otelconv/metric.go
@@ -9,16 +9,11 @@ package otelconv
import (
"context"
- "sync"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
-)
-
-var (
- addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}
- recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}
+ "go.opentelemetry.io/otel/semconv/internal/metricpool"
)
// ErrorTypeAttr is an attribute conforming to the error.type semantic
@@ -205,12 +200,8 @@ func (m SDKExporterLogExported) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -240,12 +231,8 @@ func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attr
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -457,12 +444,8 @@ func (m SDKExporterLogInflight) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -487,12 +470,8 @@ func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attr
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -696,12 +675,8 @@ func (m SDKExporterMetricDataPointExported) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -731,12 +706,8 @@ func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -950,12 +921,8 @@ func (m SDKExporterMetricDataPointInflight) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -980,12 +947,8 @@ func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -1191,12 +1154,8 @@ func (m SDKExporterOperationDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -1228,12 +1187,8 @@ func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
@@ -1370,12 +1325,8 @@ func (m SDKExporterSpanExported) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -1405,12 +1356,8 @@ func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set att
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -1622,12 +1569,8 @@ func (m SDKExporterSpanInflight) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -1652,12 +1595,8 @@ func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set att
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -1846,12 +1785,8 @@ func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.K
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributes(attrs...))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -1867,12 +1802,8 @@ func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -2018,12 +1949,8 @@ func (m SDKMetricReaderCollectionDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -2051,12 +1978,8 @@ func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val fl
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
@@ -2164,12 +2087,8 @@ func (m SDKProcessorLogProcessed) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -2197,12 +2116,8 @@ func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set at
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -2541,12 +2456,8 @@ func (m SDKProcessorSpanProcessed) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -2574,12 +2485,8 @@ func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set a
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
@@ -2912,12 +2819,8 @@ func (m SDKSpanLive) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -2939,12 +2842,8 @@ func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set)
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -3100,12 +2999,8 @@ func (m SDKSpanStarted) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -3130,12 +3025,8 @@ func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Se
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Counter.Add(ctx, incr, *o...)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
index 24948a48f837..54f7cfa259de 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go
@@ -3,7 +3,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package semconv // import "go.opentelemetry.io/otel/semconv/v1.41.0"
+package semconv
// SchemaURL is the schema URL that matches the version of the semantic conventions
// that this package defines. Semconv packages starting from v1.4.0 must declare
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/MIGRATION.md
new file mode 100644
index 000000000000..54d8e7d70fa4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/MIGRATION.md
@@ -0,0 +1,4 @@
+
+# Migration from v1.42.0 to v1.43.0
+
+The `go.opentelemetry.io/otel/semconv/v1.43.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.42.0`.
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/README.md
new file mode 100644
index 000000000000..20e64d79537d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/README.md
@@ -0,0 +1,3 @@
+# Semconv v1.43.0
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.43.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/attribute_group.go
new file mode 100644
index 000000000000..770388dfc6e3
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/attribute_group.go
@@ -0,0 +1,16054 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv
+
+import "go.opentelemetry.io/otel/attribute"
+
+// Namespace: android
+const (
+ // AndroidAppStateKey is the attribute Key conforming to the "android.app.state"
+ // semantic conventions. It represents the this attribute represents the state
+ // of the application.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "created"
+ // Note: The Android lifecycle states are defined in
+ // [Activity lifecycle callbacks], and from which the `OS identifiers` are
+ // derived.
+ //
+ // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lifecycle-callbacks
+ AndroidAppStateKey = attribute.Key("android.app.state")
+
+ // AndroidOSAPILevelKey is the attribute Key conforming to the
+ // "android.os.api_level" semantic conventions. It represents the uniquely
+ // identifies the framework API revision offered by a version (`os.version`) of
+ // the android operating system. More information can be found in the
+ // [Android API levels documentation].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "33", "32"
+ //
+ // [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
+ AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
+)
+
+// AndroidOSAPILevel returns an attribute KeyValue conforming to the
+// "android.os.api_level" semantic conventions. It represents the uniquely
+// identifies the framework API revision offered by a version (`os.version`) of
+// the android operating system. More information can be found in the
+// [Android API levels documentation].
+//
+// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels
+func AndroidOSAPILevel(val string) attribute.KeyValue {
+ return AndroidOSAPILevelKey.String(val)
+}
+
+// Enum values for android.app.state
+var (
+ // Any time before Activity.onResume() or, if the app has no Activity,
+ // Context.startService() has been called in the app for the first time.
+ //
+ // Stability: development
+ AndroidAppStateCreated = AndroidAppStateKey.String("created")
+ // Any time after Activity.onPause() or, if the app has no Activity,
+ // Context.stopService() has been called when the app was in the foreground
+ // state.
+ //
+ // Stability: development
+ AndroidAppStateBackground = AndroidAppStateKey.String("background")
+ // Any time after Activity.onResume() or, if the app has no Activity,
+ // Context.startService() has been called when the app was in either the created
+ // or background states.
+ //
+ // Stability: development
+ AndroidAppStateForeground = AndroidAppStateKey.String("foreground")
+)
+
+// Namespace: app
+const (
+ // AppBuildIDKey is the attribute Key conforming to the "app.build_id" semantic
+ // conventions. It represents the unique identifier for a particular build or
+ // compilation of the application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "6cff0a7e-cefc-4668-96f5-1273d8b334d0",
+ // "9f2b833506aa6973a92fde9733e6271f", "my-app-1.0.0-code-123"
+ AppBuildIDKey = attribute.Key("app.build_id")
+
+ // AppCrashIDKey is the attribute Key conforming to the "app.crash.id" semantic
+ // conventions. It represents a unique identifier representing an instance of an
+ // end-user facing app crash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "083d3d2d-9a0e-47f8-be3d-bc3c5538ba38"
+ // Note: Its value MAY be meaningful and be used as a reference for telemetry
+ // and metadata recorded by
+ // the same instrumentation (e.g. it is an ID generated by an external source
+ // that captured the crash).
+ // It MAY come from a source external to the instrumentation such that it can be
+ // used to look up additional
+ // data from other sources as well as facilitate deduplication.
+ AppCrashIDKey = attribute.Key("app.crash.id")
+
+ // AppInstallationIDKey is the attribute Key conforming to the
+ // "app.installation.id" semantic conventions. It represents a unique identifier
+ // representing the installation of an application on a specific device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092"
+ // Note: Its value SHOULD persist across launches of the same application
+ // installation, including through application upgrades.
+ // It SHOULD change if the application is uninstalled or if all applications of
+ // the vendor are uninstalled.
+ // Additionally, users might be able to reset this value (e.g. by clearing
+ // application data).
+ // If an app is installed multiple times on the same device (e.g. in different
+ // accounts on Android), each `app.installation.id` SHOULD have a different
+ // value.
+ // If multiple OpenTelemetry SDKs are used within the same application, they
+ // SHOULD use the same value for `app.installation.id`.
+ // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the
+ // `app.installation.id`.
+ //
+ // For iOS, this value SHOULD be equal to the [vendor identifier].
+ //
+ // For Android, examples of `app.installation.id` implementations include:
+ //
+ // - [Firebase Installation ID].
+ // - A globally unique UUID which is persisted across sessions in your
+ // application.
+ // - [App set ID].
+ // - [`Settings.getString(Settings.Secure.ANDROID_ID)`].
+ //
+ // More information about Android identifier best practices can be found in the
+ // [Android user data IDs guide].
+ //
+ // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor
+ // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations
+ // [App set ID]: https://developer.android.com/identity/app-set-id
+ // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
+ // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids
+ AppInstallationIDKey = attribute.Key("app.installation.id")
+
+ // AppJankFrameCountKey is the attribute Key conforming to the
+ // "app.jank.frame_count" semantic conventions. It represents a number of frame
+ // renders that experienced jank.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 9, 42
+ // Note: Depending on platform limitations, the value provided MAY be
+ // approximation.
+ AppJankFrameCountKey = attribute.Key("app.jank.frame_count")
+
+ // AppJankPeriodKey is the attribute Key conforming to the "app.jank.period"
+ // semantic conventions. It represents the time period, in seconds, for which
+ // this jank is being reported.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0, 5.0, 10.24
+ AppJankPeriodKey = attribute.Key("app.jank.period")
+
+ // AppJankThresholdKey is the attribute Key conforming to the
+ // "app.jank.threshold" semantic conventions. It represents the minimum
+ // rendering threshold for this jank, in seconds.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0.016, 0.7, 1.024
+ AppJankThresholdKey = attribute.Key("app.jank.threshold")
+
+ // AppScreenCoordinateXKey is the attribute Key conforming to the
+ // "app.screen.coordinate.x" semantic conventions. It represents the x
+ // (horizontal) coordinate of a screen coordinate, in screen pixels.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 131
+ AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x")
+
+ // AppScreenCoordinateYKey is the attribute Key conforming to the
+ // "app.screen.coordinate.y" semantic conventions. It represents the y
+ // (vertical) component of a screen coordinate, in screen pixels.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 12, 99
+ AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y")
+
+ // AppScreenIDKey is the attribute Key conforming to the "app.screen.id"
+ // semantic conventions. It represents an identifier that uniquely
+ // differentiates this screen from other screens in the same application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3",
+ // "com.example.app.MainActivity", "com.example.shop.ProductDetailFragment",
+ // "MyApp.ProfileView", "MyApp.ProfileViewController"
+ // Note: A screen represents only the part of the device display drawn by the
+ // app. It typically contains multiple widgets or UI components and is larger in
+ // scope than individual widgets. Multiple screens can coexist on the same
+ // display simultaneously (e.g., split view on tablets).
+ AppScreenIDKey = attribute.Key("app.screen.id")
+
+ // AppScreenNameKey is the attribute Key conforming to the "app.screen.name"
+ // semantic conventions. It represents the name of an application screen.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MainActivity", "ProductDetailFragment", "ProfileView",
+ // "ProfileViewController"
+ // Note: A screen represents only the part of the device display drawn by the
+ // app. It typically contains multiple widgets or UI components and is larger in
+ // scope than individual widgets. Multiple screens can coexist on the same
+ // display simultaneously (e.g., split view on tablets).
+ AppScreenNameKey = attribute.Key("app.screen.name")
+
+ // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id"
+ // semantic conventions. It represents an identifier that uniquely
+ // differentiates this widget from other widgets in the same application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829"
+ // Note: A widget is an application component, typically an on-screen visual GUI
+ // element.
+ AppWidgetIDKey = attribute.Key("app.widget.id")
+
+ // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name"
+ // semantic conventions. It represents the name of an application widget.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "submit", "attack", "Clear Cart"
+ // Note: A widget is an application component, typically an on-screen visual GUI
+ // element.
+ AppWidgetNameKey = attribute.Key("app.widget.name")
+)
+
+// AppBuildID returns an attribute KeyValue conforming to the "app.build_id"
+// semantic conventions. It represents the unique identifier for a particular
+// build or compilation of the application.
+func AppBuildID(val string) attribute.KeyValue {
+ return AppBuildIDKey.String(val)
+}
+
+// AppCrashID returns an attribute KeyValue conforming to the "app.crash.id"
+// semantic conventions. It represents a unique identifier representing an
+// instance of an end-user facing app crash.
+func AppCrashID(val string) attribute.KeyValue {
+ return AppCrashIDKey.String(val)
+}
+
+// AppInstallationID returns an attribute KeyValue conforming to the
+// "app.installation.id" semantic conventions. It represents a unique identifier
+// representing the installation of an application on a specific device.
+func AppInstallationID(val string) attribute.KeyValue {
+ return AppInstallationIDKey.String(val)
+}
+
+// AppJankFrameCount returns an attribute KeyValue conforming to the
+// "app.jank.frame_count" semantic conventions. It represents a number of frame
+// renders that experienced jank.
+func AppJankFrameCount(val int) attribute.KeyValue {
+ return AppJankFrameCountKey.Int(val)
+}
+
+// AppJankPeriod returns an attribute KeyValue conforming to the
+// "app.jank.period" semantic conventions. It represents the time period, in
+// seconds, for which this jank is being reported.
+func AppJankPeriod(val float64) attribute.KeyValue {
+ return AppJankPeriodKey.Float64(val)
+}
+
+// AppJankThreshold returns an attribute KeyValue conforming to the
+// "app.jank.threshold" semantic conventions. It represents the minimum rendering
+// threshold for this jank, in seconds.
+func AppJankThreshold(val float64) attribute.KeyValue {
+ return AppJankThresholdKey.Float64(val)
+}
+
+// AppScreenCoordinateX returns an attribute KeyValue conforming to the
+// "app.screen.coordinate.x" semantic conventions. It represents the x
+// (horizontal) coordinate of a screen coordinate, in screen pixels.
+func AppScreenCoordinateX(val int) attribute.KeyValue {
+ return AppScreenCoordinateXKey.Int(val)
+}
+
+// AppScreenCoordinateY returns an attribute KeyValue conforming to the
+// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical)
+// component of a screen coordinate, in screen pixels.
+func AppScreenCoordinateY(val int) attribute.KeyValue {
+ return AppScreenCoordinateYKey.Int(val)
+}
+
+// AppScreenID returns an attribute KeyValue conforming to the "app.screen.id"
+// semantic conventions. It represents an identifier that uniquely differentiates
+// this screen from other screens in the same application.
+func AppScreenID(val string) attribute.KeyValue {
+ return AppScreenIDKey.String(val)
+}
+
+// AppScreenName returns an attribute KeyValue conforming to the
+// "app.screen.name" semantic conventions. It represents the name of an
+// application screen.
+func AppScreenName(val string) attribute.KeyValue {
+ return AppScreenNameKey.String(val)
+}
+
+// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id"
+// semantic conventions. It represents an identifier that uniquely differentiates
+// this widget from other widgets in the same application.
+func AppWidgetID(val string) attribute.KeyValue {
+ return AppWidgetIDKey.String(val)
+}
+
+// AppWidgetName returns an attribute KeyValue conforming to the
+// "app.widget.name" semantic conventions. It represents the name of an
+// application widget.
+func AppWidgetName(val string) attribute.KeyValue {
+ return AppWidgetNameKey.String(val)
+}
+
+// Namespace: artifact
+const (
+ // ArtifactAttestationFilenameKey is the attribute Key conforming to the
+ // "artifact.attestation.filename" semantic conventions. It represents the
+ // provenance filename of the built attestation which directly relates to the
+ // build artifact filename. This filename SHOULD accompany the artifact at
+ // publish time. See the [SLSA Relationship] specification for more information.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "golang-binary-amd64-v0.1.0.attestation",
+ // "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation",
+ // "file-name-package.tar.gz.intoto.json1"
+ //
+ // [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
+ ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename")
+
+ // ArtifactAttestationHashKey is the attribute Key conforming to the
+ // "artifact.attestation.hash" semantic conventions. It represents the full
+ // [hash value (see glossary)], of the built attestation. Some envelopes in the
+ // [software attestation space] also refer to this as the **digest**.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408"
+ //
+ // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
+ ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash")
+
+ // ArtifactAttestationIDKey is the attribute Key conforming to the
+ // "artifact.attestation.id" semantic conventions. It represents the id of the
+ // build [software attestation].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123"
+ //
+ // [software attestation]: https://slsa.dev/attestation-model
+ ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id")
+
+ // ArtifactFilenameKey is the attribute Key conforming to the
+ // "artifact.filename" semantic conventions. It represents the human readable
+ // file name of the artifact, typically generated during build and release
+ // processes. Often includes the package name and version in the file name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0",
+ // "release-1.tar.gz", "file-name-package.tar.gz"
+ // Note: This file name can also act as the [Package Name]
+ // in cases where the package ecosystem maps accordingly.
+ // Additionally, the artifact [can be published]
+ // for others, but that is not a guarantee.
+ //
+ // [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model
+ // [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain
+ ArtifactFilenameKey = attribute.Key("artifact.filename")
+
+ // ArtifactHashKey is the attribute Key conforming to the "artifact.hash"
+ // semantic conventions. It represents the full [hash value (see glossary)],
+ // often found in checksum.txt on a release of the artifact and used to verify
+ // package integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9"
+ // Note: The specific algorithm used to create the cryptographic hash value is
+ // not defined. In situations where an artifact has multiple
+ // cryptographic hashes, it is up to the implementer to choose which
+ // hash value to set here; this should be the most secure hash algorithm
+ // that is suitable for the situation and consistent with the
+ // corresponding attestation. The implementer can then provide the other
+ // hash values through an additional set of attribute extensions as they
+ // deem necessary.
+ //
+ // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ ArtifactHashKey = attribute.Key("artifact.hash")
+
+ // ArtifactPurlKey is the attribute Key conforming to the "artifact.purl"
+ // semantic conventions. It represents the [Package URL] of the
+ // [package artifact] provides a standard way to identify and locate the
+ // packaged artifact.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pkg:github/package-url/purl-spec@1209109710924",
+ // "pkg:npm/foo@12.12.3"
+ //
+ // [Package URL]: https://github.com/package-url/purl-spec
+ // [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
+ ArtifactPurlKey = attribute.Key("artifact.purl")
+
+ // ArtifactVersionKey is the attribute Key conforming to the "artifact.version"
+ // semantic conventions. It represents the version of the artifact.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "v0.1.0", "1.2.1", "122691-build"
+ ArtifactVersionKey = attribute.Key("artifact.version")
+)
+
+// ArtifactAttestationFilename returns an attribute KeyValue conforming to the
+// "artifact.attestation.filename" semantic conventions. It represents the
+// provenance filename of the built attestation which directly relates to the
+// build artifact filename. This filename SHOULD accompany the artifact at
+// publish time. See the [SLSA Relationship] specification for more information.
+//
+// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations
+func ArtifactAttestationFilename(val string) attribute.KeyValue {
+ return ArtifactAttestationFilenameKey.String(val)
+}
+
+// ArtifactAttestationHash returns an attribute KeyValue conforming to the
+// "artifact.attestation.hash" semantic conventions. It represents the full
+// [hash value (see glossary)], of the built attestation. Some envelopes in the
+// [software attestation space] also refer to this as the **digest**.
+//
+// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec
+func ArtifactAttestationHash(val string) attribute.KeyValue {
+ return ArtifactAttestationHashKey.String(val)
+}
+
+// ArtifactAttestationID returns an attribute KeyValue conforming to the
+// "artifact.attestation.id" semantic conventions. It represents the id of the
+// build [software attestation].
+//
+// [software attestation]: https://slsa.dev/attestation-model
+func ArtifactAttestationID(val string) attribute.KeyValue {
+ return ArtifactAttestationIDKey.String(val)
+}
+
+// ArtifactFilename returns an attribute KeyValue conforming to the
+// "artifact.filename" semantic conventions. It represents the human readable
+// file name of the artifact, typically generated during build and release
+// processes. Often includes the package name and version in the file name.
+func ArtifactFilename(val string) attribute.KeyValue {
+ return ArtifactFilenameKey.String(val)
+}
+
+// ArtifactHash returns an attribute KeyValue conforming to the "artifact.hash"
+// semantic conventions. It represents the full [hash value (see glossary)],
+// often found in checksum.txt on a release of the artifact and used to verify
+// package integrity.
+//
+// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+func ArtifactHash(val string) attribute.KeyValue {
+ return ArtifactHashKey.String(val)
+}
+
+// ArtifactPurl returns an attribute KeyValue conforming to the "artifact.purl"
+// semantic conventions. It represents the [Package URL] of the
+// [package artifact] provides a standard way to identify and locate the packaged
+// artifact.
+//
+// [Package URL]: https://github.com/package-url/purl-spec
+// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model
+func ArtifactPurl(val string) attribute.KeyValue {
+ return ArtifactPurlKey.String(val)
+}
+
+// ArtifactVersion returns an attribute KeyValue conforming to the
+// "artifact.version" semantic conventions. It represents the version of the
+// artifact.
+func ArtifactVersion(val string) attribute.KeyValue {
+ return ArtifactVersionKey.String(val)
+}
+
+// Namespace: aws
+const (
+ // AWSBedrockGuardrailIDKey is the attribute Key conforming to the
+ // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
+ // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
+ // prevent unwanted behavior from model responses or user messages.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "sgi5gkybzqak"
+ //
+ // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
+ AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id")
+
+ // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the
+ // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the
+ // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a
+ // bank of information that can be queried by models to generate more relevant
+ // responses and augment prompts.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "XFWUPB9PAW"
+ //
+ // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
+ AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id")
+
+ // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the
+ // "aws.dynamodb.attribute_definitions" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `AttributeDefinitions` request
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "AttributeName": "string", "AttributeType": "string" }"
+ AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
+
+ // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
+ // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+ // value of the `AttributesToGet` request parameter.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "lives", "id"
+ AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
+
+ // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
+ // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+ // of the `ConsistentRead` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
+
+ // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `ConsumedCapacity` response field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" :
+ // { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits":
+ // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number,
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } },
+ // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number,
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName":
+ // "string", "WriteCapacityUnits": number }"
+ AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
+
+ // AWSDynamoDBCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.count" semantic conventions. It represents the value of the
+ // `Count` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
+
+ // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
+ // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
+ // value of the `ExclusiveStartTableName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Users", "CatsTable"
+ AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
+
+ // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to
+ // the "aws.dynamodb.global_secondary_index_updates" semantic conventions. It
+ // represents the JSON-serialized value of each item in the
+ // `GlobalSecondaryIndexUpdates` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "Create": { "IndexName": "string", "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
+ // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits":
+ // number } }"
+ AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
+
+ // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the
+ // "aws.dynamodb.global_secondary_indexes" semantic conventions. It represents
+ // the JSON-serialized value of each item of the `GlobalSecondaryIndexes`
+ // request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "IndexName": "string", "KeySchema": [ { "AttributeName":
+ // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
+ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }"
+ AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
+
+ // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
+ // "aws.dynamodb.index_name" semantic conventions. It represents the value of
+ // the `IndexName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "name_to_group"
+ AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
+
+ // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the
+ // "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
+ // the JSON-serialized value of the `ItemCollectionMetrics` response field.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob,
+ // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" :
+ // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S":
+ // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }"
+ AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
+
+ // AWSDynamoDBLimitKey is the attribute Key conforming to the
+ // "aws.dynamodb.limit" semantic conventions. It represents the value of the
+ // `Limit` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
+
+ // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the
+ // "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
+ // the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "{ "IndexArn": "string", "IndexName": "string", "IndexSizeBytes":
+ // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string",
+ // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ],
+ // "ProjectionType": "string" } }"
+ AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
+
+ // AWSDynamoDBProjectionKey is the attribute Key conforming to the
+ // "aws.dynamodb.projection" semantic conventions. It represents the value of
+ // the `ProjectionExpression` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Title", "Title, Price, Color", "Title, Description, RelatedItems,
+ // ProductReviews"
+ AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
+
+ // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.provisioned_read_capacity" semantic conventions. It represents
+ // the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
+
+ // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.provisioned_write_capacity" semantic conventions. It represents
+ // the value of the `ProvisionedThroughput.WriteCapacityUnits` request
+ // parameter.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
+
+ // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
+ // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+ // the `ScanIndexForward` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
+
+ // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
+ // the `ScannedCount` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 50
+ AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
+
+ // AWSDynamoDBSegmentKey is the attribute Key conforming to the
+ // "aws.dynamodb.segment" semantic conventions. It represents the value of the
+ // `Segment` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10
+ AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
+
+ // AWSDynamoDBSelectKey is the attribute Key conforming to the
+ // "aws.dynamodb.select" semantic conventions. It represents the value of the
+ // `Select` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ALL_ATTRIBUTES", "COUNT"
+ AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
+
+ // AWSDynamoDBTableCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_count" semantic conventions. It represents the number of
+ // items in the `TableNames` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 20
+ AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
+
+ // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
+ // the `RequestItems` object field.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Users", "Cats"
+ AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
+
+ // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
+ // "aws.dynamodb.total_segments" semantic conventions. It represents the value
+ // of the `TotalSegments` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 100
+ AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
+
+ // AWSECSClusterARNKey is the attribute Key conforming to the
+ // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+ // [ECS cluster].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
+ //
+ // [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
+ AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
+
+ // AWSECSContainerARNKey is the attribute Key conforming to the
+ // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+ // Resource Name (ARN) of an [ECS container instance].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9"
+ //
+ // [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
+ AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
+
+ // AWSECSLaunchtypeKey is the attribute Key conforming to the
+ // "aws.ecs.launchtype" semantic conventions. It represents the [launch type]
+ // for an ECS task.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html
+ AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
+
+ // AWSECSTaskARNKey is the attribute Key conforming to the "aws.ecs.task.arn"
+ // semantic conventions. It represents the ARN of a running [ECS task].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b",
+ // "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
+ //
+ // [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
+ AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
+
+ // AWSECSTaskFamilyKey is the attribute Key conforming to the
+ // "aws.ecs.task.family" semantic conventions. It represents the family name of
+ // the [ECS task definition] used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-family"
+ //
+ // [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
+ AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
+
+ // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
+ // semantic conventions. It represents the ID of a running ECS task. The ID MUST
+ // be extracted from `task.arn`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10838bed-421f-43ef-870a-f43feacbbb5b",
+ // "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd"
+ AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
+
+ // AWSECSTaskRevisionKey is the attribute Key conforming to the
+ // "aws.ecs.task.revision" semantic conventions. It represents the revision for
+ // the task definition used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "8", "26"
+ AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
+
+ // AWSEKSClusterARNKey is the attribute Key conforming to the
+ // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+ // cluster.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster"
+ AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
+
+ // AWSExtendedRequestIDKey is the attribute Key conforming to the
+ // "aws.extended_request_id" semantic conventions. It represents the AWS
+ // extended request ID as returned in the response header `x-amz-id-2`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ="
+ AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id")
+
+ // AWSKinesisStreamNameKey is the attribute Key conforming to the
+ // "aws.kinesis.stream_name" semantic conventions. It represents the name of the
+ // AWS Kinesis [stream] the request refers to. Corresponds to the
+ // `--stream-name` parameter of the Kinesis [describe-stream] operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "some-stream-name"
+ //
+ // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+ // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
+ AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name")
+
+ // AWSLambdaInvokedARNKey is the attribute Key conforming to the
+ // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
+ // ARN as provided on the `Context` passed to the function (
+ // `Lambda-Runtime-Invoked-Function-Arn` header on the
+ // `/runtime/invocation/next` applicable).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:lambda:us-east-1:123456:function:myfunction:myalias"
+ // Note: This may be different from `cloud.resource_id` if an alias is involved.
+ AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
+
+ // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the
+ // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
+ // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
+ // function. It's contents are read by Lambda and used to trigger a function.
+ // This isn't available in the lambda execution context or the lambda runtime
+ // environment. This is going to be populated by the AWS SDK for each language
+ // when that UUID is present. Some of these operations are
+ // Create/Delete/Get/List/Update EventSourceMapping.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7"
+ //
+ // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
+ AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id")
+
+ // AWSLogGroupARNsKey is the attribute Key conforming to the
+ // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+ // Name(s) (ARN) of the AWS log group(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*"
+ // Note: See the [log group ARN format documentation].
+ //
+ // [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
+ AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
+
+ // AWSLogGroupNamesKey is the attribute Key conforming to the
+ // "aws.log.group.names" semantic conventions. It represents the name(s) of the
+ // AWS log group(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/aws/lambda/my-function", "opentelemetry-service"
+ // Note: Multiple log groups must be supported for cases like multi-container
+ // applications, where a single application has sidecar containers, and each
+ // write to their own log group.
+ AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
+
+ // AWSLogStreamARNsKey is the attribute Key conforming to the
+ // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+ // AWS log stream(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
+ // Note: See the [log stream ARN format documentation]. One log group can
+ // contain several log streams, so these ARNs necessarily identify both a log
+ // group and a log stream.
+ //
+ // [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format
+ AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
+
+ // AWSLogStreamNamesKey is the attribute Key conforming to the
+ // "aws.log.stream.names" semantic conventions. It represents the name(s) of the
+ // AWS log stream(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "logs/main/10838bed-421f-43ef-870a-f43feacbbb5b"
+ AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
+
+ // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
+ // semantic conventions. It represents the AWS request ID as returned in the
+ // response headers `x-amzn-requestid`, `x-amzn-request-id` or
+ // `x-amz-request-id`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ"
+ AWSRequestIDKey = attribute.Key("aws.request_id")
+
+ // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
+ // semantic conventions. It represents the S3 bucket name the request refers to.
+ // Corresponds to the `--bucket` parameter of the [S3 API] operations.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "some-bucket-name"
+ // Note: The `bucket` attribute is applicable to all S3 operations that
+ // reference a bucket, i.e. that require the bucket name as a mandatory
+ // parameter.
+ // This applies to almost all S3 operations except `list-buckets`.
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ AWSS3BucketKey = attribute.Key("aws.s3.bucket")
+
+ // AWSS3CopySourceKey is the attribute Key conforming to the
+ // "aws.s3.copy_source" semantic conventions. It represents the source object
+ // (in the form `bucket`/`key`) for the copy operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "someFile.yml"
+ // Note: The `copy_source` attribute applies to S3 copy operations and
+ // corresponds to the `--copy-source` parameter
+ // of the [copy-object operation within the S3 API].
+ // This applies in particular to the following operations:
+ //
+ // - [copy-object]
+ // - [upload-part-copy]
+ //
+ //
+ // [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
+
+ // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
+ // semantic conventions. It represents the delete request container that
+ // specifies the objects to be deleted.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean"
+ // Note: The `delete` attribute is only applicable to the [delete-object]
+ // operation.
+ // The `delete` attribute corresponds to the `--delete` parameter of the
+ // [delete-objects operation within the S3 API].
+ //
+ // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
+ // [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html
+ AWSS3DeleteKey = attribute.Key("aws.s3.delete")
+
+ // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
+ // conventions. It represents the S3 object key the request refers to.
+ // Corresponds to the `--key` parameter of the [S3 API] operations.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "someFile.yml"
+ // Note: The `key` attribute is applicable to all object-related S3 operations,
+ // i.e. that require the object key as a mandatory parameter.
+ // This applies in particular to the following operations:
+ //
+ // - [copy-object]
+ // - [delete-object]
+ // - [get-object]
+ // - [head-object]
+ // - [put-object]
+ // - [restore-object]
+ // - [select-object-content]
+ // - [abort-multipart-upload]
+ // - [complete-multipart-upload]
+ // - [create-multipart-upload]
+ // - [list-parts]
+ // - [upload-part]
+ // - [upload-part-copy]
+ //
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html
+ // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html
+ // [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html
+ // [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html
+ // [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html
+ // [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html
+ // [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html
+ // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
+ // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
+ // [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html
+ // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3KeyKey = attribute.Key("aws.s3.key")
+
+ // AWSS3PartNumberKey is the attribute Key conforming to the
+ // "aws.s3.part_number" semantic conventions. It represents the part number of
+ // the part being uploaded in a multipart-upload operation. This is a positive
+ // integer between 1 and 10,000.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3456
+ // Note: The `part_number` attribute is only applicable to the [upload-part]
+ // and [upload-part-copy] operations.
+ // The `part_number` attribute corresponds to the `--part-number` parameter of
+ // the
+ // [upload-part operation within the S3 API].
+ //
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ // [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
+
+ // AWSS3UploadIDKey is the attribute Key conforming to the "aws.s3.upload_id"
+ // semantic conventions. It represents the upload ID that identifies the
+ // multipart upload.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ"
+ // Note: The `upload_id` attribute applies to S3 multipart-upload operations and
+ // corresponds to the `--upload-id` parameter
+ // of the [S3 API] multipart operations.
+ // This applies in particular to the following operations:
+ //
+ // - [abort-multipart-upload]
+ // - [complete-multipart-upload]
+ // - [list-parts]
+ // - [upload-part]
+ // - [upload-part-copy]
+ //
+ //
+ // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+ // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html
+ // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html
+ // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html
+ // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html
+ // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html
+ AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
+
+ // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the
+ // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN
+ // of the Secret stored in the Secrets Manager.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters"
+ AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn")
+
+ // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn"
+ // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon
+ // SNS [topic] is a logical access point that acts as a communication channel.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE"
+ //
+ // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
+ AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn")
+
+ // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url"
+ // semantic conventions. It represents the URL of the AWS SQS Queue. It's a
+ // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is
+ // used to access the queue and perform actions on it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue"
+ AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url")
+
+ // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the
+ // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
+ // of the AWS Step Functions Activity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting"
+ AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn")
+
+ // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the
+ // "aws.step_functions.state_machine.arn" semantic conventions. It represents
+ // the ARN of the AWS Step Functions State Machine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1"
+ AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn")
+)
+
+// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the
+// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique
+// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and
+// prevent unwanted behavior from model responses or user messages.
+//
+// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
+func AWSBedrockGuardrailID(val string) attribute.KeyValue {
+ return AWSBedrockGuardrailIDKey.String(val)
+}
+
+// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the
+// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique
+// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of
+// information that can be queried by models to generate more relevant responses
+// and augment prompts.
+//
+// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html
+func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue {
+ return AWSBedrockKnowledgeBaseIDKey.String(val)
+}
+
+// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to
+// the "aws.dynamodb.attribute_definitions" semantic conventions. It represents
+// the JSON-serialized value of each item in the `AttributeDefinitions` request
+// field.
+func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
+}
+
+// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the
+// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the value
+// of the `AttributesToGet` request parameter.
+func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributesToGetKey.StringSlice(val)
+}
+
+// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+// of the `ConsistentRead` request parameter.
+func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
+ return AWSDynamoDBConsistentReadKey.Bool(val)
+}
+
+// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+// JSON-serialized value of each item in the `ConsumedCapacity` response field.
+func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
+ return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
+}
+
+// AWSDynamoDBCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.count" semantic conventions. It represents the value of the
+// `Count` response parameter.
+func AWSDynamoDBCount(val int) attribute.KeyValue {
+ return AWSDynamoDBCountKey.Int(val)
+}
+
+// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the
+// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the
+// value of the `ExclusiveStartTableName` request parameter.
+func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
+ return AWSDynamoDBExclusiveStartTableKey.String(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+// conventions. It represents the JSON-serialized value of each item in the
+// `GlobalSecondaryIndexUpdates` request field.
+func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to
+// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
+// represents the JSON-serialized value of each item of the
+// `GlobalSecondaryIndexes` request field.
+func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
+// "aws.dynamodb.index_name" semantic conventions. It represents the value of the
+// `IndexName` request parameter.
+func AWSDynamoDBIndexName(val string) attribute.KeyValue {
+ return AWSDynamoDBIndexNameKey.String(val)
+}
+
+// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to
+// the "aws.dynamodb.item_collection_metrics" semantic conventions. It represents
+// the JSON-serialized value of the `ItemCollectionMetrics` response field.
+func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
+ return AWSDynamoDBItemCollectionMetricsKey.String(val)
+}
+
+// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
+// "aws.dynamodb.limit" semantic conventions. It represents the value of the
+// `Limit` request parameter.
+func AWSDynamoDBLimit(val int) attribute.KeyValue {
+ return AWSDynamoDBLimitKey.Int(val)
+}
+
+// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to
+// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents
+// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request
+// field.
+func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
+// "aws.dynamodb.projection" semantic conventions. It represents the value of the
+// `ProjectionExpression` request parameter.
+func AWSDynamoDBProjection(val string) attribute.KeyValue {
+ return AWSDynamoDBProjectionKey.String(val)
+}
+
+// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to
+// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
+// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request
+// parameter.
+func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming
+// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. It
+// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request
+// parameter.
+func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+// the `ScanIndexForward` request parameter.
+func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
+ return AWSDynamoDBScanForwardKey.Bool(val)
+}
+
+// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scanned_count" semantic conventions. It represents the value of
+// the `ScannedCount` response parameter.
+func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
+ return AWSDynamoDBScannedCountKey.Int(val)
+}
+
+// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
+// "aws.dynamodb.segment" semantic conventions. It represents the value of the
+// `Segment` request parameter.
+func AWSDynamoDBSegment(val int) attribute.KeyValue {
+ return AWSDynamoDBSegmentKey.Int(val)
+}
+
+// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
+// "aws.dynamodb.select" semantic conventions. It represents the value of the
+// `Select` request parameter.
+func AWSDynamoDBSelect(val string) attribute.KeyValue {
+ return AWSDynamoDBSelectKey.String(val)
+}
+
+// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_count" semantic conventions. It represents the number of
+// items in the `TableNames` response parameter.
+func AWSDynamoDBTableCount(val int) attribute.KeyValue {
+ return AWSDynamoDBTableCountKey.Int(val)
+}
+
+// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_names" semantic conventions. It represents the keys in the
+// `RequestItems` object field.
+func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
+ return AWSDynamoDBTableNamesKey.StringSlice(val)
+}
+
+// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
+// "aws.dynamodb.total_segments" semantic conventions. It represents the value of
+// the `TotalSegments` request parameter.
+func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
+ return AWSDynamoDBTotalSegmentsKey.Int(val)
+}
+
+// AWSECSClusterARN returns an attribute KeyValue conforming to the
+// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+// [ECS cluster].
+//
+// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html
+func AWSECSClusterARN(val string) attribute.KeyValue {
+ return AWSECSClusterARNKey.String(val)
+}
+
+// AWSECSContainerARN returns an attribute KeyValue conforming to the
+// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+// Resource Name (ARN) of an [ECS container instance].
+//
+// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html
+func AWSECSContainerARN(val string) attribute.KeyValue {
+ return AWSECSContainerARNKey.String(val)
+}
+
+// AWSECSTaskARN returns an attribute KeyValue conforming to the
+// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
+// [ECS task].
+//
+// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids
+func AWSECSTaskARN(val string) attribute.KeyValue {
+ return AWSECSTaskARNKey.String(val)
+}
+
+// AWSECSTaskFamily returns an attribute KeyValue conforming to the
+// "aws.ecs.task.family" semantic conventions. It represents the family name of
+// the [ECS task definition] used to create the ECS task.
+//
+// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html
+func AWSECSTaskFamily(val string) attribute.KeyValue {
+ return AWSECSTaskFamilyKey.String(val)
+}
+
+// AWSECSTaskID returns an attribute KeyValue conforming to the "aws.ecs.task.id"
+// semantic conventions. It represents the ID of a running ECS task. The ID MUST
+// be extracted from `task.arn`.
+func AWSECSTaskID(val string) attribute.KeyValue {
+ return AWSECSTaskIDKey.String(val)
+}
+
+// AWSECSTaskRevision returns an attribute KeyValue conforming to the
+// "aws.ecs.task.revision" semantic conventions. It represents the revision for
+// the task definition used to create the ECS task.
+func AWSECSTaskRevision(val string) attribute.KeyValue {
+ return AWSECSTaskRevisionKey.String(val)
+}
+
+// AWSEKSClusterARN returns an attribute KeyValue conforming to the
+// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+// cluster.
+func AWSEKSClusterARN(val string) attribute.KeyValue {
+ return AWSEKSClusterARNKey.String(val)
+}
+
+// AWSExtendedRequestID returns an attribute KeyValue conforming to the
+// "aws.extended_request_id" semantic conventions. It represents the AWS extended
+// request ID as returned in the response header `x-amz-id-2`.
+func AWSExtendedRequestID(val string) attribute.KeyValue {
+ return AWSExtendedRequestIDKey.String(val)
+}
+
+// AWSKinesisStreamName returns an attribute KeyValue conforming to the
+// "aws.kinesis.stream_name" semantic conventions. It represents the name of the
+// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name`
+// parameter of the Kinesis [describe-stream] operation.
+//
+// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
+// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html
+func AWSKinesisStreamName(val string) attribute.KeyValue {
+ return AWSKinesisStreamNameKey.String(val)
+}
+
+// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
+// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked
+// ARN as provided on the `Context` passed to the function (
+// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next`
+// applicable).
+func AWSLambdaInvokedARN(val string) attribute.KeyValue {
+ return AWSLambdaInvokedARNKey.String(val)
+}
+
+// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the
+// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID
+// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda
+// function. It's contents are read by Lambda and used to trigger a function.
+// This isn't available in the lambda execution context or the lambda runtime
+// environment. This is going to be populated by the AWS SDK for each language
+// when that UUID is present. Some of these operations are
+// Create/Delete/Get/List/Update EventSourceMapping.
+//
+// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html
+func AWSLambdaResourceMappingID(val string) attribute.KeyValue {
+ return AWSLambdaResourceMappingIDKey.String(val)
+}
+
+// AWSLogGroupARNs returns an attribute KeyValue conforming to the
+// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+// Name(s) (ARN) of the AWS log group(s).
+func AWSLogGroupARNs(val ...string) attribute.KeyValue {
+ return AWSLogGroupARNsKey.StringSlice(val)
+}
+
+// AWSLogGroupNames returns an attribute KeyValue conforming to the
+// "aws.log.group.names" semantic conventions. It represents the name(s) of the
+// AWS log group(s) an application is writing to.
+func AWSLogGroupNames(val ...string) attribute.KeyValue {
+ return AWSLogGroupNamesKey.StringSlice(val)
+}
+
+// AWSLogStreamARNs returns an attribute KeyValue conforming to the
+// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+// AWS log stream(s).
+func AWSLogStreamARNs(val ...string) attribute.KeyValue {
+ return AWSLogStreamARNsKey.StringSlice(val)
+}
+
+// AWSLogStreamNames returns an attribute KeyValue conforming to the
+// "aws.log.stream.names" semantic conventions. It represents the name(s) of the
+// AWS log stream(s) an application is writing to.
+func AWSLogStreamNames(val ...string) attribute.KeyValue {
+ return AWSLogStreamNamesKey.StringSlice(val)
+}
+
+// AWSRequestID returns an attribute KeyValue conforming to the "aws.request_id"
+// semantic conventions. It represents the AWS request ID as returned in the
+// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`
+// .
+func AWSRequestID(val string) attribute.KeyValue {
+ return AWSRequestIDKey.String(val)
+}
+
+// AWSS3Bucket returns an attribute KeyValue conforming to the "aws.s3.bucket"
+// semantic conventions. It represents the S3 bucket name the request refers to.
+// Corresponds to the `--bucket` parameter of the [S3 API] operations.
+//
+// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+func AWSS3Bucket(val string) attribute.KeyValue {
+ return AWSS3BucketKey.String(val)
+}
+
+// AWSS3CopySource returns an attribute KeyValue conforming to the
+// "aws.s3.copy_source" semantic conventions. It represents the source object (in
+// the form `bucket`/`key`) for the copy operation.
+func AWSS3CopySource(val string) attribute.KeyValue {
+ return AWSS3CopySourceKey.String(val)
+}
+
+// AWSS3Delete returns an attribute KeyValue conforming to the "aws.s3.delete"
+// semantic conventions. It represents the delete request container that
+// specifies the objects to be deleted.
+func AWSS3Delete(val string) attribute.KeyValue {
+ return AWSS3DeleteKey.String(val)
+}
+
+// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" semantic
+// conventions. It represents the S3 object key the request refers to.
+// Corresponds to the `--key` parameter of the [S3 API] operations.
+//
+// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html
+func AWSS3Key(val string) attribute.KeyValue {
+ return AWSS3KeyKey.String(val)
+}
+
+// AWSS3PartNumber returns an attribute KeyValue conforming to the
+// "aws.s3.part_number" semantic conventions. It represents the part number of
+// the part being uploaded in a multipart-upload operation. This is a positive
+// integer between 1 and 10,000.
+func AWSS3PartNumber(val int) attribute.KeyValue {
+ return AWSS3PartNumberKey.Int(val)
+}
+
+// AWSS3UploadID returns an attribute KeyValue conforming to the
+// "aws.s3.upload_id" semantic conventions. It represents the upload ID that
+// identifies the multipart upload.
+func AWSS3UploadID(val string) attribute.KeyValue {
+ return AWSS3UploadIDKey.String(val)
+}
+
+// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the
+// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of
+// the Secret stored in the Secrets Manager.
+func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue {
+ return AWSSecretsmanagerSecretARNKey.String(val)
+}
+
+// AWSSNSTopicARN returns an attribute KeyValue conforming to the
+// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS
+// Topic. An Amazon SNS [topic] is a logical access point that acts as a
+// communication channel.
+//
+// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html
+func AWSSNSTopicARN(val string) attribute.KeyValue {
+ return AWSSNSTopicARNKey.String(val)
+}
+
+// AWSSQSQueueURL returns an attribute KeyValue conforming to the
+// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS
+// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service
+// (SQS) and is used to access the queue and perform actions on it.
+func AWSSQSQueueURL(val string) attribute.KeyValue {
+ return AWSSQSQueueURLKey.String(val)
+}
+
+// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the
+// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN
+// of the AWS Step Functions Activity.
+func AWSStepFunctionsActivityARN(val string) attribute.KeyValue {
+ return AWSStepFunctionsActivityARNKey.String(val)
+}
+
+// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to
+// the "aws.step_functions.state_machine.arn" semantic conventions. It represents
+// the ARN of the AWS Step Functions State Machine.
+func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue {
+ return AWSStepFunctionsStateMachineARNKey.String(val)
+}
+
+// Enum values for aws.ecs.launchtype
+var (
+ // Amazon EC2
+ // Stability: development
+ AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
+ // Amazon Fargate
+ // Stability: development
+ AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
+)
+
+// Namespace: azure
+const (
+ // AzureClientIDKey is the attribute Key conforming to the "azure.client.id"
+ // semantic conventions. It represents the unique identifier of the client
+ // instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1"
+ AzureClientIDKey = attribute.Key("azure.client.id")
+
+ // AzureCosmosDBConnectionModeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.connection.mode" semantic conventions. It represents the
+ // cosmos client connection mode.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AzureCosmosDBConnectionModeKey = attribute.Key("azure.cosmosdb.connection.mode")
+
+ // AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the
+ // "azure.cosmosdb.consistency.level" semantic conventions. It represents the
+ // account or request [consistency level].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong",
+ // "Session"
+ //
+ // [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels
+ AzureCosmosDBConsistencyLevelKey = attribute.Key("azure.cosmosdb.consistency.level")
+
+ // AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to
+ // the "azure.cosmosdb.operation.contacted_regions" semantic conventions. It
+ // represents the list of regions contacted during operation in the order that
+ // they were contacted. If there is more than one region listed, it indicates
+ // that the operation was performed on multiple regions i.e. cross-regional
+ // call.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "North Central US", "Australia East", "Australia Southeast"
+ // Note: Region name matches the format of `displayName` in [Azure Location API]
+ //
+ // [Azure Location API]: https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations
+ AzureCosmosDBOperationContactedRegionsKey = attribute.Key("azure.cosmosdb.operation.contacted_regions")
+
+ // AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.operation.request_charge" semantic conventions. It represents
+ // the number of request units consumed by the operation.
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 46.18, 1.0
+ AzureCosmosDBOperationRequestChargeKey = attribute.Key("azure.cosmosdb.operation.request_charge")
+
+ // AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.request.body.size" semantic conventions. It represents the
+ // request payload size in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ AzureCosmosDBRequestBodySizeKey = attribute.Key("azure.cosmosdb.request.body.size")
+
+ // AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the
+ // "azure.cosmosdb.response.sub_status_code" semantic conventions. It represents
+ // the cosmos DB sub status code.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1000, 1002
+ AzureCosmosDBResponseSubStatusCodeKey = attribute.Key("azure.cosmosdb.response.sub_status_code")
+
+ // AzureResourceGroupNameKey is the attribute Key conforming to the
+ // "azure.resource_group.name" semantic conventions. It represents the name of
+ // the Azure [resource group] the resource belongs to.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-resource-group", "rg-myapp-prod"
+ //
+ // [resource group]: https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal
+ AzureResourceGroupNameKey = attribute.Key("azure.resource_group.name")
+
+ // AzureResourceProviderNamespaceKey is the attribute Key conforming to the
+ // "azure.resource_provider.namespace" semantic conventions. It represents the
+ // [Azure Resource Provider Namespace] as recognized by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus"
+ //
+ // [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
+ AzureResourceProviderNamespaceKey = attribute.Key("azure.resource_provider.namespace")
+
+ // AzureServiceRequestIDKey is the attribute Key conforming to the
+ // "azure.service.request.id" semantic conventions. It represents the unique
+ // identifier of the service request. It's generated by the Azure service and
+ // returned with the response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "00000000-0000-0000-0000-000000000000"
+ AzureServiceRequestIDKey = attribute.Key("azure.service.request.id")
+)
+
+// AzureClientID returns an attribute KeyValue conforming to the
+// "azure.client.id" semantic conventions. It represents the unique identifier of
+// the client instance.
+func AzureClientID(val string) attribute.KeyValue {
+ return AzureClientIDKey.String(val)
+}
+
+// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue
+// conforming to the "azure.cosmosdb.operation.contacted_regions" semantic
+// conventions. It represents the list of regions contacted during operation in
+// the order that they were contacted. If there is more than one region listed,
+// it indicates that the operation was performed on multiple regions i.e.
+// cross-regional call.
+func AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue {
+ return AzureCosmosDBOperationContactedRegionsKey.StringSlice(val)
+}
+
+// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming
+// to the "azure.cosmosdb.operation.request_charge" semantic conventions. It
+// represents the number of request units consumed by the operation.
+func AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue {
+ return AzureCosmosDBOperationRequestChargeKey.Float64(val)
+}
+
+// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the
+// "azure.cosmosdb.request.body.size" semantic conventions. It represents the
+// request payload size in bytes.
+func AzureCosmosDBRequestBodySize(val int) attribute.KeyValue {
+ return AzureCosmosDBRequestBodySizeKey.Int(val)
+}
+
+// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to
+// the "azure.cosmosdb.response.sub_status_code" semantic conventions. It
+// represents the cosmos DB sub status code.
+func AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue {
+ return AzureCosmosDBResponseSubStatusCodeKey.Int(val)
+}
+
+// AzureResourceGroupName returns an attribute KeyValue conforming to the
+// "azure.resource_group.name" semantic conventions. It represents the name of
+// the Azure [resource group] the resource belongs to.
+//
+// [resource group]: https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal
+func AzureResourceGroupName(val string) attribute.KeyValue {
+ return AzureResourceGroupNameKey.String(val)
+}
+
+// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the
+// "azure.resource_provider.namespace" semantic conventions. It represents the
+// [Azure Resource Provider Namespace] as recognized by the client.
+//
+// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers
+func AzureResourceProviderNamespace(val string) attribute.KeyValue {
+ return AzureResourceProviderNamespaceKey.String(val)
+}
+
+// AzureServiceRequestID returns an attribute KeyValue conforming to the
+// "azure.service.request.id" semantic conventions. It represents the unique
+// identifier of the service request. It's generated by the Azure service and
+// returned with the response.
+func AzureServiceRequestID(val string) attribute.KeyValue {
+ return AzureServiceRequestIDKey.String(val)
+}
+
+// Enum values for azure.cosmosdb.connection.mode
+var (
+ // Gateway (HTTP) connection.
+ // Stability: development
+ AzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String("gateway")
+ // Direct connection.
+ // Stability: development
+ AzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String("direct")
+)
+
+// Enum values for azure.cosmosdb.consistency.level
+var (
+ // Strong
+ // Stability: development
+ AzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String("Strong")
+ // Bounded Staleness
+ // Stability: development
+ AzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String("BoundedStaleness")
+ // Session
+ // Stability: development
+ AzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String("Session")
+ // Eventual
+ // Stability: development
+ AzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String("Eventual")
+ // Consistent Prefix
+ // Stability: development
+ AzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String("ConsistentPrefix")
+)
+
+// Namespace: browser
+const (
+ // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
+ // semantic conventions. It represents the array of brand name and version
+ // separated by a space.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: " Not A;Brand 99", "Chromium 99", "Chrome 99"
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.brands`).
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ BrowserBrandsKey = attribute.Key("browser.brands")
+
+ // BrowserDocumentURLFullKey is the attribute Key conforming to the
+ // "browser.document.url.full" semantic conventions. It represents the absolute
+ // URL of the current browser document according to [RFC3986].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://www.example.com/search?q=OpenTelemetry#SemConv"
+ //
+ // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+ BrowserDocumentURLFullKey = attribute.Key("browser.document.url.full")
+
+ // BrowserLanguageKey is the attribute Key conforming to the "browser.language"
+ // semantic conventions. It represents the preferred language of the user using
+ // the browser.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "en", "en-US", "fr", "fr-FR"
+ // Note: This value is intended to be taken from the Navigator API
+ // `navigator.language`.
+ BrowserLanguageKey = attribute.Key("browser.language")
+
+ // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
+ // semantic conventions. It represents a boolean that is true if the browser is
+ // running on a mobile device.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be
+ // left unset.
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ BrowserMobileKey = attribute.Key("browser.mobile")
+
+ // BrowserPlatformKey is the attribute Key conforming to the "browser.platform"
+ // semantic conventions. It represents the platform on which the browser is
+ // running.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Windows", "macOS", "Android"
+ // Note: This value is intended to be taken from the [UA client hints API] (
+ // `navigator.userAgentData.platform`). If unavailable, the legacy
+ // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD
+ // be left unset in order for the values to be consistent.
+ // The list of possible values is defined in the
+ // [W3C User-Agent Client Hints specification]. Note that some (but not all) of
+ // these values can overlap with values in the
+ // [`os.type` and `os.name` attributes]. However, for consistency, the values in
+ // the `browser.platform` attribute should capture the exact value that the user
+ // agent provides.
+ //
+ // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface
+ // [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform
+ // [`os.type` and `os.name` attributes]: ./os.md
+ BrowserPlatformKey = attribute.Key("browser.platform")
+)
+
+// BrowserBrands returns an attribute KeyValue conforming to the "browser.brands"
+// semantic conventions. It represents the array of brand name and version
+// separated by a space.
+func BrowserBrands(val ...string) attribute.KeyValue {
+ return BrowserBrandsKey.StringSlice(val)
+}
+
+// BrowserDocumentURLFull returns an attribute KeyValue conforming to the
+// "browser.document.url.full" semantic conventions. It represents the absolute
+// URL of the current browser document according to [RFC3986].
+//
+// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+func BrowserDocumentURLFull(val string) attribute.KeyValue {
+ return BrowserDocumentURLFullKey.String(val)
+}
+
+// BrowserLanguage returns an attribute KeyValue conforming to the
+// "browser.language" semantic conventions. It represents the preferred language
+// of the user using the browser.
+func BrowserLanguage(val string) attribute.KeyValue {
+ return BrowserLanguageKey.String(val)
+}
+
+// BrowserMobile returns an attribute KeyValue conforming to the "browser.mobile"
+// semantic conventions. It represents a boolean that is true if the browser is
+// running on a mobile device.
+func BrowserMobile(val bool) attribute.KeyValue {
+ return BrowserMobileKey.Bool(val)
+}
+
+// BrowserPlatform returns an attribute KeyValue conforming to the
+// "browser.platform" semantic conventions. It represents the platform on which
+// the browser is running.
+func BrowserPlatform(val string) attribute.KeyValue {
+ return BrowserPlatformKey.String(val)
+}
+
+// Namespace: cassandra
+const (
+ // CassandraConsistencyLevelKey is the attribute Key conforming to the
+ // "cassandra.consistency.level" semantic conventions. It represents the
+ // consistency level of the query. Based on consistency values from [CQL].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html
+ CassandraConsistencyLevelKey = attribute.Key("cassandra.consistency.level")
+
+ // CassandraCoordinatorDCKey is the attribute Key conforming to the
+ // "cassandra.coordinator.dc" semantic conventions. It represents the data
+ // center of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: us-west-2
+ CassandraCoordinatorDCKey = attribute.Key("cassandra.coordinator.dc")
+
+ // CassandraCoordinatorIDKey is the attribute Key conforming to the
+ // "cassandra.coordinator.id" semantic conventions. It represents the ID of the
+ // coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: be13faa2-8574-4d71-926d-27f16cf8a7af
+ CassandraCoordinatorIDKey = attribute.Key("cassandra.coordinator.id")
+
+ // CassandraPageSizeKey is the attribute Key conforming to the
+ // "cassandra.page.size" semantic conventions. It represents the fetch size used
+ // for paging, i.e. how many rows will be returned at once.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 5000
+ CassandraPageSizeKey = attribute.Key("cassandra.page.size")
+
+ // CassandraQueryIdempotentKey is the attribute Key conforming to the
+ // "cassandra.query.idempotent" semantic conventions. It represents the whether
+ // or not the query is idempotent.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ CassandraQueryIdempotentKey = attribute.Key("cassandra.query.idempotent")
+
+ // CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the
+ // "cassandra.speculative_execution.count" semantic conventions. It represents
+ // the number of times a query was speculatively executed. Not set or `0` if the
+ // query was not executed speculatively.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 2
+ CassandraSpeculativeExecutionCountKey = attribute.Key("cassandra.speculative_execution.count")
+)
+
+// CassandraCoordinatorDC returns an attribute KeyValue conforming to the
+// "cassandra.coordinator.dc" semantic conventions. It represents the data center
+// of the coordinating node for a query.
+func CassandraCoordinatorDC(val string) attribute.KeyValue {
+ return CassandraCoordinatorDCKey.String(val)
+}
+
+// CassandraCoordinatorID returns an attribute KeyValue conforming to the
+// "cassandra.coordinator.id" semantic conventions. It represents the ID of the
+// coordinating node for a query.
+func CassandraCoordinatorID(val string) attribute.KeyValue {
+ return CassandraCoordinatorIDKey.String(val)
+}
+
+// CassandraPageSize returns an attribute KeyValue conforming to the
+// "cassandra.page.size" semantic conventions. It represents the fetch size used
+// for paging, i.e. how many rows will be returned at once.
+func CassandraPageSize(val int) attribute.KeyValue {
+ return CassandraPageSizeKey.Int(val)
+}
+
+// CassandraQueryIdempotent returns an attribute KeyValue conforming to the
+// "cassandra.query.idempotent" semantic conventions. It represents the whether
+// or not the query is idempotent.
+func CassandraQueryIdempotent(val bool) attribute.KeyValue {
+ return CassandraQueryIdempotentKey.Bool(val)
+}
+
+// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to
+// the "cassandra.speculative_execution.count" semantic conventions. It
+// represents the number of times a query was speculatively executed. Not set or
+// `0` if the query was not executed speculatively.
+func CassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
+ return CassandraSpeculativeExecutionCountKey.Int(val)
+}
+
+// Enum values for cassandra.consistency.level
+var (
+ // All
+ // Stability: development
+ CassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String("all")
+ // Each Quorum
+ // Stability: development
+ CassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String("each_quorum")
+ // Quorum
+ // Stability: development
+ CassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String("quorum")
+ // Local Quorum
+ // Stability: development
+ CassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String("local_quorum")
+ // One
+ // Stability: development
+ CassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String("one")
+ // Two
+ // Stability: development
+ CassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String("two")
+ // Three
+ // Stability: development
+ CassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String("three")
+ // Local One
+ // Stability: development
+ CassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String("local_one")
+ // Any
+ // Stability: development
+ CassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String("any")
+ // Serial
+ // Stability: development
+ CassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String("serial")
+ // Local Serial
+ // Stability: development
+ CassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String("local_serial")
+)
+
+// Namespace: cicd
+const (
+ // CICDPipelineActionNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.action.name" semantic conventions. It represents the kind of
+ // action a pipeline run is performing.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "BUILD", "RUN", "SYNC"
+ CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name")
+
+ // CICDPipelineNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.name" semantic conventions. It represents the human readable
+ // name of the pipeline within a CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "Build and Test", "Lint", "Deploy Go Project",
+ // "deploy_to_environment"
+ CICDPipelineNameKey = attribute.Key("cicd.pipeline.name")
+
+ // CICDPipelineResultKey is the attribute Key conforming to the
+ // "cicd.pipeline.result" semantic conventions. It represents the result of a
+ // pipeline run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "success", "failure", "timeout", "skip"
+ CICDPipelineResultKey = attribute.Key("cicd.pipeline.result")
+
+ // CICDPipelineRunIDKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.id" semantic conventions. It represents the unique
+ // identifier of a pipeline run within a CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "120912"
+ CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id")
+
+ // CICDPipelineRunStateKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.state" semantic conventions. It represents the pipeline
+ // run goes through these states during its lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "pending", "executing", "finalizing"
+ CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state")
+
+ // CICDPipelineRunURLFullKey is the attribute Key conforming to the
+ // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
+ // the pipeline run, providing the complete address in order to locate and
+ // identify the pipeline run.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full")
+
+ // CICDPipelineTaskNameKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.name" semantic conventions. It represents the human
+ // readable name of a task within a pipeline. Task here most closely aligns with
+ // a [computing process] in a pipeline. Other terms for tasks include commands,
+ // steps, and procedures.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "Run GoLang Linter", "Go Build", "go-test", "deploy_binary"
+ //
+ // [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
+ CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name")
+
+ // CICDPipelineTaskRunIDKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
+ // identifier of a task run within a pipeline.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "12097"
+ // Note: For a given pipeline run and task, the `cicd.pipeline.task.run.id` MUST
+ // be unique within that run. For the same task across different runs of the
+ // same pipeline, the `cicd.pipeline.task.run.id` MAY remain the same, enabling
+ // correlation of `cicd.pipeline.task.run.result` values across multiple
+ // pipeline runs.
+ CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id")
+
+ // CICDPipelineTaskRunResultKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.result" semantic conventions. It represents the
+ // result of a task run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "success", "failure", "timeout", "skip"
+ CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result")
+
+ // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
+ // [URL] of the pipeline task run, providing the complete address in order to
+ // locate and identify the pipeline task run.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full")
+
+ // CICDPipelineTaskTypeKey is the attribute Key conforming to the
+ // "cicd.pipeline.task.type" semantic conventions. It represents the type of the
+ // task within a pipeline.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "build", "test", "deploy"
+ CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type")
+
+ // CICDSystemComponentKey is the attribute Key conforming to the
+ // "cicd.system.component" semantic conventions. It represents the name of a
+ // component of the CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "controller", "scheduler", "agent"
+ CICDSystemComponentKey = attribute.Key("cicd.system.component")
+
+ // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id"
+ // semantic conventions. It represents the unique identifier of a worker within
+ // a CI/CD system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "abc123", "10.0.1.2", "controller"
+ CICDWorkerIDKey = attribute.Key("cicd.worker.id")
+
+ // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name"
+ // semantic conventions. It represents the name of a worker within a CI/CD
+ // system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "agent-abc", "controller", "Ubuntu LTS"
+ CICDWorkerNameKey = attribute.Key("cicd.worker.name")
+
+ // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state"
+ // semantic conventions. It represents the state of a CI/CD worker / agent.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "available", "busy", "offline"
+ CICDWorkerStateKey = attribute.Key("cicd.worker.state")
+
+ // CICDWorkerURLFullKey is the attribute Key conforming to the
+ // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
+ // worker, providing the complete address in order to locate and identify the
+ // worker.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "https://cicd.example.org/worker/abc123"
+ //
+ // [URL]: https://wikipedia.org/wiki/URL
+ CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full")
+)
+
+// CICDPipelineName returns an attribute KeyValue conforming to the
+// "cicd.pipeline.name" semantic conventions. It represents the human readable
+// name of the pipeline within a CI/CD system.
+func CICDPipelineName(val string) attribute.KeyValue {
+ return CICDPipelineNameKey.String(val)
+}
+
+// CICDPipelineRunID returns an attribute KeyValue conforming to the
+// "cicd.pipeline.run.id" semantic conventions. It represents the unique
+// identifier of a pipeline run within a CI/CD system.
+func CICDPipelineRunID(val string) attribute.KeyValue {
+ return CICDPipelineRunIDKey.String(val)
+}
+
+// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the
+// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of
+// the pipeline run, providing the complete address in order to locate and
+// identify the pipeline run.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDPipelineRunURLFull(val string) attribute.KeyValue {
+ return CICDPipelineRunURLFullKey.String(val)
+}
+
+// CICDPipelineTaskName returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.name" semantic conventions. It represents the human
+// readable name of a task within a pipeline. Task here most closely aligns with
+// a [computing process] in a pipeline. Other terms for tasks include commands,
+// steps, and procedures.
+//
+// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing)
+func CICDPipelineTaskName(val string) attribute.KeyValue {
+ return CICDPipelineTaskNameKey.String(val)
+}
+
+// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique
+// identifier of a task run within a pipeline.
+func CICDPipelineTaskRunID(val string) attribute.KeyValue {
+ return CICDPipelineTaskRunIDKey.String(val)
+}
+
+// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the
+// "cicd.pipeline.task.run.url.full" semantic conventions. It represents the
+// [URL] of the pipeline task run, providing the complete address in order to
+// locate and identify the pipeline task run.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue {
+ return CICDPipelineTaskRunURLFullKey.String(val)
+}
+
+// CICDSystemComponent returns an attribute KeyValue conforming to the
+// "cicd.system.component" semantic conventions. It represents the name of a
+// component of the CI/CD system.
+func CICDSystemComponent(val string) attribute.KeyValue {
+ return CICDSystemComponentKey.String(val)
+}
+
+// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id"
+// semantic conventions. It represents the unique identifier of a worker within a
+// CI/CD system.
+func CICDWorkerID(val string) attribute.KeyValue {
+ return CICDWorkerIDKey.String(val)
+}
+
+// CICDWorkerName returns an attribute KeyValue conforming to the
+// "cicd.worker.name" semantic conventions. It represents the name of a worker
+// within a CI/CD system.
+func CICDWorkerName(val string) attribute.KeyValue {
+ return CICDWorkerNameKey.String(val)
+}
+
+// CICDWorkerURLFull returns an attribute KeyValue conforming to the
+// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the
+// worker, providing the complete address in order to locate and identify the
+// worker.
+//
+// [URL]: https://wikipedia.org/wiki/URL
+func CICDWorkerURLFull(val string) attribute.KeyValue {
+ return CICDWorkerURLFullKey.String(val)
+}
+
+// Enum values for cicd.pipeline.action.name
+var (
+ // The pipeline run is executing a build.
+ // Stability: release_candidate
+ CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD")
+ // The pipeline run is executing.
+ // Stability: release_candidate
+ CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN")
+ // The pipeline run is executing a sync.
+ // Stability: release_candidate
+ CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC")
+)
+
+// Enum values for cicd.pipeline.result
+var (
+ // The pipeline run finished successfully.
+ // Stability: release_candidate
+ CICDPipelineResultSuccess = CICDPipelineResultKey.String("success")
+ // The pipeline run did not finish successfully, eg. due to a compile error or a
+ // failing test. Such failures are usually detected by non-zero exit codes of
+ // the tools executed in the pipeline run.
+ // Stability: release_candidate
+ CICDPipelineResultFailure = CICDPipelineResultKey.String("failure")
+ // The pipeline run failed due to an error in the CI/CD system, eg. due to the
+ // worker being killed.
+ // Stability: release_candidate
+ CICDPipelineResultError = CICDPipelineResultKey.String("error")
+ // A timeout caused the pipeline run to be interrupted.
+ // Stability: release_candidate
+ CICDPipelineResultTimeout = CICDPipelineResultKey.String("timeout")
+ // The pipeline run was cancelled, eg. by a user manually cancelling the
+ // pipeline run.
+ // Stability: release_candidate
+ CICDPipelineResultCancellation = CICDPipelineResultKey.String("cancellation")
+ // The pipeline run was skipped, eg. due to a precondition not being met.
+ // Stability: release_candidate
+ CICDPipelineResultSkip = CICDPipelineResultKey.String("skip")
+)
+
+// Enum values for cicd.pipeline.run.state
+var (
+ // The run pending state spans from the event triggering the pipeline run until
+ // the execution of the run starts (eg. time spent in a queue, provisioning
+ // agents, creating run resources).
+ //
+ // Stability: release_candidate
+ CICDPipelineRunStatePending = CICDPipelineRunStateKey.String("pending")
+ // The executing state spans the execution of any run tasks (eg. build, test).
+ // Stability: release_candidate
+ CICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String("executing")
+ // The finalizing state spans from when the run has finished executing (eg.
+ // cleanup of run resources).
+ // Stability: release_candidate
+ CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing")
+)
+
+// Enum values for cicd.pipeline.task.run.result
+var (
+ // The task run finished successfully.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success")
+ // The task run did not finish successfully, eg. due to a compile error or a
+ // failing test. Such failures are usually detected by non-zero exit codes of
+ // the tools executed in the task run.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure")
+ // The task run failed due to an error in the CI/CD system, eg. due to the
+ // worker being killed.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error")
+ // A timeout caused the task run to be interrupted.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout")
+ // The task run was cancelled, eg. by a user manually cancelling the task run.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation")
+ // The task run was skipped, eg. due to a precondition not being met.
+ // Stability: release_candidate
+ CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip")
+)
+
+// Enum values for cicd.pipeline.task.type
+var (
+ // build
+ // Stability: release_candidate
+ CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build")
+ // test
+ // Stability: release_candidate
+ CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test")
+ // deploy
+ // Stability: release_candidate
+ CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy")
+)
+
+// Enum values for cicd.worker.state
+var (
+ // The worker is not performing work for the CI/CD system. It is available to
+ // the CI/CD system to perform work on (online / idle).
+ // Stability: release_candidate
+ CICDWorkerStateAvailable = CICDWorkerStateKey.String("available")
+ // The worker is performing work for the CI/CD system.
+ // Stability: release_candidate
+ CICDWorkerStateBusy = CICDWorkerStateKey.String("busy")
+ // The worker is not available to the CI/CD system (disconnected / down).
+ // Stability: release_candidate
+ CICDWorkerStateOffline = CICDWorkerStateKey.String("offline")
+)
+
+// Namespace: client
+const (
+ // ClientAddressKey is the attribute Key conforming to the "client.address"
+ // semantic conventions. It represents the client address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix domain
+ // socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "client.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the server side, and when communicating through an
+ // intermediary, `client.address` SHOULD represent the client address behind any
+ // intermediaries, for example proxies, if it's available.
+ ClientAddressKey = attribute.Key("client.address")
+
+ // ClientPortKey is the attribute Key conforming to the "client.port" semantic
+ // conventions. It represents the client port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ // Note: When observed from the server side, and when communicating through an
+ // intermediary, `client.port` SHOULD represent the client port behind any
+ // intermediaries, for example proxies, if it's available.
+ ClientPortKey = attribute.Key("client.port")
+)
+
+// ClientAddress returns an attribute KeyValue conforming to the "client.address"
+// semantic conventions. It represents the client address - domain name if
+// available without reverse DNS lookup; otherwise, IP address or Unix domain
+// socket name.
+func ClientAddress(val string) attribute.KeyValue {
+ return ClientAddressKey.String(val)
+}
+
+// ClientPort returns an attribute KeyValue conforming to the "client.port"
+// semantic conventions. It represents the client port number.
+func ClientPort(val int) attribute.KeyValue {
+ return ClientPortKey.Int(val)
+}
+
+// Namespace: cloud
+const (
+ // CloudAccountIDKey is the attribute Key conforming to the "cloud.account.id"
+ // semantic conventions. It represents the cloud account ID the resource is
+ // assigned to.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "111111111111", "opentelemetry",
+ // "22222222-2222-2222-2222-222222222222"
+ // Note: For Azure, this is the subscription ID.
+ CloudAccountIDKey = attribute.Key("cloud.account.id")
+
+ // CloudAvailabilityZoneKey is the attribute Key conforming to the
+ // "cloud.availability_zone" semantic conventions. It represents the cloud
+ // regions often have multiple, isolated locations known as zones to increase
+ // availability. Availability zone represents the zone where the resource is
+ // running.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-east-1c"
+ // Note: Availability zones are called "zones" on Alibaba Cloud and Google
+ // Cloud.
+ CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
+
+ // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
+ // semantic conventions. It represents the cloud platform in use.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The prefix of the service SHOULD match the one specified in
+ // `cloud.provider`.
+ CloudPlatformKey = attribute.Key("cloud.platform")
+
+ // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
+ // semantic conventions. It represents the name of the cloud provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ CloudProviderKey = attribute.Key("cloud.provider")
+
+ // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic
+ // conventions. It represents the geographical region within a cloud provider.
+ // When associated with a resource, this attribute specifies the region where
+ // the resource operates. When calling services or APIs deployed on a cloud,
+ // this attribute identifies the region where the called destination is
+ // deployed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1", "us-east-1"
+ // Note: Refer to your provider's docs to see the available regions, for example
+ // [Alibaba Cloud regions], [AWS regions], [Azure regions],
+ // [Google Cloud regions], or [Tencent Cloud regions].
+ //
+ // [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm
+ // [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
+ // [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/
+ // [Google Cloud regions]: https://cloud.google.com/about/locations
+ // [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091
+ CloudRegionKey = attribute.Key("cloud.region")
+
+ // CloudResourceIDKey is the attribute Key conforming to the "cloud.resource_id"
+ // semantic conventions. It represents the cloud provider-specific native
+ // identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a
+ // [fully qualified resource ID] on Azure, a [full resource name] on GCP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function",
+ // "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID",
+ // "/subscriptions//resourceGroups/
+ // /providers/Microsoft.Web/sites//functions/"
+ // Note: On some cloud providers, it may not be possible to determine the full
+ // ID at startup,
+ // so it may be necessary to set `cloud.resource_id` as a span attribute
+ // instead.
+ //
+ // The exact value to use for `cloud.resource_id` depends on the cloud provider.
+ // The following well-known definitions MUST be used if you set this attribute
+ // and they apply:
+ //
+ // - **AWS Lambda:** The function [ARN].
+ // Take care not to use the "invoked ARN" directly but replace any
+ // [alias suffix]
+ // with the resolved function version, as the same runtime instance may be
+ // invocable with
+ // multiple different aliases.
+ // - **GCP:** The [URI of the resource]
+ // - **Azure:** The [Fully Qualified Resource ID] of the invoked function,
+ // *not* the function app, having the form
+ //
+ // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`
+ // .
+ // This means that a span attribute MUST be used, as an Azure function app
+ // can host multiple functions that would usually share
+ // a TracerProvider.
+ //
+ //
+ // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
+ // [full resource name]: https://google.aip.dev/122#full-resource-names
+ // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+ // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names
+ // [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
+ CloudResourceIDKey = attribute.Key("cloud.resource_id")
+)
+
+// CloudAccountID returns an attribute KeyValue conforming to the
+// "cloud.account.id" semantic conventions. It represents the cloud account ID
+// the resource is assigned to.
+func CloudAccountID(val string) attribute.KeyValue {
+ return CloudAccountIDKey.String(val)
+}
+
+// CloudAvailabilityZone returns an attribute KeyValue conforming to the
+// "cloud.availability_zone" semantic conventions. It represents the cloud
+// regions often have multiple, isolated locations known as zones to increase
+// availability. Availability zone represents the zone where the resource is
+// running.
+func CloudAvailabilityZone(val string) attribute.KeyValue {
+ return CloudAvailabilityZoneKey.String(val)
+}
+
+// CloudRegion returns an attribute KeyValue conforming to the "cloud.region"
+// semantic conventions. It represents the geographical region within a cloud
+// provider. When associated with a resource, this attribute specifies the region
+// where the resource operates. When calling services or APIs deployed on a
+// cloud, this attribute identifies the region where the called destination is
+// deployed.
+func CloudRegion(val string) attribute.KeyValue {
+ return CloudRegionKey.String(val)
+}
+
+// CloudResourceID returns an attribute KeyValue conforming to the
+// "cloud.resource_id" semantic conventions. It represents the cloud
+// provider-specific native identifier of the monitored cloud resource (e.g. an
+// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name]
+// on GCP).
+//
+// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id
+// [full resource name]: https://google.aip.dev/122#full-resource-names
+func CloudResourceID(val string) attribute.KeyValue {
+ return CloudResourceIDKey.String(val)
+}
+
+// Enum values for cloud.platform
+var (
+ // Akamai Cloud Compute
+ // Stability: development
+ CloudPlatformAkamaiCloudCompute = CloudPlatformKey.String("akamai_cloud.compute")
+ // Alibaba Cloud Elastic Compute Service
+ // Stability: development
+ CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
+ // Alibaba Cloud Function Compute
+ // Stability: development
+ CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc")
+ // Red Hat OpenShift on Alibaba Cloud
+ // Stability: development
+ CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift")
+ // AWS Elastic Compute Cloud
+ // Stability: development
+ CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
+ // AWS Elastic Container Service
+ // Stability: development
+ CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
+ // AWS Elastic Kubernetes Service
+ // Stability: development
+ CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
+ // AWS Lambda
+ // Stability: development
+ CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
+ // AWS Elastic Beanstalk
+ // Stability: development
+ CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
+ // AWS App Runner
+ // Stability: development
+ CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
+ // Red Hat OpenShift on AWS (ROSA)
+ // Stability: development
+ CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift")
+ // Azure Virtual Machines
+ // Stability: development
+ CloudPlatformAzureVM = CloudPlatformKey.String("azure.vm")
+ // Azure Container Apps
+ // Stability: development
+ CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure.container_apps")
+ // Azure Container Instances
+ // Stability: development
+ CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure.container_instances")
+ // Azure Kubernetes Service
+ // Stability: development
+ CloudPlatformAzureAKS = CloudPlatformKey.String("azure.aks")
+ // Azure Functions
+ // Stability: development
+ CloudPlatformAzureFunctions = CloudPlatformKey.String("azure.functions")
+ // Azure App Service
+ // Stability: development
+ CloudPlatformAzureAppService = CloudPlatformKey.String("azure.app_service")
+ // Azure Red Hat OpenShift
+ // Stability: development
+ CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure.openshift")
+ // Google Vertex AI Agent Engine
+ // Stability: development
+ CloudPlatformGCPAgentEngine = CloudPlatformKey.String("gcp.agent_engine")
+ // Google Bare Metal Solution (BMS)
+ // Stability: development
+ CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
+ // Google Cloud Compute Engine (GCE)
+ // Stability: development
+ CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
+ // Google Cloud Run
+ // Stability: development
+ CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
+ // Google Cloud Kubernetes Engine (GKE)
+ // Stability: development
+ CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
+ // Google Cloud Functions (GCF)
+ // Stability: development
+ CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
+ // Google Cloud App Engine (GAE)
+ // Stability: development
+ CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
+ // Red Hat OpenShift on Google Cloud
+ // Stability: development
+ CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift")
+ // Server on Hetzner Cloud
+ // Stability: development
+ CloudPlatformHetznerCloudServer = CloudPlatformKey.String("hetzner.cloud_server")
+ // Red Hat OpenShift on IBM Cloud
+ // Stability: development
+ CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift")
+ // Compute on Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute")
+ // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke")
+ // Tencent Cloud Cloud Virtual Machine (CVM)
+ // Stability: development
+ CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm")
+ // Tencent Cloud Elastic Kubernetes Service (EKS)
+ // Stability: development
+ CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
+ // Tencent Cloud Serverless Cloud Function (SCF)
+ // Stability: development
+ CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf")
+ // Vultr Cloud Compute
+ // Stability: development
+ CloudPlatformVultrCloudCompute = CloudPlatformKey.String("vultr.cloud_compute")
+)
+
+// Enum values for cloud.provider
+var (
+ // Akamai Cloud
+ // Stability: development
+ CloudProviderAkamaiCloud = CloudProviderKey.String("akamai_cloud")
+ // Alibaba Cloud
+ // Stability: development
+ CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ // Stability: development
+ CloudProviderAWS = CloudProviderKey.String("aws")
+ // Microsoft Azure
+ // Stability: development
+ CloudProviderAzure = CloudProviderKey.String("azure")
+ // Google Cloud Platform
+ // Stability: development
+ CloudProviderGCP = CloudProviderKey.String("gcp")
+ // Heroku Platform as a Service
+ // Stability: development
+ CloudProviderHeroku = CloudProviderKey.String("heroku")
+ // Hetzner
+ // Stability: development
+ CloudProviderHetzner = CloudProviderKey.String("hetzner")
+ // IBM Cloud
+ // Stability: development
+ CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud")
+ // Oracle Cloud Infrastructure (OCI)
+ // Stability: development
+ CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud")
+ // Tencent Cloud
+ // Stability: development
+ CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
+ // Vultr
+ // Stability: development
+ CloudProviderVultr = CloudProviderKey.String("vultr")
+)
+
+// Namespace: cloudevents
+const (
+ // CloudEventsEventIDKey is the attribute Key conforming to the
+ // "cloudevents.event_id" semantic conventions. It represents the [event_id]
+ // uniquely identifies the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001"
+ //
+ // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
+ CloudEventsEventIDKey = attribute.Key("cloudevents.event_id")
+
+ // CloudEventsEventSourceKey is the attribute Key conforming to the
+ // "cloudevents.event_source" semantic conventions. It represents the [source]
+ // identifies the context in which an event happened.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://github.com/cloudevents", "/cloudevents/spec/pull/123",
+ // "my-service"
+ //
+ // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
+ CloudEventsEventSourceKey = attribute.Key("cloudevents.event_source")
+
+ // CloudEventsEventSpecVersionKey is the attribute Key conforming to the
+ // "cloudevents.event_spec_version" semantic conventions. It represents the
+ // [version of the CloudEvents specification] which the event uses.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0
+ //
+ // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
+ CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
+
+ // CloudEventsEventSubjectKey is the attribute Key conforming to the
+ // "cloudevents.event_subject" semantic conventions. It represents the [subject]
+ // of the event in the context of the event producer (identified by source).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: mynewfile.jpg
+ //
+ // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
+ CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
+
+ // CloudEventsEventTypeKey is the attribute Key conforming to the
+ // "cloudevents.event_type" semantic conventions. It represents the [event_type]
+ // contains a value describing the type of event related to the originating
+ // occurrence.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2"
+ //
+ // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
+ CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type")
+)
+
+// CloudEventsEventID returns an attribute KeyValue conforming to the
+// "cloudevents.event_id" semantic conventions. It represents the [event_id]
+// uniquely identifies the event.
+//
+// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id
+func CloudEventsEventID(val string) attribute.KeyValue {
+ return CloudEventsEventIDKey.String(val)
+}
+
+// CloudEventsEventSource returns an attribute KeyValue conforming to the
+// "cloudevents.event_source" semantic conventions. It represents the [source]
+// identifies the context in which an event happened.
+//
+// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1
+func CloudEventsEventSource(val string) attribute.KeyValue {
+ return CloudEventsEventSourceKey.String(val)
+}
+
+// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the
+// "cloudevents.event_spec_version" semantic conventions. It represents the
+// [version of the CloudEvents specification] which the event uses.
+//
+// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion
+func CloudEventsEventSpecVersion(val string) attribute.KeyValue {
+ return CloudEventsEventSpecVersionKey.String(val)
+}
+
+// CloudEventsEventSubject returns an attribute KeyValue conforming to the
+// "cloudevents.event_subject" semantic conventions. It represents the [subject]
+// of the event in the context of the event producer (identified by source).
+//
+// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject
+func CloudEventsEventSubject(val string) attribute.KeyValue {
+ return CloudEventsEventSubjectKey.String(val)
+}
+
+// CloudEventsEventType returns an attribute KeyValue conforming to the
+// "cloudevents.event_type" semantic conventions. It represents the [event_type]
+// contains a value describing the type of event related to the originating
+// occurrence.
+//
+// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type
+func CloudEventsEventType(val string) attribute.KeyValue {
+ return CloudEventsEventTypeKey.String(val)
+}
+
+// Namespace: cloudfoundry
+const (
+ // CloudFoundryAppIDKey is the attribute Key conforming to the
+ // "cloudfoundry.app.id" semantic conventions. It represents the guid of the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.application_id`. This is the same value as
+ // reported by `cf app --guid`.
+ CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id")
+
+ // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.app.instance.id" semantic conventions. It represents the index
+ // of the application instance. 0 when just one instance is active.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0", "1"
+ // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
+ // .
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the application instance index for applications
+ // deployed on the runtime.
+ //
+ // Application instrumentation should use the value from environment
+ // variable `CF_INSTANCE_INDEX`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id")
+
+ // CloudFoundryAppNameKey is the attribute Key conforming to the
+ // "cloudfoundry.app.name" semantic conventions. It represents the name of the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-app-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.application_name`. This is the same value
+ // as reported by `cf apps`.
+ CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name")
+
+ // CloudFoundryOrgIDKey is the attribute Key conforming to the
+ // "cloudfoundry.org.id" semantic conventions. It represents the guid of the
+ // CloudFoundry org the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.org_id`. This is the same value as
+ // reported by `cf org --guid`.
+ CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id")
+
+ // CloudFoundryOrgNameKey is the attribute Key conforming to the
+ // "cloudfoundry.org.name" semantic conventions. It represents the name of the
+ // CloudFoundry organization the app is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-org-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.org_name`. This is the same value as
+ // reported by `cf orgs`.
+ CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name")
+
+ // CloudFoundryProcessIDKey is the attribute Key conforming to the
+ // "cloudfoundry.process.id" semantic conventions. It represents the UID
+ // identifying the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to
+ // `VCAP_APPLICATION.app_id` for applications deployed to the runtime.
+ // For system components, this could be the actual PID.
+ CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id")
+
+ // CloudFoundryProcessTypeKey is the attribute Key conforming to the
+ // "cloudfoundry.process.type" semantic conventions. It represents the type of
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "web"
+ // Note: CloudFoundry applications can consist of multiple jobs. Usually the
+ // main process will be of type `web`. There can be additional background
+ // tasks or side-cars with different process types.
+ CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type")
+
+ // CloudFoundrySpaceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.space.id" semantic conventions. It represents the guid of the
+ // CloudFoundry space the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.space_id`. This is the same value as
+ // reported by `cf space --guid`.
+ CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id")
+
+ // CloudFoundrySpaceNameKey is the attribute Key conforming to the
+ // "cloudfoundry.space.name" semantic conventions. It represents the name of the
+ // CloudFoundry space the application is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-space-name"
+ // Note: Application instrumentation should use the value from environment
+ // variable `VCAP_APPLICATION.space_name`. This is the same value as
+ // reported by `cf spaces`.
+ CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name")
+
+ // CloudFoundrySystemIDKey is the attribute Key conforming to the
+ // "cloudfoundry.system.id" semantic conventions. It represents a guid or
+ // another name describing the event source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cf/gorouter"
+ // Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope].
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the component name, e.g. "gorouter", for
+ // CloudFoundry components.
+ //
+ // When system components are instrumented, values from the
+ // [Bosh spec]
+ // should be used. The `system.id` should be set to
+ // `spec.deployment/spec.name`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
+ CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id")
+
+ // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the
+ // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
+ // describing the concrete instance of the event source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope]
+ // .
+ // It is used for logs and metrics emitted by CloudFoundry. It is
+ // supposed to contain the vm id for CloudFoundry components.
+ //
+ // When system components are instrumented, values from the
+ // [Bosh spec]
+ // should be used. The `system.instance.id` should be set to `spec.id`.
+ //
+ // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope
+ // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec
+ CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id")
+)
+
+// CloudFoundryAppID returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.id" semantic conventions. It represents the guid of the
+// application.
+func CloudFoundryAppID(val string) attribute.KeyValue {
+ return CloudFoundryAppIDKey.String(val)
+}
+
+// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.instance.id" semantic conventions. It represents the index
+// of the application instance. 0 when just one instance is active.
+func CloudFoundryAppInstanceID(val string) attribute.KeyValue {
+ return CloudFoundryAppInstanceIDKey.String(val)
+}
+
+// CloudFoundryAppName returns an attribute KeyValue conforming to the
+// "cloudfoundry.app.name" semantic conventions. It represents the name of the
+// application.
+func CloudFoundryAppName(val string) attribute.KeyValue {
+ return CloudFoundryAppNameKey.String(val)
+}
+
+// CloudFoundryOrgID returns an attribute KeyValue conforming to the
+// "cloudfoundry.org.id" semantic conventions. It represents the guid of the
+// CloudFoundry org the application is running in.
+func CloudFoundryOrgID(val string) attribute.KeyValue {
+ return CloudFoundryOrgIDKey.String(val)
+}
+
+// CloudFoundryOrgName returns an attribute KeyValue conforming to the
+// "cloudfoundry.org.name" semantic conventions. It represents the name of the
+// CloudFoundry organization the app is running in.
+func CloudFoundryOrgName(val string) attribute.KeyValue {
+ return CloudFoundryOrgNameKey.String(val)
+}
+
+// CloudFoundryProcessID returns an attribute KeyValue conforming to the
+// "cloudfoundry.process.id" semantic conventions. It represents the UID
+// identifying the process.
+func CloudFoundryProcessID(val string) attribute.KeyValue {
+ return CloudFoundryProcessIDKey.String(val)
+}
+
+// CloudFoundryProcessType returns an attribute KeyValue conforming to the
+// "cloudfoundry.process.type" semantic conventions. It represents the type of
+// process.
+func CloudFoundryProcessType(val string) attribute.KeyValue {
+ return CloudFoundryProcessTypeKey.String(val)
+}
+
+// CloudFoundrySpaceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.space.id" semantic conventions. It represents the guid of the
+// CloudFoundry space the application is running in.
+func CloudFoundrySpaceID(val string) attribute.KeyValue {
+ return CloudFoundrySpaceIDKey.String(val)
+}
+
+// CloudFoundrySpaceName returns an attribute KeyValue conforming to the
+// "cloudfoundry.space.name" semantic conventions. It represents the name of the
+// CloudFoundry space the application is running in.
+func CloudFoundrySpaceName(val string) attribute.KeyValue {
+ return CloudFoundrySpaceNameKey.String(val)
+}
+
+// CloudFoundrySystemID returns an attribute KeyValue conforming to the
+// "cloudfoundry.system.id" semantic conventions. It represents a guid or another
+// name describing the event source.
+func CloudFoundrySystemID(val string) attribute.KeyValue {
+ return CloudFoundrySystemIDKey.String(val)
+}
+
+// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the
+// "cloudfoundry.system.instance.id" semantic conventions. It represents a guid
+// describing the concrete instance of the event source.
+func CloudFoundrySystemInstanceID(val string) attribute.KeyValue {
+ return CloudFoundrySystemInstanceIDKey.String(val)
+}
+
+// Namespace: code
+const (
+ // CodeColumnNumberKey is the attribute Key conforming to the
+ // "code.column.number" semantic conventions. It represents the column number in
+ // `code.file.path` best representing the operation. It SHOULD point within the
+ // code unit named in `code.function.name`. This attribute MUST NOT be used on
+ // the Profile signal since the data is already captured in 'message Line'. This
+ // constraint is imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ CodeColumnNumberKey = attribute.Key("code.column.number")
+
+ // CodeFilePathKey is the attribute Key conforming to the "code.file.path"
+ // semantic conventions. It represents the source code file name that identifies
+ // the code unit as uniquely as possible (preferably an absolute file path).
+ // This attribute MUST NOT be used on the Profile signal since the data is
+ // already captured in 'message Function'. This constraint is imposed to prevent
+ // redundancy and maintain data integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: /usr/local/MyApplication/content_root/app/index.php
+ CodeFilePathKey = attribute.Key("code.file.path")
+
+ // CodeFunctionNameKey is the attribute Key conforming to the
+ // "code.function.name" semantic conventions. It represents the method or
+ // function fully-qualified name without arguments. The value should fit the
+ // natural representation of the language runtime, which is also likely the same
+ // used within `code.stacktrace` attribute value. This attribute MUST NOT be
+ // used on the Profile signal since the data is already captured in 'message
+ // Function'. This constraint is imposed to prevent redundancy and maintain data
+ // integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "com.example.MyHttpService.serveRequest",
+ // "GuzzleHttp\Client::transfer", "fopen"
+ // Note: Values and format depends on each language runtime, thus it is
+ // impossible to provide an exhaustive list of examples.
+ // The values are usually the same (or prefixes of) the ones found in native
+ // stack trace representation stored in
+ // `code.stacktrace` without information on arguments.
+ //
+ // Examples:
+ //
+ // - Java method: `com.example.MyHttpService.serveRequest`
+ // - Java anonymous class method: `com.mycompany.Main$1.myMethod`
+ // - Java lambda method:
+ // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`
+ // - PHP function: `GuzzleHttp\Client::transfer`
+ // - Go function: `github.com/my/repo/pkg.foo.func5`
+ // - Elixir: `OpenTelemetry.Ctx.new`
+ // - Erlang: `opentelemetry_ctx:new`
+ // - Rust: `playground::my_module::my_cool_func`
+ // - C function: `fopen`
+ CodeFunctionNameKey = attribute.Key("code.function.name")
+
+ // CodeLineNumberKey is the attribute Key conforming to the "code.line.number"
+ // semantic conventions. It represents the line number in `code.file.path` best
+ // representing the operation. It SHOULD point within the code unit named in
+ // `code.function.name`. This attribute MUST NOT be used on the Profile signal
+ // since the data is already captured in 'message Line'. This constraint is
+ // imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ CodeLineNumberKey = attribute.Key("code.line.number")
+
+ // CodeStacktraceKey is the attribute Key conforming to the "code.stacktrace"
+ // semantic conventions. It represents a stacktrace as a string in the natural
+ // representation for the language runtime. The representation is identical to
+ // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile
+ // signal since the data is already captured in 'message Location'. This
+ // constraint is imposed to prevent redundancy and maintain data integrity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
+ // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
+ // com.example.GenerateTrace.main(GenerateTrace.java:5)
+ //
+ // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
+ CodeStacktraceKey = attribute.Key("code.stacktrace")
+)
+
+// CodeColumnNumber returns an attribute KeyValue conforming to the
+// "code.column.number" semantic conventions. It represents the column number in
+// `code.file.path` best representing the operation. It SHOULD point within the
+// code unit named in `code.function.name`. This attribute MUST NOT be used on
+// the Profile signal since the data is already captured in 'message Line'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+func CodeColumnNumber(val int) attribute.KeyValue {
+ return CodeColumnNumberKey.Int(val)
+}
+
+// CodeFilePath returns an attribute KeyValue conforming to the "code.file.path"
+// semantic conventions. It represents the source code file name that identifies
+// the code unit as uniquely as possible (preferably an absolute file path). This
+// attribute MUST NOT be used on the Profile signal since the data is already
+// captured in 'message Function'. This constraint is imposed to prevent
+// redundancy and maintain data integrity.
+func CodeFilePath(val string) attribute.KeyValue {
+ return CodeFilePathKey.String(val)
+}
+
+// CodeFunctionName returns an attribute KeyValue conforming to the
+// "code.function.name" semantic conventions. It represents the method or
+// function fully-qualified name without arguments. The value should fit the
+// natural representation of the language runtime, which is also likely the same
+// used within `code.stacktrace` attribute value. This attribute MUST NOT be used
+// on the Profile signal since the data is already captured in 'message
+// Function'. This constraint is imposed to prevent redundancy and maintain data
+// integrity.
+func CodeFunctionName(val string) attribute.KeyValue {
+ return CodeFunctionNameKey.String(val)
+}
+
+// CodeLineNumber returns an attribute KeyValue conforming to the
+// "code.line.number" semantic conventions. It represents the line number in
+// `code.file.path` best representing the operation. It SHOULD point within the
+// code unit named in `code.function.name`. This attribute MUST NOT be used on
+// the Profile signal since the data is already captured in 'message Line'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+func CodeLineNumber(val int) attribute.KeyValue {
+ return CodeLineNumberKey.Int(val)
+}
+
+// CodeStacktrace returns an attribute KeyValue conforming to the
+// "code.stacktrace" semantic conventions. It represents a stacktrace as a string
+// in the natural representation for the language runtime. The representation is
+// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the
+// Profile signal since the data is already captured in 'message Location'. This
+// constraint is imposed to prevent redundancy and maintain data integrity.
+//
+// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation
+func CodeStacktrace(val string) attribute.KeyValue {
+ return CodeStacktraceKey.String(val)
+}
+
+// Namespace: container
+const (
+ // ContainerCommandKey is the attribute Key conforming to the
+ // "container.command" semantic conventions. It represents the command used to
+ // run the container (i.e. the command name).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol"
+ // Note: If using embedded credentials or sensitive data, it is recommended to
+ // remove them to prevent potential leakage.
+ ContainerCommandKey = attribute.Key("container.command")
+
+ // ContainerCommandArgsKey is the attribute Key conforming to the
+ // "container.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) run by the
+ // container.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol", "--config", "config.yaml"
+ ContainerCommandArgsKey = attribute.Key("container.command_args")
+
+ // ContainerCommandLineKey is the attribute Key conforming to the
+ // "container.command_line" semantic conventions. It represents the full command
+ // run by the container as a single string representing the full command.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otelcontribcol --config config.yaml"
+ ContainerCommandLineKey = attribute.Key("container.command_line")
+
+ // ContainerCSIPluginNameKey is the attribute Key conforming to the
+ // "container.csi.plugin.name" semantic conventions. It represents the name of
+ // the CSI ([Container Storage Interface]) plugin used by the volume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pd.csi.storage.gke.io"
+ // Note: This can sometimes be referred to as a "driver" in CSI implementations.
+ // This should represent the `name` field of the GetPluginInfo RPC.
+ //
+ // [Container Storage Interface]: https://github.com/container-storage-interface/spec
+ ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name")
+
+ // ContainerCSIVolumeIDKey is the attribute Key conforming to the
+ // "container.csi.volume.id" semantic conventions. It represents the unique
+ // volume ID returned by the CSI ([Container Storage Interface]) plugin.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk"
+ // Note: This can sometimes be referred to as a "volume handle" in CSI
+ // implementations. This should represent the `Volume.volume_id` field in CSI
+ // spec.
+ //
+ // [Container Storage Interface]: https://github.com/container-storage-interface/spec
+ ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id")
+
+ // ContainerIDKey is the attribute Key conforming to the "container.id" semantic
+ // conventions. It represents the container ID. Usually a UUID, as for example
+ // used to [identify Docker containers]. The UUID might be abbreviated.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "a3bf90e006b2"
+ //
+ // [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
+ ContainerIDKey = attribute.Key("container.id")
+
+ // ContainerImageIDKey is the attribute Key conforming to the
+ // "container.image.id" semantic conventions. It represents the runtime specific
+ // image identifier. Usually a hash algorithm followed by a UUID.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f"
+ // Note: Docker defines a sha256 of the image id; `container.image.id`
+ // corresponds to the `Image` field from the Docker container inspect [API]
+ // endpoint.
+ // K8s defines a link to the container registry repository with digest
+ // `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`
+ // .
+ // The ID is assigned by the container runtime and can vary in different
+ // environments. Consider using `oci.manifest.digest` if it is important to
+ // identify the same image in different environments/runtimes.
+ //
+ // [API]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect
+ ContainerImageIDKey = attribute.Key("container.image.id")
+
+ // ContainerImageNameKey is the attribute Key conforming to the
+ // "container.image.name" semantic conventions. It represents the name of the
+ // image the container was built on.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "gcr.io/opentelemetry/operator"
+ ContainerImageNameKey = attribute.Key("container.image.name")
+
+ // ContainerImageRepoDigestsKey is the attribute Key conforming to the
+ // "container.image.repo_digests" semantic conventions. It represents the repo
+ // digests of the container image as provided by the container runtime.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ // "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb",
+ // "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578"
+ // Note: [Docker] and [CRI] report those under the `RepoDigests` field.
+ //
+ // [Docker]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
+ // [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238
+ ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
+
+ // ContainerImageTagsKey is the attribute Key conforming to the
+ // "container.image.tags" semantic conventions. It represents the container
+ // image tags. An example can be found in [Docker Image Inspect]. Should be only
+ // the `` section of the full name for example from
+ // `registry.example.com/my-org/my-image:`.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "v1.27.1", "3.5.7-0"
+ //
+ // [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
+ ContainerImageTagsKey = attribute.Key("container.image.tags")
+
+ // ContainerNameKey is the attribute Key conforming to the "container.name"
+ // semantic conventions. It represents the container name used by container
+ // runtime.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-autoconf"
+ ContainerNameKey = attribute.Key("container.name")
+
+ // ContainerRuntimeDescriptionKey is the attribute Key conforming to the
+ // "container.runtime.description" semantic conventions. It represents a
+ // description about the runtime which could include, for example details about
+ // the CRI/API version being used or other customizations.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "docker://19.3.1 - CRI: 1.22.0"
+ ContainerRuntimeDescriptionKey = attribute.Key("container.runtime.description")
+
+ // ContainerRuntimeNameKey is the attribute Key conforming to the
+ // "container.runtime.name" semantic conventions. It represents the container
+ // runtime managing this container.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "docker", "containerd", "rkt"
+ ContainerRuntimeNameKey = attribute.Key("container.runtime.name")
+
+ // ContainerRuntimeVersionKey is the attribute Key conforming to the
+ // "container.runtime.version" semantic conventions. It represents the version
+ // of the runtime of this process, as returned by the runtime without
+ // modification.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1.0.0
+ ContainerRuntimeVersionKey = attribute.Key("container.runtime.version")
+)
+
+// ContainerCommand returns an attribute KeyValue conforming to the
+// "container.command" semantic conventions. It represents the command used to
+// run the container (i.e. the command name).
+func ContainerCommand(val string) attribute.KeyValue {
+ return ContainerCommandKey.String(val)
+}
+
+// ContainerCommandArgs returns an attribute KeyValue conforming to the
+// "container.command_args" semantic conventions. It represents the all the
+// command arguments (including the command/executable itself) run by the
+// container.
+func ContainerCommandArgs(val ...string) attribute.KeyValue {
+ return ContainerCommandArgsKey.StringSlice(val)
+}
+
+// ContainerCommandLine returns an attribute KeyValue conforming to the
+// "container.command_line" semantic conventions. It represents the full command
+// run by the container as a single string representing the full command.
+func ContainerCommandLine(val string) attribute.KeyValue {
+ return ContainerCommandLineKey.String(val)
+}
+
+// ContainerCSIPluginName returns an attribute KeyValue conforming to the
+// "container.csi.plugin.name" semantic conventions. It represents the name of
+// the CSI ([Container Storage Interface]) plugin used by the volume.
+//
+// [Container Storage Interface]: https://github.com/container-storage-interface/spec
+func ContainerCSIPluginName(val string) attribute.KeyValue {
+ return ContainerCSIPluginNameKey.String(val)
+}
+
+// ContainerCSIVolumeID returns an attribute KeyValue conforming to the
+// "container.csi.volume.id" semantic conventions. It represents the unique
+// volume ID returned by the CSI ([Container Storage Interface]) plugin.
+//
+// [Container Storage Interface]: https://github.com/container-storage-interface/spec
+func ContainerCSIVolumeID(val string) attribute.KeyValue {
+ return ContainerCSIVolumeIDKey.String(val)
+}
+
+// ContainerID returns an attribute KeyValue conforming to the "container.id"
+// semantic conventions. It represents the container ID. Usually a UUID, as for
+// example used to [identify Docker containers]. The UUID might be abbreviated.
+//
+// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification
+func ContainerID(val string) attribute.KeyValue {
+ return ContainerIDKey.String(val)
+}
+
+// ContainerImageID returns an attribute KeyValue conforming to the
+// "container.image.id" semantic conventions. It represents the runtime specific
+// image identifier. Usually a hash algorithm followed by a UUID.
+func ContainerImageID(val string) attribute.KeyValue {
+ return ContainerImageIDKey.String(val)
+}
+
+// ContainerImageName returns an attribute KeyValue conforming to the
+// "container.image.name" semantic conventions. It represents the name of the
+// image the container was built on.
+func ContainerImageName(val string) attribute.KeyValue {
+ return ContainerImageNameKey.String(val)
+}
+
+// ContainerImageRepoDigests returns an attribute KeyValue conforming to the
+// "container.image.repo_digests" semantic conventions. It represents the repo
+// digests of the container image as provided by the container runtime.
+func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
+ return ContainerImageRepoDigestsKey.StringSlice(val)
+}
+
+// ContainerImageTags returns an attribute KeyValue conforming to the
+// "container.image.tags" semantic conventions. It represents the container image
+// tags. An example can be found in [Docker Image Inspect]. Should be only the
+// `` section of the full name for example from
+// `registry.example.com/my-org/my-image:`.
+//
+// [Docker Image Inspect]: https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect
+func ContainerImageTags(val ...string) attribute.KeyValue {
+ return ContainerImageTagsKey.StringSlice(val)
+}
+
+// ContainerLabel returns an attribute KeyValue conforming to the
+// "container.label" semantic conventions. It represents the container labels,
+// `` being the label name, the value being the label value.
+func ContainerLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("container.label."+key, val)
+}
+
+// ContainerName returns an attribute KeyValue conforming to the "container.name"
+// semantic conventions. It represents the container name used by container
+// runtime.
+func ContainerName(val string) attribute.KeyValue {
+ return ContainerNameKey.String(val)
+}
+
+// ContainerRuntimeDescription returns an attribute KeyValue conforming to the
+// "container.runtime.description" semantic conventions. It represents a
+// description about the runtime which could include, for example details about
+// the CRI/API version being used or other customizations.
+func ContainerRuntimeDescription(val string) attribute.KeyValue {
+ return ContainerRuntimeDescriptionKey.String(val)
+}
+
+// ContainerRuntimeName returns an attribute KeyValue conforming to the
+// "container.runtime.name" semantic conventions. It represents the container
+// runtime managing this container.
+func ContainerRuntimeName(val string) attribute.KeyValue {
+ return ContainerRuntimeNameKey.String(val)
+}
+
+// ContainerRuntimeVersion returns an attribute KeyValue conforming to the
+// "container.runtime.version" semantic conventions. It represents the version of
+// the runtime of this process, as returned by the runtime without modification.
+func ContainerRuntimeVersion(val string) attribute.KeyValue {
+ return ContainerRuntimeVersionKey.String(val)
+}
+
+// Namespace: cpu
+const (
+ // CPULogicalNumberKey is the attribute Key conforming to the
+ // "cpu.logical_number" semantic conventions. It represents the logical CPU
+ // number [0..n-1].
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1
+ CPULogicalNumberKey = attribute.Key("cpu.logical_number")
+
+ // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic
+ // conventions. It represents the mode of the CPU.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "user", "system"
+ CPUModeKey = attribute.Key("cpu.mode")
+)
+
+// CPULogicalNumber returns an attribute KeyValue conforming to the
+// "cpu.logical_number" semantic conventions. It represents the logical CPU
+// number [0..n-1].
+func CPULogicalNumber(val int) attribute.KeyValue {
+ return CPULogicalNumberKey.Int(val)
+}
+
+// Enum values for cpu.mode
+var (
+ // User
+ // Stability: release_candidate
+ CPUModeUser = CPUModeKey.String("user")
+ // System
+ // Stability: release_candidate
+ CPUModeSystem = CPUModeKey.String("system")
+ // Nice
+ // Stability: release_candidate
+ CPUModeNice = CPUModeKey.String("nice")
+ // Idle
+ // Stability: release_candidate
+ CPUModeIdle = CPUModeKey.String("idle")
+ // IO Wait
+ // Stability: release_candidate
+ CPUModeIOWait = CPUModeKey.String("iowait")
+ // Interrupt
+ // Stability: release_candidate
+ CPUModeInterrupt = CPUModeKey.String("interrupt")
+ // Steal
+ // Stability: release_candidate
+ CPUModeSteal = CPUModeKey.String("steal")
+)
+
+// Namespace: db
+const (
+ // DBClientConnectionPoolNameKey is the attribute Key conforming to the
+ // "db.client.connection.pool.name" semantic conventions. It represents the name
+ // of the connection pool; unique within the instrumented application. In case
+ // the connection pool implementation doesn't provide a name, instrumentation
+ // SHOULD use a combination of parameters that would make the name unique, for
+ // example, combining attributes `server.address`, `server.port`, and
+ // `db.namespace`, formatted as `server.address:server.port/db.namespace`.
+ // Instrumentations that generate connection pool name following different
+ // patterns SHOULD document it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myDataSource"
+ DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name")
+
+ // DBClientConnectionStateKey is the attribute Key conforming to the
+ // "db.client.connection.state" semantic conventions. It represents the state of
+ // a connection in the pool.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "idle"
+ DBClientConnectionStateKey = attribute.Key("db.client.connection.state")
+
+ // DBCollectionNameKey is the attribute Key conforming to the
+ // "db.collection.name" semantic conventions. It represents the name of a
+ // collection (table, container) within the database.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "public.users", "customers"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // The collection name SHOULD NOT be extracted from `db.query.text`,
+ // when the database system supports query text with multiple collections
+ // in non-batch operations.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // collection name then that collection name SHOULD be used.
+ DBCollectionNameKey = attribute.Key("db.collection.name")
+
+ // DBNamespaceKey is the attribute Key conforming to the "db.namespace" semantic
+ // conventions. It represents the name of the database, fully qualified within
+ // the server address and port.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "customers", "test.users"
+ // Note: If a database system has multiple namespace components, they SHOULD be
+ // concatenated from the most general to the most specific namespace component,
+ // using `|` as a separator between the components. Any missing components (and
+ // their associated separators) SHOULD be omitted.
+ // Semantic conventions for individual database systems SHOULD document what
+ // `db.namespace` means in the context of that system.
+ // It is RECOMMENDED to capture the value as provided by the application without
+ // attempting to do any case normalization.
+ DBNamespaceKey = attribute.Key("db.namespace")
+
+ // DBOperationBatchSizeKey is the attribute Key conforming to the
+ // "db.operation.batch.size" semantic conventions. It represents the number of
+ // database operations included in a batch operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 2, 3, 4
+ // Note: Except for empty batch requests described below, a batch operation
+ // contains two
+ // or more database operations explicitly submitted as separate operations in a
+ // single
+ // client call, protocol message, or database command.
+ //
+ // Requests to batch APIs that contain only one operation SHOULD be modeled as
+ // single
+ // operations, not as batch operations.
+ //
+ // A database call is not a batch operation solely because one operation accepts
+ // multiple operands, such as keys, rows, documents, points, or other data
+ // elements,
+ // including Redis [`MGET`] with
+ // multiple keys.
+ //
+ // In batch APIs that execute the same parameterized operation with parameter
+ // sets,
+ // each parameter set represents one database operation for determining whether
+ // the
+ // request is a batch operation. Requests with only one parameter set SHOULD be
+ // modeled
+ // as single operations, not as batch operations.
+ //
+ // `db.operation.batch.size` SHOULD be set to the number of operations in the
+ // batch.
+ // It SHOULD NOT be set for non-batch operations.
+ //
+ // A request to execute a batch operation with no operations SHOULD also be
+ // treated
+ // as a batch operation, and `db.operation.batch.size` SHOULD be set to `0`.
+ //
+ // [`MGET`]: https://redis.io/docs/latest/commands/mget/
+ DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size")
+
+ // DBOperationNameKey is the attribute Key conforming to the "db.operation.name"
+ // semantic conventions. It represents the name of the operation or command
+ // being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "findAndModify", "HMSET", "SELECT"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // The operation name SHOULD NOT be extracted from `db.query.text`,
+ // when the database system supports query text with multiple operations
+ // in non-batch operations.
+ //
+ // If spaces can occur in the operation name, multiple consecutive spaces
+ // SHOULD be normalized to a single space.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // operation name
+ // then that operation name SHOULD be used prepended by `BATCH `,
+ // otherwise `db.operation.name` SHOULD be `BATCH` or some other database
+ // system specific term if more applicable.
+ DBOperationNameKey = attribute.Key("db.operation.name")
+
+ // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary"
+ // semantic conventions. It represents the low cardinality summary of a database
+ // query.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get
+ // user by id"
+ // Note: The query summary describes a class of database queries and is useful
+ // as a grouping key, especially when analyzing telemetry for database
+ // calls involving complex queries.
+ //
+ // Summary may be available to the instrumentation through
+ // instrumentation hooks or other means. If it is not available,
+ // instrumentations
+ // that support query parsing SHOULD generate a summary following
+ // [Generating query summary]
+ // section.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // query summary
+ // then that query summary SHOULD be used prepended by `BATCH `,
+ // otherwise `db.query.summary` SHOULD be `BATCH` or some other database
+ // system specific term if more applicable.
+ //
+ // [Generating query summary]: /docs/db/database-spans.md#generating-a-summary-of-the-query
+ DBQuerySummaryKey = attribute.Key("db.query.summary")
+
+ // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
+ // semantic conventions. It represents the database query being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?"
+ // Note: For sanitization see [Sanitization of `db.query.text`].
+ // For batch operations, if the individual operations are known to have the same
+ // query text then that query text SHOULD be used, otherwise all of the
+ // individual query texts SHOULD be concatenated with separator `; ` or some
+ // other database system specific separator if more applicable.
+ // Parameterized query text SHOULD NOT be sanitized. Even though parameterized
+ // query text can potentially have sensitive data, by using a parameterized
+ // query the user is giving a strong signal that any sensitive data will be
+ // passed as parameter values, and the benefit to observability of capturing the
+ // static part of the query text by default outweighs the risk.
+ //
+ // [Sanitization of `db.query.text`]: /docs/db/database-spans.md#sanitization-of-dbquerytext
+ DBQueryTextKey = attribute.Key("db.query.text")
+
+ // DBResponseReturnedRowsKey is the attribute Key conforming to the
+ // "db.response.returned_rows" semantic conventions. It represents the number of
+ // rows returned by the operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 10, 30, 1000
+ DBResponseReturnedRowsKey = attribute.Key("db.response.returned_rows")
+
+ // DBResponseStatusCodeKey is the attribute Key conforming to the
+ // "db.response.status_code" semantic conventions. It represents the database
+ // response status code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "102", "ORA-17002", "08P01", "404"
+ // Note: The status code returned by the database. Usually it represents an
+ // error code, but may also represent partial success, warning, or differentiate
+ // between various types of successful outcomes.
+ // Semantic conventions for individual database systems SHOULD document what
+ // `db.response.status_code` means in the context of that system.
+ DBResponseStatusCodeKey = attribute.Key("db.response.status_code")
+
+ // DBStoredProcedureNameKey is the attribute Key conforming to the
+ // "db.stored_procedure.name" semantic conventions. It represents the name of a
+ // stored procedure within the database.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GetCustomer"
+ // Note: It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ //
+ // For batch operations, if the individual operations are known to have the same
+ // stored procedure name then that stored procedure name SHOULD be used.
+ DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name")
+
+ // DBSystemNameKey is the attribute Key conforming to the "db.system.name"
+ // semantic conventions. It represents the database management system (DBMS)
+ // product as identified by the client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ // Note: The actual DBMS may differ from the one identified by the client. For
+ // example, when using PostgreSQL client libraries to connect to a CockroachDB,
+ // the `db.system.name` is set to `postgresql` based on the instrumentation's
+ // best knowledge.
+ DBSystemNameKey = attribute.Key("db.system.name")
+)
+
+// DBClientConnectionPoolName returns an attribute KeyValue conforming to the
+// "db.client.connection.pool.name" semantic conventions. It represents the name
+// of the connection pool; unique within the instrumented application. In case
+// the connection pool implementation doesn't provide a name, instrumentation
+// SHOULD use a combination of parameters that would make the name unique, for
+// example, combining attributes `server.address`, `server.port`, and
+// `db.namespace`, formatted as `server.address:server.port/db.namespace`.
+// Instrumentations that generate connection pool name following different
+// patterns SHOULD document it.
+func DBClientConnectionPoolName(val string) attribute.KeyValue {
+ return DBClientConnectionPoolNameKey.String(val)
+}
+
+// DBCollectionName returns an attribute KeyValue conforming to the
+// "db.collection.name" semantic conventions. It represents the name of a
+// collection (table, container) within the database.
+func DBCollectionName(val string) attribute.KeyValue {
+ return DBCollectionNameKey.String(val)
+}
+
+// DBNamespace returns an attribute KeyValue conforming to the "db.namespace"
+// semantic conventions. It represents the name of the database, fully qualified
+// within the server address and port.
+func DBNamespace(val string) attribute.KeyValue {
+ return DBNamespaceKey.String(val)
+}
+
+// DBOperationBatchSize returns an attribute KeyValue conforming to the
+// "db.operation.batch.size" semantic conventions. It represents the number of
+// database operations included in a batch operation.
+func DBOperationBatchSize(val int) attribute.KeyValue {
+ return DBOperationBatchSizeKey.Int(val)
+}
+
+// DBOperationName returns an attribute KeyValue conforming to the
+// "db.operation.name" semantic conventions. It represents the name of the
+// operation or command being executed.
+func DBOperationName(val string) attribute.KeyValue {
+ return DBOperationNameKey.String(val)
+}
+
+// DBOperationParameter returns an attribute KeyValue conforming to the
+// "db.operation.parameter" semantic conventions. It represents a database
+// operation parameter, with `` being the parameter name, and the attribute
+// value being a string representation of the parameter value.
+func DBOperationParameter(key string, val string) attribute.KeyValue {
+ return attribute.String("db.operation.parameter."+key, val)
+}
+
+// DBQueryParameter returns an attribute KeyValue conforming to the
+// "db.query.parameter" semantic conventions. It represents a database query
+// parameter, with `` being the parameter name, and the attribute value
+// being a string representation of the parameter value.
+func DBQueryParameter(key string, val string) attribute.KeyValue {
+ return attribute.String("db.query.parameter."+key, val)
+}
+
+// DBQuerySummary returns an attribute KeyValue conforming to the
+// "db.query.summary" semantic conventions. It represents the low cardinality
+// summary of a database query.
+func DBQuerySummary(val string) attribute.KeyValue {
+ return DBQuerySummaryKey.String(val)
+}
+
+// DBQueryText returns an attribute KeyValue conforming to the "db.query.text"
+// semantic conventions. It represents the database query being executed.
+func DBQueryText(val string) attribute.KeyValue {
+ return DBQueryTextKey.String(val)
+}
+
+// DBResponseReturnedRows returns an attribute KeyValue conforming to the
+// "db.response.returned_rows" semantic conventions. It represents the number of
+// rows returned by the operation.
+func DBResponseReturnedRows(val int) attribute.KeyValue {
+ return DBResponseReturnedRowsKey.Int(val)
+}
+
+// DBResponseStatusCode returns an attribute KeyValue conforming to the
+// "db.response.status_code" semantic conventions. It represents the database
+// response status code.
+func DBResponseStatusCode(val string) attribute.KeyValue {
+ return DBResponseStatusCodeKey.String(val)
+}
+
+// DBStoredProcedureName returns an attribute KeyValue conforming to the
+// "db.stored_procedure.name" semantic conventions. It represents the name of a
+// stored procedure within the database.
+func DBStoredProcedureName(val string) attribute.KeyValue {
+ return DBStoredProcedureNameKey.String(val)
+}
+
+// Enum values for db.client.connection.state
+var (
+ // idle
+ // Stability: development
+ DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle")
+ // used
+ // Stability: development
+ DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used")
+)
+
+// Enum values for db.system.name
+var (
+ // Some other SQL database. Fallback only.
+ // Stability: development
+ DBSystemNameOtherSQL = DBSystemNameKey.String("other_sql")
+ // [Adabas (Adaptable Database System)]
+ // Stability: development
+ //
+ // [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas
+ DBSystemNameSoftwareagAdabas = DBSystemNameKey.String("softwareag.adabas")
+ // [Actian Ingres]
+ // Stability: development
+ //
+ // [Actian Ingres]: https://www.actian.com/databases/ingres/
+ DBSystemNameActianIngres = DBSystemNameKey.String("actian.ingres")
+ // [Amazon DynamoDB]
+ // Stability: development
+ //
+ // [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/
+ DBSystemNameAWSDynamoDB = DBSystemNameKey.String("aws.dynamodb")
+ // [Amazon Redshift]
+ // Stability: development
+ //
+ // [Amazon Redshift]: https://aws.amazon.com/redshift/
+ DBSystemNameAWSRedshift = DBSystemNameKey.String("aws.redshift")
+ // [Azure Cosmos DB]
+ // Stability: development
+ //
+ // [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db
+ DBSystemNameAzureCosmosDB = DBSystemNameKey.String("azure.cosmosdb")
+ // [InterSystems Caché]
+ // Stability: development
+ //
+ // [InterSystems Caché]: https://www.intersystems.com/products/cache/
+ DBSystemNameIntersystemsCache = DBSystemNameKey.String("intersystems.cache")
+ // [Apache Cassandra]
+ // Stability: development
+ //
+ // [Apache Cassandra]: https://cassandra.apache.org/
+ DBSystemNameCassandra = DBSystemNameKey.String("cassandra")
+ // [ClickHouse]
+ // Stability: development
+ //
+ // [ClickHouse]: https://clickhouse.com/
+ DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse")
+ // [CockroachDB]
+ // Stability: development
+ //
+ // [CockroachDB]: https://www.cockroachlabs.com/
+ DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb")
+ // [Couchbase]
+ // Stability: development
+ //
+ // [Couchbase]: https://www.couchbase.com/
+ DBSystemNameCouchbase = DBSystemNameKey.String("couchbase")
+ // [Apache CouchDB]
+ // Stability: development
+ //
+ // [Apache CouchDB]: https://couchdb.apache.org/
+ DBSystemNameCouchDB = DBSystemNameKey.String("couchdb")
+ // [Apache Derby]
+ // Stability: development
+ //
+ // [Apache Derby]: https://db.apache.org/derby/
+ DBSystemNameDerby = DBSystemNameKey.String("derby")
+ // [Elasticsearch]
+ // Stability: development
+ //
+ // [Elasticsearch]: https://www.elastic.co/elasticsearch
+ DBSystemNameElasticsearch = DBSystemNameKey.String("elasticsearch")
+ // [Firebird]
+ // Stability: development
+ //
+ // [Firebird]: https://www.firebirdsql.org/
+ DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql")
+ // [Google Cloud Spanner]
+ // Stability: development
+ //
+ // [Google Cloud Spanner]: https://cloud.google.com/spanner
+ DBSystemNameGCPSpanner = DBSystemNameKey.String("gcp.spanner")
+ // [Apache Geode]
+ // Stability: development
+ //
+ // [Apache Geode]: https://geode.apache.org/
+ DBSystemNameGeode = DBSystemNameKey.String("geode")
+ // [H2 Database]
+ // Stability: development
+ //
+ // [H2 Database]: https://h2database.com/
+ DBSystemNameH2database = DBSystemNameKey.String("h2database")
+ // [Apache HBase]
+ // Stability: development
+ //
+ // [Apache HBase]: https://hbase.apache.org/
+ DBSystemNameHBase = DBSystemNameKey.String("hbase")
+ // [Apache Hive]
+ // Stability: development
+ //
+ // [Apache Hive]: https://hive.apache.org/
+ DBSystemNameHive = DBSystemNameKey.String("hive")
+ // [HyperSQL Database]
+ // Stability: development
+ //
+ // [HyperSQL Database]: https://hsqldb.org/
+ DBSystemNameHSQLDB = DBSystemNameKey.String("hsqldb")
+ // [IBM Db2]
+ // Stability: development
+ //
+ // [IBM Db2]: https://www.ibm.com/db2
+ DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2")
+ // [IBM Informix]
+ // Stability: development
+ //
+ // [IBM Informix]: https://www.ibm.com/products/informix
+ DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix")
+ // [IBM Netezza]
+ // Stability: development
+ //
+ // [IBM Netezza]: https://www.ibm.com/products/netezza
+ DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza")
+ // [InfluxDB]
+ // Stability: development
+ //
+ // [InfluxDB]: https://www.influxdata.com/
+ DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb")
+ // [Instant]
+ // Stability: development
+ //
+ // [Instant]: https://www.instantdb.com/
+ DBSystemNameInstantDB = DBSystemNameKey.String("instantdb")
+ // [MariaDB]
+ // Stability: stable
+ //
+ // [MariaDB]: https://mariadb.org/
+ DBSystemNameMariaDB = DBSystemNameKey.String("mariadb")
+ // [Memcached]
+ // Stability: development
+ //
+ // [Memcached]: https://memcached.org/
+ DBSystemNameMemcached = DBSystemNameKey.String("memcached")
+ // [MongoDB]
+ // Stability: development
+ //
+ // [MongoDB]: https://www.mongodb.com/
+ DBSystemNameMongoDB = DBSystemNameKey.String("mongodb")
+ // [Microsoft SQL Server]
+ // Stability: stable
+ //
+ // [Microsoft SQL Server]: https://www.microsoft.com/sql-server
+ DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server")
+ // [MySQL]
+ // Stability: stable
+ //
+ // [MySQL]: https://www.mysql.com/
+ DBSystemNameMySQL = DBSystemNameKey.String("mysql")
+ // [Neo4j]
+ // Stability: development
+ //
+ // [Neo4j]: https://neo4j.com/
+ DBSystemNameNeo4j = DBSystemNameKey.String("neo4j")
+ // [OpenSearch]
+ // Stability: development
+ //
+ // [OpenSearch]: https://opensearch.org/
+ DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch")
+ // [Oracle Database]
+ // Stability: development
+ //
+ // [Oracle Database]: https://www.oracle.com/database/
+ DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db")
+ // [PostgreSQL]
+ // Stability: stable
+ //
+ // [PostgreSQL]: https://www.postgresql.org/
+ DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql")
+ // [Redis]
+ // Stability: development
+ //
+ // [Redis]: https://redis.io/
+ DBSystemNameRedis = DBSystemNameKey.String("redis")
+ // [SAP HANA]
+ // Stability: development
+ //
+ // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html
+ DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana")
+ // [SAP MaxDB]
+ // Stability: development
+ //
+ // [SAP MaxDB]: https://maxdb.sap.com/
+ DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb")
+ // [SQLite]
+ // Stability: development
+ //
+ // [SQLite]: https://www.sqlite.org/
+ DBSystemNameSQLite = DBSystemNameKey.String("sqlite")
+ // [Teradata]
+ // Stability: development
+ //
+ // [Teradata]: https://www.teradata.com/
+ DBSystemNameTeradata = DBSystemNameKey.String("teradata")
+ // [Trino]
+ // Stability: development
+ //
+ // [Trino]: https://trino.io/
+ DBSystemNameTrino = DBSystemNameKey.String("trino")
+)
+
+// Namespace: deployment
+const (
+ // DeploymentEnvironmentNameKey is the attribute Key conforming to the
+ // "deployment.environment.name" semantic conventions. It represents the name of
+ // the [deployment environment] (aka deployment tier).
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "staging", "production"
+ // Note: `deployment.environment.name` does not affect the uniqueness
+ // constraints defined through
+ // the `service.namespace`, `service.name` and `service.instance.id` resource
+ // attributes.
+ // This implies that resources carrying the following attribute combinations
+ // MUST be
+ // considered to be identifying the same service:
+ //
+ // - `service.name=frontend`, `deployment.environment.name=production`
+ // - `service.name=frontend`, `deployment.environment.name=staging`.
+ //
+ //
+ // [deployment environment]: https://wikipedia.org/wiki/Deployment_environment
+ DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name")
+
+ // DeploymentIDKey is the attribute Key conforming to the "deployment.id"
+ // semantic conventions. It represents the id of the deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1208"
+ DeploymentIDKey = attribute.Key("deployment.id")
+
+ // DeploymentNameKey is the attribute Key conforming to the "deployment.name"
+ // semantic conventions. It represents the name of the deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "deploy my app", "deploy-frontend"
+ DeploymentNameKey = attribute.Key("deployment.name")
+
+ // DeploymentStatusKey is the attribute Key conforming to the
+ // "deployment.status" semantic conventions. It represents the status of the
+ // deployment.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ DeploymentStatusKey = attribute.Key("deployment.status")
+)
+
+// DeploymentID returns an attribute KeyValue conforming to the "deployment.id"
+// semantic conventions. It represents the id of the deployment.
+func DeploymentID(val string) attribute.KeyValue {
+ return DeploymentIDKey.String(val)
+}
+
+// DeploymentName returns an attribute KeyValue conforming to the
+// "deployment.name" semantic conventions. It represents the name of the
+// deployment.
+func DeploymentName(val string) attribute.KeyValue {
+ return DeploymentNameKey.String(val)
+}
+
+// Enum values for deployment.environment.name
+var (
+ // Production environment
+ // Stability: stable
+ DeploymentEnvironmentNameProduction = DeploymentEnvironmentNameKey.String("production")
+ // Staging environment
+ // Stability: stable
+ DeploymentEnvironmentNameStaging = DeploymentEnvironmentNameKey.String("staging")
+ // Testing environment
+ // Stability: stable
+ DeploymentEnvironmentNameTest = DeploymentEnvironmentNameKey.String("test")
+ // Development environment
+ // Stability: stable
+ DeploymentEnvironmentNameDevelopment = DeploymentEnvironmentNameKey.String("development")
+)
+
+// Enum values for deployment.status
+var (
+ // failed
+ // Stability: development
+ DeploymentStatusFailed = DeploymentStatusKey.String("failed")
+ // succeeded
+ // Stability: development
+ DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded")
+)
+
+// Namespace: destination
+const (
+ // DestinationAddressKey is the attribute Key conforming to the
+ // "destination.address" semantic conventions. It represents the destination
+ // address - domain name if available without reverse DNS lookup; otherwise, IP
+ // address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "destination.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the source side, and when communicating through an
+ // intermediary, `destination.address` SHOULD represent the destination address
+ // behind any intermediaries, for example proxies, if it's available.
+ DestinationAddressKey = attribute.Key("destination.address")
+
+ // DestinationPortKey is the attribute Key conforming to the "destination.port"
+ // semantic conventions. It represents the destination port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3389, 2888
+ DestinationPortKey = attribute.Key("destination.port")
+)
+
+// DestinationAddress returns an attribute KeyValue conforming to the
+// "destination.address" semantic conventions. It represents the destination
+// address - domain name if available without reverse DNS lookup; otherwise, IP
+// address or Unix domain socket name.
+func DestinationAddress(val string) attribute.KeyValue {
+ return DestinationAddressKey.String(val)
+}
+
+// DestinationPort returns an attribute KeyValue conforming to the
+// "destination.port" semantic conventions. It represents the destination port
+// number.
+func DestinationPort(val int) attribute.KeyValue {
+ return DestinationPortKey.Int(val)
+}
+
+// Namespace: device
+const (
+ // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
+ // conventions. It represents a unique identifier representing the device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "123456789012345", "01:23:45:67:89:AB"
+ // Note: Its value SHOULD be identical for all apps on a device and it SHOULD
+ // NOT change if an app is uninstalled and re-installed.
+ // However, it might be resettable by the user for all apps on a device.
+ // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be
+ // used as values.
+ //
+ // More information about Android identifier best practices can be found in the
+ // [Android user data IDs guide].
+ //
+ // > [!WARNING]> This attribute may contain sensitive (PII) information. Caution
+ // > should be taken when storing personal data or anything which can identify a
+ // > user. GDPR and data protection laws may apply,
+ // > ensure you do your own due diligence.> Due to these reasons, this
+ // > identifier is not recommended for consumer applications and will likely
+ // > result in rejection from both Google Play and App Store.
+ // > However, it may be appropriate for specific enterprise scenarios, such as
+ // > kiosk devices or enterprise-managed devices, with appropriate compliance
+ // > clearance.
+ // > Any instrumentation providing this identifier MUST implement it as an
+ // > opt-in feature.> See [`app.installation.id`]> for a more
+ // > privacy-preserving alternative.
+ //
+ // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids
+ // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id
+ DeviceIDKey = attribute.Key("device.id")
+
+ // DeviceManufacturerKey is the attribute Key conforming to the
+ // "device.manufacturer" semantic conventions. It represents the name of the
+ // device manufacturer.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Apple", "Samsung"
+ // Note: The Android OS provides this field via [Build]. iOS apps SHOULD
+ // hardcode the value `Apple`.
+ //
+ // [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER
+ DeviceManufacturerKey = attribute.Key("device.manufacturer")
+
+ // DeviceModelIdentifierKey is the attribute Key conforming to the
+ // "device.model.identifier" semantic conventions. It represents the model
+ // identifier for the device.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iPhone3,4", "SM-G920F"
+ // Note: It's recommended this value represents a machine-readable version of
+ // the model identifier rather than the market or consumer-friendly name of the
+ // device.
+ DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
+
+ // DeviceModelNameKey is the attribute Key conforming to the "device.model.name"
+ // semantic conventions. It represents the marketing name for the device model.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iPhone 6s Plus", "Samsung Galaxy S6"
+ // Note: It's recommended this value represents a human-readable version of the
+ // device model rather than a machine-readable alternative.
+ DeviceModelNameKey = attribute.Key("device.model.name")
+)
+
+// DeviceID returns an attribute KeyValue conforming to the "device.id" semantic
+// conventions. It represents a unique identifier representing the device.
+func DeviceID(val string) attribute.KeyValue {
+ return DeviceIDKey.String(val)
+}
+
+// DeviceManufacturer returns an attribute KeyValue conforming to the
+// "device.manufacturer" semantic conventions. It represents the name of the
+// device manufacturer.
+func DeviceManufacturer(val string) attribute.KeyValue {
+ return DeviceManufacturerKey.String(val)
+}
+
+// DeviceModelIdentifier returns an attribute KeyValue conforming to the
+// "device.model.identifier" semantic conventions. It represents the model
+// identifier for the device.
+func DeviceModelIdentifier(val string) attribute.KeyValue {
+ return DeviceModelIdentifierKey.String(val)
+}
+
+// DeviceModelName returns an attribute KeyValue conforming to the
+// "device.model.name" semantic conventions. It represents the marketing name for
+// the device model.
+func DeviceModelName(val string) attribute.KeyValue {
+ return DeviceModelNameKey.String(val)
+}
+
+// Namespace: disk
+const (
+ // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction"
+ // semantic conventions. It represents the disk IO operation direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "read"
+ DiskIODirectionKey = attribute.Key("disk.io.direction")
+)
+
+// Enum values for disk.io.direction
+var (
+ // read
+ // Stability: release_candidate
+ DiskIODirectionRead = DiskIODirectionKey.String("read")
+ // write
+ // Stability: release_candidate
+ DiskIODirectionWrite = DiskIODirectionKey.String("write")
+)
+
+// Namespace: dns
+const (
+ // DNSAnswersKey is the attribute Key conforming to the "dns.answers" semantic
+ // conventions. It represents the list of IPv4 or IPv6 addresses resolved during
+ // DNS lookup.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
+ DNSAnswersKey = attribute.Key("dns.answers")
+
+ // DNSQuestionNameKey is the attribute Key conforming to the "dns.question.name"
+ // semantic conventions. It represents the name being queried.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "www.example.com", "opentelemetry.io"
+ // Note: The name represents the queried domain name as it appears in the DNS
+ // query without any additional normalization.
+ DNSQuestionNameKey = attribute.Key("dns.question.name")
+)
+
+// DNSAnswers returns an attribute KeyValue conforming to the "dns.answers"
+// semantic conventions. It represents the list of IPv4 or IPv6 addresses
+// resolved during DNS lookup.
+func DNSAnswers(val ...string) attribute.KeyValue {
+ return DNSAnswersKey.StringSlice(val)
+}
+
+// DNSQuestionName returns an attribute KeyValue conforming to the
+// "dns.question.name" semantic conventions. It represents the name being
+// queried.
+func DNSQuestionName(val string) attribute.KeyValue {
+ return DNSQuestionNameKey.String(val)
+}
+
+// Namespace: elasticsearch
+const (
+ // ElasticsearchNodeNameKey is the attribute Key conforming to the
+ // "elasticsearch.node.name" semantic conventions. It represents the represents
+ // the human-readable identifier of the node/instance to which a request was
+ // routed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "instance-0000000001"
+ ElasticsearchNodeNameKey = attribute.Key("elasticsearch.node.name")
+)
+
+// ElasticsearchNodeName returns an attribute KeyValue conforming to the
+// "elasticsearch.node.name" semantic conventions. It represents the represents
+// the human-readable identifier of the node/instance to which a request was
+// routed.
+func ElasticsearchNodeName(val string) attribute.KeyValue {
+ return ElasticsearchNodeNameKey.String(val)
+}
+
+// Namespace: enduser
+const (
+ // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic
+ // conventions. It represents the unique identifier of an end user in the
+ // system. It maybe a username, email address, or other identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "username"
+ // Note: Unique identifier of an end user in the system.
+ //
+ // > [!Warning]
+ // > This field contains sensitive (PII) information.
+ EnduserIDKey = attribute.Key("enduser.id")
+
+ // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id"
+ // semantic conventions. It represents the pseudonymous identifier of an end
+ // user. This identifier should be a random value that is not directly linked or
+ // associated with the end user's actual identity.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "QdH5CAWJgqVT4rOr0qtumf"
+ // Note: Pseudonymous identifier of an end user.
+ //
+ // > [!Warning]
+ // > This field contains sensitive (linkable PII) information.
+ EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id")
+)
+
+// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
+// semantic conventions. It represents the unique identifier of an end user in
+// the system. It maybe a username, email address, or other identifier.
+func EnduserID(val string) attribute.KeyValue {
+ return EnduserIDKey.String(val)
+}
+
+// EnduserPseudoID returns an attribute KeyValue conforming to the
+// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous
+// identifier of an end user. This identifier should be a random value that is
+// not directly linked or associated with the end user's actual identity.
+func EnduserPseudoID(val string) attribute.KeyValue {
+ return EnduserPseudoIDKey.String(val)
+}
+
+// Namespace: error
+const (
+ // ErrorTypeKey is the attribute Key conforming to the "error.type" semantic
+ // conventions. It represents the describes a class of error the operation ended
+ // with.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "timeout", "java.net.UnknownHostException",
+ // "server_certificate_invalid", "500"
+ // Note: The `error.type` SHOULD be predictable, and SHOULD have low
+ // cardinality.
+ //
+ // When `error.type` is set to a type (e.g., an exception type), its
+ // canonical class name identifying the type within the artifact SHOULD be used.
+ //
+ // If the recorded error type is a wrapper that is not meaningful for
+ // failure classification, instrumentation MAY use the type of the inner
+ // error instead. For example, in Go, errors created with `fmt.Errorf`
+ // using `%w` MAY be unwrapped when the wrapper type does not help
+ // classify the failure.
+ //
+ // Instrumentations SHOULD document the list of errors they report.
+ //
+ // The cardinality of `error.type` within one instrumentation library SHOULD be
+ // low.
+ // Telemetry consumers that aggregate data from multiple instrumentation
+ // libraries and applications
+ // should be prepared for `error.type` to have high cardinality at query time
+ // when no
+ // additional filters are applied.
+ //
+ // If the operation has completed successfully, instrumentations SHOULD NOT set
+ // `error.type`.
+ //
+ // If a specific domain defines its own set of error identifiers (such as HTTP
+ // or RPC status codes),
+ // it's RECOMMENDED to:
+ //
+ // - Use a domain-specific attribute
+ // - Set `error.type` to capture all errors, regardless of whether they are
+ // defined within the domain-specific set or not.
+ ErrorTypeKey = attribute.Key("error.type")
+)
+
+// Enum values for error.type
+var (
+ // A fallback error value to be used when the instrumentation doesn't define a
+ // custom value.
+ //
+ // Stability: stable
+ ErrorTypeOther = ErrorTypeKey.String("_OTHER")
+)
+
+// Namespace: exception
+const (
+ // ExceptionMessageKey is the attribute Key conforming to the
+ // "exception.message" semantic conventions. It represents the exception
+ // message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "Division by zero", "Can't convert 'int' object to str implicitly"
+ // Note: > [!WARNING]
+ //
+ // > This attribute may contain sensitive information.
+ ExceptionMessageKey = attribute.Key("exception.message")
+
+ // ExceptionStacktraceKey is the attribute Key conforming to the
+ // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+ // string in the natural representation for the language runtime. The
+ // representation is to be determined and documented by each language SIG.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: Exception in thread "main" java.lang.RuntimeException: Test
+ // exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at
+ // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at
+ // com.example.GenerateTrace.main(GenerateTrace.java:5)
+ ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
+
+ // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
+ // semantic conventions. It represents the type of the exception (its
+ // fully-qualified class name, if applicable). The dynamic type of the exception
+ // should be preferred over the static type in languages that support it.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "java.net.ConnectException", "OSError"
+ // Note: If the recorded exception type is a wrapper that is not meaningful for
+ // failure classification, instrumentation MAY use the type of the inner
+ // exception instead. For example, in Go, errors created with `fmt.Errorf`
+ // using `%w` MAY be unwrapped when the wrapper type does not help
+ // classify the failure.
+ ExceptionTypeKey = attribute.Key("exception.type")
+)
+
+// ExceptionMessage returns an attribute KeyValue conforming to the
+// "exception.message" semantic conventions. It represents the exception message.
+func ExceptionMessage(val string) attribute.KeyValue {
+ return ExceptionMessageKey.String(val)
+}
+
+// ExceptionStacktrace returns an attribute KeyValue conforming to the
+// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+// string in the natural representation for the language runtime. The
+// representation is to be determined and documented by each language SIG.
+func ExceptionStacktrace(val string) attribute.KeyValue {
+ return ExceptionStacktraceKey.String(val)
+}
+
+// ExceptionType returns an attribute KeyValue conforming to the "exception.type"
+// semantic conventions. It represents the type of the exception (its
+// fully-qualified class name, if applicable). The dynamic type of the exception
+// should be preferred over the static type in languages that support it.
+func ExceptionType(val string) attribute.KeyValue {
+ return ExceptionTypeKey.String(val)
+}
+
+// Namespace: faas
+const (
+ // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
+ // semantic conventions. It represents a boolean that is true if the serverless
+ // function is executed for the first time (aka cold-start).
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSColdstartKey = attribute.Key("faas.coldstart")
+
+ // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
+ // conventions. It represents a string containing the schedule period as
+ // [Cron Expression].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0/5 * * * ? *
+ //
+ // [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
+ FaaSCronKey = attribute.Key("faas.cron")
+
+ // FaaSDocumentCollectionKey is the attribute Key conforming to the
+ // "faas.document.collection" semantic conventions. It represents the name of
+ // the source on which the triggering operation was performed. For example, in
+ // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
+ // database name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myBucketName", "myDbName"
+ FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
+
+ // FaaSDocumentNameKey is the attribute Key conforming to the
+ // "faas.document.name" semantic conventions. It represents the document
+ // name/table subjected to the operation. For example, in Cloud Storage or S3 is
+ // the name of the file, and in Cosmos DB the table name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "myFile.txt", "myTableName"
+ FaaSDocumentNameKey = attribute.Key("faas.document.name")
+
+ // FaaSDocumentOperationKey is the attribute Key conforming to the
+ // "faas.document.operation" semantic conventions. It represents the describes
+ // the type of the operation that was performed on the data.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
+
+ // FaaSDocumentTimeKey is the attribute Key conforming to the
+ // "faas.document.time" semantic conventions. It represents a string containing
+ // the time when the data was accessed in the [ISO 8601] format expressed in
+ // [UTC].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 2020-01-23T13:47:06Z
+ //
+ // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+ // [UTC]: https://www.w3.org/TR/NOTE-datetime
+ FaaSDocumentTimeKey = attribute.Key("faas.document.time")
+
+ // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
+ // semantic conventions. It represents the execution environment ID as a string,
+ // that will be potentially reused for other invocations to the same
+ // function/function version.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de"
+ // Note: - **AWS Lambda:** Use the (full) log stream name.
+ FaaSInstanceKey = attribute.Key("faas.instance")
+
+ // FaaSInvocationIDKey is the attribute Key conforming to the
+ // "faas.invocation_id" semantic conventions. It represents the invocation ID of
+ // the current function invocation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28
+ FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
+
+ // FaaSInvokedNameKey is the attribute Key conforming to the "faas.invoked_name"
+ // semantic conventions. It represents the name of the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: my-function
+ // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked
+ // function.
+ FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
+
+ // FaaSInvokedProviderKey is the attribute Key conforming to the
+ // "faas.invoked_provider" semantic conventions. It represents the cloud
+ // provider of the invoked function.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
+ // invoked function.
+ FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
+
+ // FaaSInvokedRegionKey is the attribute Key conforming to the
+ // "faas.invoked_region" semantic conventions. It represents the cloud region of
+ // the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: eu-central-1
+ // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked
+ // function.
+ FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
+
+ // FaaSMaxMemoryKey is the attribute Key conforming to the "faas.max_memory"
+ // semantic conventions. It represents the amount of memory available to the
+ // serverless function converted to Bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: It's recommended to set this attribute since e.g. too little memory can
+ // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda,
+ // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this
+ // information (which must be multiplied by 1,048,576).
+ FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
+
+ // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
+ // conventions. It represents the name of the single function that this runtime
+ // instance executes.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-function", "myazurefunctionapp/some-function-name"
+ // Note: This is the name of the function as configured/deployed on the FaaS
+ // platform and is usually different from the name of the callback
+ // function (which may be stored in the
+ // [`code.namespace`/`code.function.name`]
+ // span attributes).
+ //
+ // For some cloud providers, the above definition is ambiguous. The following
+ // definition of function name MUST be used for this attribute
+ // (and consequently the span name) for the listed cloud providers/products:
+ //
+ // - **Azure:** The full name `/`, i.e., function app name
+ // followed by a forward slash followed by the function name (this form
+ // can also be seen in the resource JSON for the function).
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider (see also the `cloud.resource_id` attribute).
+ //
+ //
+ // [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes
+ FaaSNameKey = attribute.Key("faas.name")
+
+ // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
+ // conventions. It represents a string containing the function invocation time
+ // in the [ISO 8601] format expressed in [UTC].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 2020-01-23T13:47:06Z
+ //
+ // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+ // [UTC]: https://www.w3.org/TR/NOTE-datetime
+ FaaSTimeKey = attribute.Key("faas.time")
+
+ // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" semantic
+ // conventions. It represents the type of the trigger which caused this function
+ // invocation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FaaSTriggerKey = attribute.Key("faas.trigger")
+
+ // FaaSVersionKey is the attribute Key conforming to the "faas.version" semantic
+ // conventions. It represents the immutable version of the function being
+ // executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "26", "pinkfroid-00002"
+ // Note: Depending on the cloud provider and platform, use:
+ //
+ // - **AWS Lambda:** The [function version]
+ // (an integer represented as a decimal string).
+ // - **Google Cloud Run (Services):** The [revision]
+ // (i.e., the function name plus the revision suffix).
+ // - **Google Cloud Functions:** The value of the
+ // [`K_REVISION` environment variable].
+ // - **Azure Functions:** Not applicable. Do not set this attribute.
+ //
+ //
+ // [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html
+ // [revision]: https://cloud.google.com/run/docs/managing/revisions
+ // [`K_REVISION` environment variable]: https://cloud.google.com/run/docs/container-contract#services-env-vars
+ FaaSVersionKey = attribute.Key("faas.version")
+)
+
+// FaaSColdstart returns an attribute KeyValue conforming to the "faas.coldstart"
+// semantic conventions. It represents a boolean that is true if the serverless
+// function is executed for the first time (aka cold-start).
+func FaaSColdstart(val bool) attribute.KeyValue {
+ return FaaSColdstartKey.Bool(val)
+}
+
+// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" semantic
+// conventions. It represents a string containing the schedule period as
+// [Cron Expression].
+//
+// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
+func FaaSCron(val string) attribute.KeyValue {
+ return FaaSCronKey.String(val)
+}
+
+// FaaSDocumentCollection returns an attribute KeyValue conforming to the
+// "faas.document.collection" semantic conventions. It represents the name of the
+// source on which the triggering operation was performed. For example, in Cloud
+// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database
+// name.
+func FaaSDocumentCollection(val string) attribute.KeyValue {
+ return FaaSDocumentCollectionKey.String(val)
+}
+
+// FaaSDocumentName returns an attribute KeyValue conforming to the
+// "faas.document.name" semantic conventions. It represents the document
+// name/table subjected to the operation. For example, in Cloud Storage or S3 is
+// the name of the file, and in Cosmos DB the table name.
+func FaaSDocumentName(val string) attribute.KeyValue {
+ return FaaSDocumentNameKey.String(val)
+}
+
+// FaaSDocumentTime returns an attribute KeyValue conforming to the
+// "faas.document.time" semantic conventions. It represents a string containing
+// the time when the data was accessed in the [ISO 8601] format expressed in
+// [UTC].
+//
+// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+// [UTC]: https://www.w3.org/TR/NOTE-datetime
+func FaaSDocumentTime(val string) attribute.KeyValue {
+ return FaaSDocumentTimeKey.String(val)
+}
+
+// FaaSInstance returns an attribute KeyValue conforming to the "faas.instance"
+// semantic conventions. It represents the execution environment ID as a string,
+// that will be potentially reused for other invocations to the same
+// function/function version.
+func FaaSInstance(val string) attribute.KeyValue {
+ return FaaSInstanceKey.String(val)
+}
+
+// FaaSInvocationID returns an attribute KeyValue conforming to the
+// "faas.invocation_id" semantic conventions. It represents the invocation ID of
+// the current function invocation.
+func FaaSInvocationID(val string) attribute.KeyValue {
+ return FaaSInvocationIDKey.String(val)
+}
+
+// FaaSInvokedName returns an attribute KeyValue conforming to the
+// "faas.invoked_name" semantic conventions. It represents the name of the
+// invoked function.
+func FaaSInvokedName(val string) attribute.KeyValue {
+ return FaaSInvokedNameKey.String(val)
+}
+
+// FaaSInvokedRegion returns an attribute KeyValue conforming to the
+// "faas.invoked_region" semantic conventions. It represents the cloud region of
+// the invoked function.
+func FaaSInvokedRegion(val string) attribute.KeyValue {
+ return FaaSInvokedRegionKey.String(val)
+}
+
+// FaaSMaxMemory returns an attribute KeyValue conforming to the
+// "faas.max_memory" semantic conventions. It represents the amount of memory
+// available to the serverless function converted to Bytes.
+func FaaSMaxMemory(val int) attribute.KeyValue {
+ return FaaSMaxMemoryKey.Int(val)
+}
+
+// FaaSName returns an attribute KeyValue conforming to the "faas.name" semantic
+// conventions. It represents the name of the single function that this runtime
+// instance executes.
+func FaaSName(val string) attribute.KeyValue {
+ return FaaSNameKey.String(val)
+}
+
+// FaaSTime returns an attribute KeyValue conforming to the "faas.time" semantic
+// conventions. It represents a string containing the function invocation time in
+// the [ISO 8601] format expressed in [UTC].
+//
+// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html
+// [UTC]: https://www.w3.org/TR/NOTE-datetime
+func FaaSTime(val string) attribute.KeyValue {
+ return FaaSTimeKey.String(val)
+}
+
+// FaaSVersion returns an attribute KeyValue conforming to the "faas.version"
+// semantic conventions. It represents the immutable version of the function
+// being executed.
+func FaaSVersion(val string) attribute.KeyValue {
+ return FaaSVersionKey.String(val)
+}
+
+// Enum values for faas.document.operation
+var (
+ // When a new object is created.
+ // Stability: development
+ FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
+ // When an object is modified.
+ // Stability: development
+ FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
+ // When an object is deleted.
+ // Stability: development
+ FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
+)
+
+// Enum values for faas.invoked_provider
+var (
+ // Alibaba Cloud
+ // Stability: development
+ FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ // Stability: development
+ FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
+ // Microsoft Azure
+ // Stability: development
+ FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
+ // Google Cloud Platform
+ // Stability: development
+ FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
+ // Tencent Cloud
+ // Stability: development
+ FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
+)
+
+// Enum values for faas.trigger
+var (
+ // A response to some data source operation such as a database or filesystem
+ // read/write
+ // Stability: development
+ FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
+ // To provide an answer to an inbound HTTP request
+ // Stability: development
+ FaaSTriggerHTTP = FaaSTriggerKey.String("http")
+ // A function is set to be executed when messages are sent to a messaging system
+ // Stability: development
+ FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub")
+ // A function is scheduled to be executed regularly
+ // Stability: development
+ FaaSTriggerTimer = FaaSTriggerKey.String("timer")
+ // If none of the others apply
+ // Stability: development
+ FaaSTriggerOther = FaaSTriggerKey.String("other")
+)
+
+// Namespace: feature_flag
+const (
+ // FeatureFlagContextIDKey is the attribute Key conforming to the
+ // "feature_flag.context.id" semantic conventions. It represents the unique
+ // identifier for the flag evaluation context. For example, the targeting key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db"
+ FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id")
+
+ // FeatureFlagErrorMessageKey is the attribute Key conforming to the
+ // "feature_flag.error.message" semantic conventions. It represents a message
+ // providing more detail about an error that occurred during feature flag
+ // evaluation in human-readable form.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "Unexpected input type: string", "The user has exceeded their
+ // storage quota"
+ FeatureFlagErrorMessageKey = attribute.Key("feature_flag.error.message")
+
+ // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key"
+ // semantic conventions. It represents the lookup key of the feature flag.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "logo-color"
+ FeatureFlagKeyKey = attribute.Key("feature_flag.key")
+
+ // FeatureFlagProviderNameKey is the attribute Key conforming to the
+ // "feature_flag.provider.name" semantic conventions. It represents the
+ // identifies the feature flag provider.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "Flag Manager"
+ FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name")
+
+ // FeatureFlagResultReasonKey is the attribute Key conforming to the
+ // "feature_flag.result.reason" semantic conventions. It represents the reason
+ // code which shows how a feature flag value was determined.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "static", "targeting_match", "error", "default"
+ FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason")
+
+ // FeatureFlagResultValueKey is the attribute Key conforming to the
+ // "feature_flag.result.value" semantic conventions. It represents the evaluated
+ // value of the feature flag.
+ //
+ // Type: any
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "#ff0000", true, 3
+ // Note: With some feature flag providers, feature flag results can be quite
+ // large or contain private or sensitive details.
+ // Because of this, `feature_flag.result.variant` is often the preferred
+ // attribute if it is available.
+ //
+ // It may be desirable to redact or otherwise limit the size and scope of
+ // `feature_flag.result.value` if possible.
+ // Because the evaluated flag value is unstructured and may be any type, it is
+ // left to the instrumentation author to determine how best to achieve this.
+ FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value")
+
+ // FeatureFlagResultVariantKey is the attribute Key conforming to the
+ // "feature_flag.result.variant" semantic conventions. It represents a semantic
+ // identifier for an evaluated flag value.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "red", "true", "on"
+ // Note: A semantic identifier, commonly referred to as a variant, provides a
+ // means
+ // for referring to a value without including the value itself. This can
+ // provide additional context for understanding the meaning behind a value.
+ // For example, the variant `red` maybe be used for the value `#c05543`.
+ FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant")
+
+ // FeatureFlagSetIDKey is the attribute Key conforming to the
+ // "feature_flag.set.id" semantic conventions. It represents the identifier of
+ // the [flag set] to which the feature flag belongs.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "proj-1", "ab98sgs", "service1/dev"
+ //
+ // [flag set]: https://openfeature.dev/specification/glossary/#flag-set
+ FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id")
+
+ // FeatureFlagVersionKey is the attribute Key conforming to the
+ // "feature_flag.version" semantic conventions. It represents the version of the
+ // ruleset used during the evaluation. This may be any stable value which
+ // uniquely identifies the ruleset.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "1", "01ABCDEF"
+ FeatureFlagVersionKey = attribute.Key("feature_flag.version")
+)
+
+// FeatureFlagContextID returns an attribute KeyValue conforming to the
+// "feature_flag.context.id" semantic conventions. It represents the unique
+// identifier for the flag evaluation context. For example, the targeting key.
+func FeatureFlagContextID(val string) attribute.KeyValue {
+ return FeatureFlagContextIDKey.String(val)
+}
+
+// FeatureFlagErrorMessage returns an attribute KeyValue conforming to the
+// "feature_flag.error.message" semantic conventions. It represents a message
+// providing more detail about an error that occurred during feature flag
+// evaluation in human-readable form.
+func FeatureFlagErrorMessage(val string) attribute.KeyValue {
+ return FeatureFlagErrorMessageKey.String(val)
+}
+
+// FeatureFlagKey returns an attribute KeyValue conforming to the
+// "feature_flag.key" semantic conventions. It represents the lookup key of the
+// feature flag.
+func FeatureFlagKey(val string) attribute.KeyValue {
+ return FeatureFlagKeyKey.String(val)
+}
+
+// FeatureFlagProviderName returns an attribute KeyValue conforming to the
+// "feature_flag.provider.name" semantic conventions. It represents the
+// identifies the feature flag provider.
+func FeatureFlagProviderName(val string) attribute.KeyValue {
+ return FeatureFlagProviderNameKey.String(val)
+}
+
+// FeatureFlagResultVariant returns an attribute KeyValue conforming to the
+// "feature_flag.result.variant" semantic conventions. It represents a semantic
+// identifier for an evaluated flag value.
+func FeatureFlagResultVariant(val string) attribute.KeyValue {
+ return FeatureFlagResultVariantKey.String(val)
+}
+
+// FeatureFlagSetID returns an attribute KeyValue conforming to the
+// "feature_flag.set.id" semantic conventions. It represents the identifier of
+// the [flag set] to which the feature flag belongs.
+//
+// [flag set]: https://openfeature.dev/specification/glossary/#flag-set
+func FeatureFlagSetID(val string) attribute.KeyValue {
+ return FeatureFlagSetIDKey.String(val)
+}
+
+// FeatureFlagVersion returns an attribute KeyValue conforming to the
+// "feature_flag.version" semantic conventions. It represents the version of the
+// ruleset used during the evaluation. This may be any stable value which
+// uniquely identifies the ruleset.
+func FeatureFlagVersion(val string) attribute.KeyValue {
+ return FeatureFlagVersionKey.String(val)
+}
+
+// Enum values for feature_flag.result.reason
+var (
+ // The resolved value is static (no dynamic evaluation).
+ // Stability: release_candidate
+ FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static")
+ // The resolved value fell back to a pre-configured value (no dynamic evaluation
+ // occurred or dynamic evaluation yielded no result).
+ // Stability: release_candidate
+ FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default")
+ // The resolved value was the result of a dynamic evaluation, such as a rule or
+ // specific user-targeting.
+ // Stability: release_candidate
+ FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match")
+ // The resolved value was the result of pseudorandom assignment.
+ // Stability: release_candidate
+ FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split")
+ // The resolved value was retrieved from cache.
+ // Stability: release_candidate
+ FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached")
+ // The resolved value was the result of the flag being disabled in the
+ // management system.
+ // Stability: release_candidate
+ FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled")
+ // The reason for the resolved value could not be determined.
+ // Stability: release_candidate
+ FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown")
+ // The resolved value is non-authoritative or possibly out of date
+ // Stability: release_candidate
+ FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale")
+ // The resolved value was the result of an error.
+ // Stability: release_candidate
+ FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error")
+)
+
+// Namespace: file
+const (
+ // FileAccessedKey is the attribute Key conforming to the "file.accessed"
+ // semantic conventions. It represents the time when the file was last accessed,
+ // in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: This attribute might not be supported by some file systems — NFS,
+ // FAT32, in embedded OS, etc.
+ FileAccessedKey = attribute.Key("file.accessed")
+
+ // FileAttributesKey is the attribute Key conforming to the "file.attributes"
+ // semantic conventions. It represents the array of file attributes.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "readonly", "hidden"
+ // Note: Attributes names depend on the OS or file system. Here’s a
+ // non-exhaustive list of values expected for this attribute: `archive`,
+ // `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`,
+ // `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`,
+ // `write`.
+ FileAttributesKey = attribute.Key("file.attributes")
+
+ // FileChangedKey is the attribute Key conforming to the "file.changed" semantic
+ // conventions. It represents the time when the file attributes or metadata was
+ // last changed, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: `file.changed` captures the time when any of the file's properties or
+ // attributes (including the content) are changed, while `file.modified`
+ // captures the timestamp when the file content is modified.
+ FileChangedKey = attribute.Key("file.changed")
+
+ // FileCreatedKey is the attribute Key conforming to the "file.created" semantic
+ // conventions. It represents the time when the file was created, in ISO 8601
+ // format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ // Note: This attribute might not be supported by some file systems — NFS,
+ // FAT32, in embedded OS, etc.
+ FileCreatedKey = attribute.Key("file.created")
+
+ // FileDirectoryKey is the attribute Key conforming to the "file.directory"
+ // semantic conventions. It represents the directory where the file is located.
+ // It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/home/user", "C:\Program Files\MyApp"
+ FileDirectoryKey = attribute.Key("file.directory")
+
+ // FileExtensionKey is the attribute Key conforming to the "file.extension"
+ // semantic conventions. It represents the file extension, excluding the leading
+ // dot.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "png", "gz"
+ // Note: When the file name has multiple extensions (example.tar.gz), only the
+ // last one should be captured ("gz", not "tar.gz").
+ FileExtensionKey = attribute.Key("file.extension")
+
+ // FileForkNameKey is the attribute Key conforming to the "file.fork_name"
+ // semantic conventions. It represents the name of the fork. A fork is
+ // additional data associated with a filesystem object.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Zone.Identifier"
+ // Note: On Linux, a resource fork is used to store additional data with a
+ // filesystem object. A file always has at least one fork for the data portion,
+ // and additional forks may exist.
+ // On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default
+ // data stream for a file is just called $DATA. Zone.Identifier is commonly used
+ // by Windows to track contents downloaded from the Internet. An ADS is
+ // typically of the form: C:\path\to\filename.extension:some_fork_name, and
+ // some_fork_name is the value that should populate `fork_name`.
+ // `filename.extension` should populate `file.name`, and `extension` should
+ // populate `file.extension`. The full path, `file.path`, will include the fork
+ // name.
+ FileForkNameKey = attribute.Key("file.fork_name")
+
+ // FileGroupIDKey is the attribute Key conforming to the "file.group.id"
+ // semantic conventions. It represents the primary Group ID (GID) of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1000"
+ FileGroupIDKey = attribute.Key("file.group.id")
+
+ // FileGroupNameKey is the attribute Key conforming to the "file.group.name"
+ // semantic conventions. It represents the primary group name of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "users"
+ FileGroupNameKey = attribute.Key("file.group.name")
+
+ // FileInodeKey is the attribute Key conforming to the "file.inode" semantic
+ // conventions. It represents the inode representing the file in the filesystem.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "256383"
+ FileInodeKey = attribute.Key("file.inode")
+
+ // FileLockMechanismKey is the attribute Key conforming to the
+ // "file.lock.mechanism" semantic conventions. It represents the lock mechanism
+ // such as noted by [POSIX].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "POSIX", "FLOCK", "DELEG", "LEASE"
+ //
+ // [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
+ FileLockMechanismKey = attribute.Key("file.lock.mechanism")
+
+ // FileLockModeKey is the attribute Key conforming to the "file.lock.mode"
+ // semantic conventions. It represents the mode of lock or operation such as
+ // documented by [POSIX].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ADVISORY", "MANDATORY", "BREAKING", "ACTIVE", "BREAKER"
+ //
+ // [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
+ FileLockModeKey = attribute.Key("file.lock.mode")
+
+ // FileLockTypeKey is the attribute Key conforming to the "file.lock.type"
+ // semantic conventions. It represents the lock type as represented by i.e.
+ // [POSIX]'s l_type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "read"
+ //
+ // [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
+ FileLockTypeKey = attribute.Key("file.lock.type")
+
+ // FileModeKey is the attribute Key conforming to the "file.mode" semantic
+ // conventions. It represents the mode of the file in octal representation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0640"
+ FileModeKey = attribute.Key("file.mode")
+
+ // FileModifiedKey is the attribute Key conforming to the "file.modified"
+ // semantic conventions. It represents the time when the file content was last
+ // modified, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T12:00:00Z"
+ FileModifiedKey = attribute.Key("file.modified")
+
+ // FileNameKey is the attribute Key conforming to the "file.name" semantic
+ // conventions. It represents the name of the file including the extension,
+ // without the directory.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "example.png"
+ FileNameKey = attribute.Key("file.name")
+
+ // FileOwnerIDKey is the attribute Key conforming to the "file.owner.id"
+ // semantic conventions. It represents the user ID (UID) or security identifier
+ // (SID) of the file owner.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1000"
+ FileOwnerIDKey = attribute.Key("file.owner.id")
+
+ // FileOwnerNameKey is the attribute Key conforming to the "file.owner.name"
+ // semantic conventions. It represents the username of the file owner.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "root"
+ FileOwnerNameKey = attribute.Key("file.owner.name")
+
+ // FilePathKey is the attribute Key conforming to the "file.path" semantic
+ // conventions. It represents the full path to the file, including the file
+ // name. It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/home/alice/example.png", "C:\Program Files\MyApp\myapp.exe"
+ FilePathKey = attribute.Key("file.path")
+
+ // FileSizeKey is the attribute Key conforming to the "file.size" semantic
+ // conventions. It represents the file size in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ FileSizeKey = attribute.Key("file.size")
+
+ // FileSymbolicLinkTargetPathKey is the attribute Key conforming to the
+ // "file.symbolic_link.target_path" semantic conventions. It represents the path
+ // to the target of a symbolic link.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/usr/bin/python3"
+ // Note: This attribute is only applicable to symbolic links.
+ FileSymbolicLinkTargetPathKey = attribute.Key("file.symbolic_link.target_path")
+)
+
+// FileAccessed returns an attribute KeyValue conforming to the "file.accessed"
+// semantic conventions. It represents the time when the file was last accessed,
+// in ISO 8601 format.
+func FileAccessed(val string) attribute.KeyValue {
+ return FileAccessedKey.String(val)
+}
+
+// FileAttributes returns an attribute KeyValue conforming to the
+// "file.attributes" semantic conventions. It represents the array of file
+// attributes.
+func FileAttributes(val ...string) attribute.KeyValue {
+ return FileAttributesKey.StringSlice(val)
+}
+
+// FileChanged returns an attribute KeyValue conforming to the "file.changed"
+// semantic conventions. It represents the time when the file attributes or
+// metadata was last changed, in ISO 8601 format.
+func FileChanged(val string) attribute.KeyValue {
+ return FileChangedKey.String(val)
+}
+
+// FileCreated returns an attribute KeyValue conforming to the "file.created"
+// semantic conventions. It represents the time when the file was created, in ISO
+// 8601 format.
+func FileCreated(val string) attribute.KeyValue {
+ return FileCreatedKey.String(val)
+}
+
+// FileDirectory returns an attribute KeyValue conforming to the "file.directory"
+// semantic conventions. It represents the directory where the file is located.
+// It should include the drive letter, when appropriate.
+func FileDirectory(val string) attribute.KeyValue {
+ return FileDirectoryKey.String(val)
+}
+
+// FileExtension returns an attribute KeyValue conforming to the "file.extension"
+// semantic conventions. It represents the file extension, excluding the leading
+// dot.
+func FileExtension(val string) attribute.KeyValue {
+ return FileExtensionKey.String(val)
+}
+
+// FileForkName returns an attribute KeyValue conforming to the "file.fork_name"
+// semantic conventions. It represents the name of the fork. A fork is additional
+// data associated with a filesystem object.
+func FileForkName(val string) attribute.KeyValue {
+ return FileForkNameKey.String(val)
+}
+
+// FileGroupID returns an attribute KeyValue conforming to the "file.group.id"
+// semantic conventions. It represents the primary Group ID (GID) of the file.
+func FileGroupID(val string) attribute.KeyValue {
+ return FileGroupIDKey.String(val)
+}
+
+// FileGroupName returns an attribute KeyValue conforming to the
+// "file.group.name" semantic conventions. It represents the primary group name
+// of the file.
+func FileGroupName(val string) attribute.KeyValue {
+ return FileGroupNameKey.String(val)
+}
+
+// FileInode returns an attribute KeyValue conforming to the "file.inode"
+// semantic conventions. It represents the inode representing the file in the
+// filesystem.
+func FileInode(val string) attribute.KeyValue {
+ return FileInodeKey.String(val)
+}
+
+// FileLockMechanism returns an attribute KeyValue conforming to the
+// "file.lock.mechanism" semantic conventions. It represents the lock mechanism
+// such as noted by [POSIX].
+//
+// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
+func FileLockMechanism(val string) attribute.KeyValue {
+ return FileLockMechanismKey.String(val)
+}
+
+// FileLockMode returns an attribute KeyValue conforming to the "file.lock.mode"
+// semantic conventions. It represents the mode of lock or operation such as
+// documented by [POSIX].
+//
+// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
+func FileLockMode(val string) attribute.KeyValue {
+ return FileLockModeKey.String(val)
+}
+
+// FileMode returns an attribute KeyValue conforming to the "file.mode" semantic
+// conventions. It represents the mode of the file in octal representation.
+func FileMode(val string) attribute.KeyValue {
+ return FileModeKey.String(val)
+}
+
+// FileModified returns an attribute KeyValue conforming to the "file.modified"
+// semantic conventions. It represents the time when the file content was last
+// modified, in ISO 8601 format.
+func FileModified(val string) attribute.KeyValue {
+ return FileModifiedKey.String(val)
+}
+
+// FileName returns an attribute KeyValue conforming to the "file.name" semantic
+// conventions. It represents the name of the file including the extension,
+// without the directory.
+func FileName(val string) attribute.KeyValue {
+ return FileNameKey.String(val)
+}
+
+// FileOwnerID returns an attribute KeyValue conforming to the "file.owner.id"
+// semantic conventions. It represents the user ID (UID) or security identifier
+// (SID) of the file owner.
+func FileOwnerID(val string) attribute.KeyValue {
+ return FileOwnerIDKey.String(val)
+}
+
+// FileOwnerName returns an attribute KeyValue conforming to the
+// "file.owner.name" semantic conventions. It represents the username of the file
+// owner.
+func FileOwnerName(val string) attribute.KeyValue {
+ return FileOwnerNameKey.String(val)
+}
+
+// FilePath returns an attribute KeyValue conforming to the "file.path" semantic
+// conventions. It represents the full path to the file, including the file name.
+// It should include the drive letter, when appropriate.
+func FilePath(val string) attribute.KeyValue {
+ return FilePathKey.String(val)
+}
+
+// FileSize returns an attribute KeyValue conforming to the "file.size" semantic
+// conventions. It represents the file size in bytes.
+func FileSize(val int) attribute.KeyValue {
+ return FileSizeKey.Int(val)
+}
+
+// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the
+// "file.symbolic_link.target_path" semantic conventions. It represents the path
+// to the target of a symbolic link.
+func FileSymbolicLinkTargetPath(val string) attribute.KeyValue {
+ return FileSymbolicLinkTargetPathKey.String(val)
+}
+
+// Enum values for file.lock.type
+var (
+ // read
+ // Stability: development
+ FileLockTypeRead = FileLockTypeKey.String("read")
+ // write
+ // Stability: development
+ FileLockTypeWrite = FileLockTypeKey.String("write")
+)
+
+// Namespace: gcp
+const (
+ // GCPAppHubApplicationContainerKey is the attribute Key conforming to the
+ // "gcp.apphub.application.container" semantic conventions. It represents the
+ // container within GCP where the AppHub application is defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "projects/my-container-project"
+ GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container")
+
+ // GCPAppHubApplicationIDKey is the attribute Key conforming to the
+ // "gcp.apphub.application.id" semantic conventions. It represents the name of
+ // the application as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-application"
+ GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id")
+
+ // GCPAppHubApplicationLocationKey is the attribute Key conforming to the
+ // "gcp.apphub.application.location" semantic conventions. It represents the GCP
+ // zone or region where the application is defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1"
+ GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location")
+
+ // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.service.criticality_type" semantic conventions. It represents the
+ // criticality of a service indicates its importance to the business.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub type enum]
+ //
+ // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type")
+
+ // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.service.environment_type" semantic conventions. It represents the
+ // environment of a service is the stage of a software lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub environment type]
+ //
+ // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type")
+
+ // GCPAppHubServiceIDKey is the attribute Key conforming to the
+ // "gcp.apphub.service.id" semantic conventions. It represents the name of the
+ // service as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-service"
+ GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id")
+
+ // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.criticality_type" semantic conventions. It represents
+ // the criticality of a workload indicates its importance to the business.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub type enum]
+ //
+ // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type")
+
+ // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.environment_type" semantic conventions. It represents
+ // the environment of a workload is the stage of a software lifecycle.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: [See AppHub environment type]
+ //
+ // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type")
+
+ // GCPAppHubWorkloadIDKey is the attribute Key conforming to the
+ // "gcp.apphub.workload.id" semantic conventions. It represents the name of the
+ // workload as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-workload"
+ GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id")
+
+ // GCPAppHubDestinationApplicationContainerKey is the attribute Key conforming
+ // to the "gcp.apphub_destination.application.container" semantic conventions.
+ // It represents the container within GCP where the AppHub destination
+ // application is defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "projects/my-container-project"
+ GCPAppHubDestinationApplicationContainerKey = attribute.Key("gcp.apphub_destination.application.container")
+
+ // GCPAppHubDestinationApplicationIDKey is the attribute Key conforming to the
+ // "gcp.apphub_destination.application.id" semantic conventions. It represents
+ // the name of the destination application as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-application"
+ GCPAppHubDestinationApplicationIDKey = attribute.Key("gcp.apphub_destination.application.id")
+
+ // GCPAppHubDestinationApplicationLocationKey is the attribute Key conforming to
+ // the "gcp.apphub_destination.application.location" semantic conventions. It
+ // represents the GCP zone or region where the destination application is
+ // defined.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1"
+ GCPAppHubDestinationApplicationLocationKey = attribute.Key("gcp.apphub_destination.application.location")
+
+ // GCPAppHubDestinationServiceCriticalityTypeKey is the attribute Key conforming
+ // to the "gcp.apphub_destination.service.criticality_type" semantic
+ // conventions. It represents the criticality of a destination workload
+ // indicates its importance to the business as specified in [AppHub type enum].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubDestinationServiceCriticalityTypeKey = attribute.Key("gcp.apphub_destination.service.criticality_type")
+
+ // GCPAppHubDestinationServiceEnvironmentTypeKey is the attribute Key conforming
+ // to the "gcp.apphub_destination.service.environment_type" semantic
+ // conventions. It represents the software lifecycle stage of a destination
+ // service as defined [AppHub environment type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubDestinationServiceEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.service.environment_type")
+
+ // GCPAppHubDestinationServiceIDKey is the attribute Key conforming to the
+ // "gcp.apphub_destination.service.id" semantic conventions. It represents the
+ // name of the destination service as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-service"
+ GCPAppHubDestinationServiceIDKey = attribute.Key("gcp.apphub_destination.service.id")
+
+ // GCPAppHubDestinationWorkloadCriticalityTypeKey is the attribute Key
+ // conforming to the "gcp.apphub_destination.workload.criticality_type" semantic
+ // conventions. It represents the criticality of a destination workload
+ // indicates its importance to the business as specified in [AppHub type enum].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type
+ GCPAppHubDestinationWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub_destination.workload.criticality_type")
+
+ // GCPAppHubDestinationWorkloadEnvironmentTypeKey is the attribute Key
+ // conforming to the "gcp.apphub_destination.workload.environment_type" semantic
+ // conventions. It represents the environment of a destination workload is the
+ // stage of a software lifecycle as provided in the [AppHub environment type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1
+ GCPAppHubDestinationWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub_destination.workload.environment_type")
+
+ // GCPAppHubDestinationWorkloadIDKey is the attribute Key conforming to the
+ // "gcp.apphub_destination.workload.id" semantic conventions. It represents the
+ // name of the destination workload as configured in AppHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-workload"
+ GCPAppHubDestinationWorkloadIDKey = attribute.Key("gcp.apphub_destination.workload.id")
+
+ // GCPClientServiceKey is the attribute Key conforming to the
+ // "gcp.client.service" semantic conventions. It represents the identifies the
+ // Google Cloud service for which the official client library is intended.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "appengine", "run", "firestore", "alloydb", "spanner"
+ // Note: Intended to be a stable identifier for Google Cloud client libraries
+ // that is uniform across implementation languages. The value should be derived
+ // from the canonical service domain for the service; for example,
+ // 'foo.googleapis.com' should result in a value of 'foo'.
+ GCPClientServiceKey = attribute.Key("gcp.client.service")
+
+ // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
+ // the Cloud Run [execution] being run for the Job, as set by the
+ // [`CLOUD_RUN_EXECUTION`] environment variable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "job-name-xxxx", "sample-job-mdw84"
+ //
+ // [execution]: https://cloud.google.com/run/docs/managing/job-executions
+ // [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+ GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
+
+ // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
+ // for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
+ // environment variable.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 1
+ //
+ // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+ GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
+
+ // GCPGCEInstanceHostnameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
+ // of a GCE instance. This is the full value of the default or [custom hostname]
+ // .
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-host1234.example.com",
+ // "sample-vm.us-west1-b.c.my-project.internal"
+ //
+ // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
+ GCPGCEInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
+
+ // GCPGCEInstanceNameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.name" semantic conventions. It represents the instance name
+ // of a GCE instance. This is the value provided by `host.name`, the visible
+ // name of the instance in the Cloud Console UI, and the prefix for the default
+ // hostname of the instance as defined by the [default internal DNS name].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "instance-1", "my-vm-name"
+ //
+ // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
+ GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name")
+
+ // GCPGCEInstanceGroupManagerNameKey is the attribute Key conforming to the
+ // "gcp.gce.instance_group_manager.name" semantic conventions. It represents the
+ // name of the Instance Group Manager (IGM) that manages this VM, if any.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "web-igm", "my-managed-group"
+ GCPGCEInstanceGroupManagerNameKey = attribute.Key("gcp.gce.instance_group_manager.name")
+
+ // GCPGCEInstanceGroupManagerRegionKey is the attribute Key conforming to the
+ // "gcp.gce.instance_group_manager.region" semantic conventions. It represents
+ // the region of a **regional** Instance Group Manager (e.g., `us-central1`).
+ // Set this **only** when the IGM is regional.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1", "europe-west1"
+ GCPGCEInstanceGroupManagerRegionKey = attribute.Key("gcp.gce.instance_group_manager.region")
+
+ // GCPGCEInstanceGroupManagerZoneKey is the attribute Key conforming to the
+ // "gcp.gce.instance_group_manager.zone" semantic conventions. It represents the
+ // zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this
+ // **only** when the IGM is zonal.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-central1-a", "europe-west1-b"
+ GCPGCEInstanceGroupManagerZoneKey = attribute.Key("gcp.gce.instance_group_manager.zone")
+)
+
+// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.container" semantic conventions. It represents the
+// container within GCP where the AppHub application is defined.
+func GCPAppHubApplicationContainer(val string) attribute.KeyValue {
+ return GCPAppHubApplicationContainerKey.String(val)
+}
+
+// GCPAppHubApplicationID returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.id" semantic conventions. It represents the name of
+// the application as configured in AppHub.
+func GCPAppHubApplicationID(val string) attribute.KeyValue {
+ return GCPAppHubApplicationIDKey.String(val)
+}
+
+// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the
+// "gcp.apphub.application.location" semantic conventions. It represents the GCP
+// zone or region where the application is defined.
+func GCPAppHubApplicationLocation(val string) attribute.KeyValue {
+ return GCPAppHubApplicationLocationKey.String(val)
+}
+
+// GCPAppHubServiceID returns an attribute KeyValue conforming to the
+// "gcp.apphub.service.id" semantic conventions. It represents the name of the
+// service as configured in AppHub.
+func GCPAppHubServiceID(val string) attribute.KeyValue {
+ return GCPAppHubServiceIDKey.String(val)
+}
+
+// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the
+// "gcp.apphub.workload.id" semantic conventions. It represents the name of the
+// workload as configured in AppHub.
+func GCPAppHubWorkloadID(val string) attribute.KeyValue {
+ return GCPAppHubWorkloadIDKey.String(val)
+}
+
+// GCPAppHubDestinationApplicationContainer returns an attribute KeyValue
+// conforming to the "gcp.apphub_destination.application.container" semantic
+// conventions. It represents the container within GCP where the AppHub
+// destination application is defined.
+func GCPAppHubDestinationApplicationContainer(val string) attribute.KeyValue {
+ return GCPAppHubDestinationApplicationContainerKey.String(val)
+}
+
+// GCPAppHubDestinationApplicationID returns an attribute KeyValue conforming to
+// the "gcp.apphub_destination.application.id" semantic conventions. It
+// represents the name of the destination application as configured in AppHub.
+func GCPAppHubDestinationApplicationID(val string) attribute.KeyValue {
+ return GCPAppHubDestinationApplicationIDKey.String(val)
+}
+
+// GCPAppHubDestinationApplicationLocation returns an attribute KeyValue
+// conforming to the "gcp.apphub_destination.application.location" semantic
+// conventions. It represents the GCP zone or region where the destination
+// application is defined.
+func GCPAppHubDestinationApplicationLocation(val string) attribute.KeyValue {
+ return GCPAppHubDestinationApplicationLocationKey.String(val)
+}
+
+// GCPAppHubDestinationServiceID returns an attribute KeyValue conforming to the
+// "gcp.apphub_destination.service.id" semantic conventions. It represents the
+// name of the destination service as configured in AppHub.
+func GCPAppHubDestinationServiceID(val string) attribute.KeyValue {
+ return GCPAppHubDestinationServiceIDKey.String(val)
+}
+
+// GCPAppHubDestinationWorkloadID returns an attribute KeyValue conforming to the
+// "gcp.apphub_destination.workload.id" semantic conventions. It represents the
+// name of the destination workload as configured in AppHub.
+func GCPAppHubDestinationWorkloadID(val string) attribute.KeyValue {
+ return GCPAppHubDestinationWorkloadIDKey.String(val)
+}
+
+// GCPClientService returns an attribute KeyValue conforming to the
+// "gcp.client.service" semantic conventions. It represents the identifies the
+// Google Cloud service for which the official client library is intended.
+func GCPClientService(val string) attribute.KeyValue {
+ return GCPClientServiceKey.String(val)
+}
+
+// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.execution" semantic conventions. It represents the name of
+// the Cloud Run [execution] being run for the Job, as set by the
+// [`CLOUD_RUN_EXECUTION`] environment variable.
+//
+// [execution]: https://cloud.google.com/run/docs/managing/job-executions
+// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+func GCPCloudRunJobExecution(val string) attribute.KeyValue {
+ return GCPCloudRunJobExecutionKey.String(val)
+}
+
+// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
+// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`]
+// environment variable.
+//
+// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
+ return GCPCloudRunJobTaskIndexKey.Int(val)
+}
+
+// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
+// of a GCE instance. This is the full value of the default or [custom hostname]
+// .
+//
+// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm
+func GCPGCEInstanceHostname(val string) attribute.KeyValue {
+ return GCPGCEInstanceHostnameKey.String(val)
+}
+
+// GCPGCEInstanceLabels returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.labels" semantic conventions. It represents the GCE instance
+// labels, `` being the label name and the value being the label value.
+func GCPGCEInstanceLabels(key string, val string) attribute.KeyValue {
+ return attribute.String("gcp.gce.instance.labels."+key, val)
+}
+
+// GCPGCEInstanceName returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.name" semantic conventions. It represents the instance name
+// of a GCE instance. This is the value provided by `host.name`, the visible name
+// of the instance in the Cloud Console UI, and the prefix for the default
+// hostname of the instance as defined by the [default internal DNS name].
+//
+// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names
+func GCPGCEInstanceName(val string) attribute.KeyValue {
+ return GCPGCEInstanceNameKey.String(val)
+}
+
+// GCPGCEInstanceGroupManagerName returns an attribute KeyValue conforming to the
+// "gcp.gce.instance_group_manager.name" semantic conventions. It represents the
+// name of the Instance Group Manager (IGM) that manages this VM, if any.
+func GCPGCEInstanceGroupManagerName(val string) attribute.KeyValue {
+ return GCPGCEInstanceGroupManagerNameKey.String(val)
+}
+
+// GCPGCEInstanceGroupManagerRegion returns an attribute KeyValue conforming to
+// the "gcp.gce.instance_group_manager.region" semantic conventions. It
+// represents the region of a **regional** Instance Group Manager (e.g.,
+// `us-central1`). Set this **only** when the IGM is regional.
+func GCPGCEInstanceGroupManagerRegion(val string) attribute.KeyValue {
+ return GCPGCEInstanceGroupManagerRegionKey.String(val)
+}
+
+// GCPGCEInstanceGroupManagerZone returns an attribute KeyValue conforming to the
+// "gcp.gce.instance_group_manager.zone" semantic conventions. It represents the
+// zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this
+// **only** when the IGM is zonal.
+func GCPGCEInstanceGroupManagerZone(val string) attribute.KeyValue {
+ return GCPGCEInstanceGroupManagerZoneKey.String(val)
+}
+
+// Enum values for gcp.apphub.service.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub.service.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Enum values for gcp.apphub.workload.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub.workload.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Enum values for gcp.apphub_destination.service.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubDestinationServiceCriticalityTypeMissionCritical = GCPAppHubDestinationServiceCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubDestinationServiceCriticalityTypeHigh = GCPAppHubDestinationServiceCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubDestinationServiceCriticalityTypeMedium = GCPAppHubDestinationServiceCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubDestinationServiceCriticalityTypeLow = GCPAppHubDestinationServiceCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub_destination.service.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubDestinationServiceEnvironmentTypeProduction = GCPAppHubDestinationServiceEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubDestinationServiceEnvironmentTypeStaging = GCPAppHubDestinationServiceEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubDestinationServiceEnvironmentTypeTest = GCPAppHubDestinationServiceEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubDestinationServiceEnvironmentTypeDevelopment = GCPAppHubDestinationServiceEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Enum values for gcp.apphub_destination.workload.criticality_type
+var (
+ // Mission critical service.
+ // Stability: development
+ GCPAppHubDestinationWorkloadCriticalityTypeMissionCritical = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MISSION_CRITICAL")
+ // High impact.
+ // Stability: development
+ GCPAppHubDestinationWorkloadCriticalityTypeHigh = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("HIGH")
+ // Medium impact.
+ // Stability: development
+ GCPAppHubDestinationWorkloadCriticalityTypeMedium = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("MEDIUM")
+ // Low impact.
+ // Stability: development
+ GCPAppHubDestinationWorkloadCriticalityTypeLow = GCPAppHubDestinationWorkloadCriticalityTypeKey.String("LOW")
+)
+
+// Enum values for gcp.apphub_destination.workload.environment_type
+var (
+ // Production environment.
+ // Stability: development
+ GCPAppHubDestinationWorkloadEnvironmentTypeProduction = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("PRODUCTION")
+ // Staging environment.
+ // Stability: development
+ GCPAppHubDestinationWorkloadEnvironmentTypeStaging = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("STAGING")
+ // Test environment.
+ // Stability: development
+ GCPAppHubDestinationWorkloadEnvironmentTypeTest = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("TEST")
+ // Development environment.
+ // Stability: development
+ GCPAppHubDestinationWorkloadEnvironmentTypeDevelopment = GCPAppHubDestinationWorkloadEnvironmentTypeKey.String("DEVELOPMENT")
+)
+
+// Namespace: geo
+const (
+ // GeoContinentCodeKey is the attribute Key conforming to the
+ // "geo.continent.code" semantic conventions. It represents the two-letter code
+ // representing continent’s name.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ GeoContinentCodeKey = attribute.Key("geo.continent.code")
+
+ // GeoCountryISOCodeKey is the attribute Key conforming to the
+ // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
+ // Country Code ([ISO 3166-1 alpha2]).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CA"
+ //
+ // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
+ GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code")
+
+ // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name"
+ // semantic conventions. It represents the locality name. Represents the name of
+ // a city, town, village, or similar populated place.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Montreal", "Berlin"
+ GeoLocalityNameKey = attribute.Key("geo.locality.name")
+
+ // GeoLocationLatKey is the attribute Key conforming to the "geo.location.lat"
+ // semantic conventions. It represents the latitude of the geo location in
+ // [WGS84].
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 45.505918
+ //
+ // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+ GeoLocationLatKey = attribute.Key("geo.location.lat")
+
+ // GeoLocationLonKey is the attribute Key conforming to the "geo.location.lon"
+ // semantic conventions. It represents the longitude of the geo location in
+ // [WGS84].
+ //
+ // Type: double
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: -73.61483
+ //
+ // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+ GeoLocationLonKey = attribute.Key("geo.location.lon")
+
+ // GeoPostalCodeKey is the attribute Key conforming to the "geo.postal_code"
+ // semantic conventions. It represents the postal code associated with the
+ // location. Values appropriate for this field may also be known as a postcode
+ // or ZIP code and will vary widely from country to country.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "94040"
+ GeoPostalCodeKey = attribute.Key("geo.postal_code")
+
+ // GeoRegionISOCodeKey is the attribute Key conforming to the
+ // "geo.region.iso_code" semantic conventions. It represents the region ISO code
+ // ([ISO 3166-2]).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CA-QC"
+ //
+ // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
+ GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code")
+)
+
+// GeoCountryISOCode returns an attribute KeyValue conforming to the
+// "geo.country.iso_code" semantic conventions. It represents the two-letter ISO
+// Country Code ([ISO 3166-1 alpha2]).
+//
+// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes
+func GeoCountryISOCode(val string) attribute.KeyValue {
+ return GeoCountryISOCodeKey.String(val)
+}
+
+// GeoLocalityName returns an attribute KeyValue conforming to the
+// "geo.locality.name" semantic conventions. It represents the locality name.
+// Represents the name of a city, town, village, or similar populated place.
+func GeoLocalityName(val string) attribute.KeyValue {
+ return GeoLocalityNameKey.String(val)
+}
+
+// GeoLocationLat returns an attribute KeyValue conforming to the
+// "geo.location.lat" semantic conventions. It represents the latitude of the geo
+// location in [WGS84].
+//
+// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+func GeoLocationLat(val float64) attribute.KeyValue {
+ return GeoLocationLatKey.Float64(val)
+}
+
+// GeoLocationLon returns an attribute KeyValue conforming to the
+// "geo.location.lon" semantic conventions. It represents the longitude of the
+// geo location in [WGS84].
+//
+// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84
+func GeoLocationLon(val float64) attribute.KeyValue {
+ return GeoLocationLonKey.Float64(val)
+}
+
+// GeoPostalCode returns an attribute KeyValue conforming to the
+// "geo.postal_code" semantic conventions. It represents the postal code
+// associated with the location. Values appropriate for this field may also be
+// known as a postcode or ZIP code and will vary widely from country to country.
+func GeoPostalCode(val string) attribute.KeyValue {
+ return GeoPostalCodeKey.String(val)
+}
+
+// GeoRegionISOCode returns an attribute KeyValue conforming to the
+// "geo.region.iso_code" semantic conventions. It represents the region ISO code
+// ([ISO 3166-2]).
+//
+// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2
+func GeoRegionISOCode(val string) attribute.KeyValue {
+ return GeoRegionISOCodeKey.String(val)
+}
+
+// Enum values for geo.continent.code
+var (
+ // Africa
+ // Stability: development
+ GeoContinentCodeAf = GeoContinentCodeKey.String("AF")
+ // Antarctica
+ // Stability: development
+ GeoContinentCodeAn = GeoContinentCodeKey.String("AN")
+ // Asia
+ // Stability: development
+ GeoContinentCodeAs = GeoContinentCodeKey.String("AS")
+ // Europe
+ // Stability: development
+ GeoContinentCodeEu = GeoContinentCodeKey.String("EU")
+ // North America
+ // Stability: development
+ GeoContinentCodeNa = GeoContinentCodeKey.String("NA")
+ // Oceania
+ // Stability: development
+ GeoContinentCodeOc = GeoContinentCodeKey.String("OC")
+ // South America
+ // Stability: development
+ GeoContinentCodeSa = GeoContinentCodeKey.String("SA")
+)
+
+// Namespace: go
+const (
+ // GoCPUDetailedStateKey is the attribute Key conforming to the
+ // "go.cpu.detailed_state" semantic conventions. It represents the detailed
+ // state of the CPU.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "gc/pause", "gc/mark/assist"
+ // Note: Value SHOULD match the specific CPU class reported by the Go runtime
+ // under `/cpu/classes/...`. The list of possible values is subject to change
+ // with the Go version used.
+ GoCPUDetailedStateKey = attribute.Key("go.cpu.detailed_state")
+
+ // GoCPUStateKey is the attribute Key conforming to the "go.cpu.state" semantic
+ // conventions. It represents the state of the CPU.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "user", "gc"
+ GoCPUStateKey = attribute.Key("go.cpu.state")
+
+ // GoMemoryDetailedTypeKey is the attribute Key conforming to the
+ // "go.memory.detailed_type" semantic conventions. It represents the detailed
+ // type of memory.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "heap/objects", "heap/free"
+ // Note: Value SHOULD match the specific memory class reported by the Go runtime
+ // under `/memory/classes/...`. The list of possible values is subject to change
+ // with the Go version used.
+ GoMemoryDetailedTypeKey = attribute.Key("go.memory.detailed_type")
+
+ // GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type"
+ // semantic conventions. It represents the type of memory.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "other", "stack"
+ GoMemoryTypeKey = attribute.Key("go.memory.type")
+)
+
+// GoCPUDetailedState returns an attribute KeyValue conforming to the
+// "go.cpu.detailed_state" semantic conventions. It represents the detailed state
+// of the CPU.
+func GoCPUDetailedState(val string) attribute.KeyValue {
+ return GoCPUDetailedStateKey.String(val)
+}
+
+// GoMemoryDetailedType returns an attribute KeyValue conforming to the
+// "go.memory.detailed_type" semantic conventions. It represents the detailed
+// type of memory.
+func GoMemoryDetailedType(val string) attribute.KeyValue {
+ return GoMemoryDetailedTypeKey.String(val)
+}
+
+// Enum values for go.cpu.state
+var (
+ // CPU time spent running user Go code.
+ // Stability: development
+ GoCPUStateUser = GoCPUStateKey.String("user")
+ // CPU time spent performing garbage collection tasks.
+ // Stability: development
+ GoCPUStateGC = GoCPUStateKey.String("gc")
+ // CPU time spent returning unused memory to the underlying platform.
+ // Stability: development
+ GoCPUStateScavenge = GoCPUStateKey.String("scavenge")
+ // Available CPU time not spent executing any Go or Go runtime code.
+ // Stability: development
+ GoCPUStateIdle = GoCPUStateKey.String("idle")
+)
+
+// Enum values for go.memory.type
+var (
+ // Memory allocated from the heap that is reserved for stack space, whether or
+ // not it is currently in-use.
+ // Stability: development
+ GoMemoryTypeStack = GoMemoryTypeKey.String("stack")
+ // Memory used by the Go runtime, excluding other categories of memory usage
+ // described in this enumeration.
+ // Stability: development
+ GoMemoryTypeOther = GoMemoryTypeKey.String("other")
+)
+
+// Namespace: graphql
+const (
+ // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document"
+ // semantic conventions. It represents the GraphQL document being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: query findBookById { bookById(id: ?) { name } }
+ // Note: If instrumentation can reliably identify and redact sensitive
+ // information it SHOULD do it.
+ GraphQLDocumentKey = attribute.Key("graphql.document")
+
+ // GraphQLOperationNameKey is the attribute Key conforming to the
+ // "graphql.operation.name" semantic conventions. It represents the name of the
+ // operation being executed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: findBookById
+ GraphQLOperationNameKey = attribute.Key("graphql.operation.name")
+
+ // GraphQLOperationTypeKey is the attribute Key conforming to the
+ // "graphql.operation.type" semantic conventions. It represents the type of the
+ // operation being executed.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "query", "mutation", "subscription"
+ GraphQLOperationTypeKey = attribute.Key("graphql.operation.type")
+)
+
+// GraphQLDocument returns an attribute KeyValue conforming to the
+// "graphql.document" semantic conventions. It represents the GraphQL document
+// being executed.
+func GraphQLDocument(val string) attribute.KeyValue {
+ return GraphQLDocumentKey.String(val)
+}
+
+// GraphQLOperationName returns an attribute KeyValue conforming to the
+// "graphql.operation.name" semantic conventions. It represents the name of the
+// operation being executed.
+func GraphQLOperationName(val string) attribute.KeyValue {
+ return GraphQLOperationNameKey.String(val)
+}
+
+// Enum values for graphql.operation.type
+var (
+ // GraphQL query
+ // Stability: development
+ GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query")
+ // GraphQL mutation
+ // Stability: development
+ GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation")
+ // GraphQL subscription
+ // Stability: development
+ GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription")
+)
+
+// Namespace: heroku
+const (
+ // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
+ // semantic conventions. It represents the unique identifier for the
+ // application.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2daa2797-e42b-4624-9322-ec3f968df4da"
+ HerokuAppIDKey = attribute.Key("heroku.app.id")
+
+ // HerokuReleaseCommitKey is the attribute Key conforming to the
+ // "heroku.release.commit" semantic conventions. It represents the commit hash
+ // for the current release.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "e6134959463efd8966b20e75b913cafe3f5ec"
+ HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
+
+ // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
+ // "heroku.release.creation_timestamp" semantic conventions. It represents the
+ // time and date the release was created.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2022-10-23T18:00:42Z"
+ HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
+)
+
+// HerokuAppID returns an attribute KeyValue conforming to the "heroku.app.id"
+// semantic conventions. It represents the unique identifier for the application.
+func HerokuAppID(val string) attribute.KeyValue {
+ return HerokuAppIDKey.String(val)
+}
+
+// HerokuReleaseCommit returns an attribute KeyValue conforming to the
+// "heroku.release.commit" semantic conventions. It represents the commit hash
+// for the current release.
+func HerokuReleaseCommit(val string) attribute.KeyValue {
+ return HerokuReleaseCommitKey.String(val)
+}
+
+// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the
+// "heroku.release.creation_timestamp" semantic conventions. It represents the
+// time and date the release was created.
+func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
+ return HerokuReleaseCreationTimestampKey.String(val)
+}
+
+// Namespace: host
+const (
+ // HostArchKey is the attribute Key conforming to the "host.arch" semantic
+ // conventions. It represents the CPU architecture the host system is running
+ // on.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HostArchKey = attribute.Key("host.arch")
+
+ // HostCPUCacheL2SizeKey is the attribute Key conforming to the
+ // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
+ // level 2 memory cache available to the processor (in Bytes).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 12288000
+ HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
+
+ // HostCPUFamilyKey is the attribute Key conforming to the "host.cpu.family"
+ // semantic conventions. It represents the family or generation of the CPU.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "6", "PA-RISC 1.1e"
+ HostCPUFamilyKey = attribute.Key("host.cpu.family")
+
+ // HostCPUModelIDKey is the attribute Key conforming to the "host.cpu.model.id"
+ // semantic conventions. It represents the model identifier. It provides more
+ // granular information about the CPU, distinguishing it from other CPUs within
+ // the same family.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "6", "9000/778/B180L"
+ HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
+
+ // HostCPUModelNameKey is the attribute Key conforming to the
+ // "host.cpu.model.name" semantic conventions. It represents the model
+ // designation of the processor.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz"
+ HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
+
+ // HostCPUSteppingKey is the attribute Key conforming to the "host.cpu.stepping"
+ // semantic conventions. It represents the stepping or core revisions.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1", "r1p1"
+ HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
+
+ // HostCPUVendorIDKey is the attribute Key conforming to the
+ // "host.cpu.vendor.id" semantic conventions. It represents the processor
+ // manufacturer identifier. A maximum 12-character string.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "GenuineIntel"
+ // Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX
+ // registers. Writing these to memory in this order results in a 12-character
+ // string.
+ //
+ // [CPUID]: https://wiki.osdev.org/CPUID
+ HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
+
+ // HostIDKey is the attribute Key conforming to the "host.id" semantic
+ // conventions. It represents the unique host ID. For Cloud, this must be the
+ // instance_id assigned by the cloud provider. For non-containerized systems,
+ // this should be the `machine-id`. See the table below for the sources to use
+ // to determine the `machine-id` based on operating system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "fdbf79e8af94cb7f9e8df36789187052"
+ HostIDKey = attribute.Key("host.id")
+
+ // HostImageIDKey is the attribute Key conforming to the "host.image.id"
+ // semantic conventions. It represents the VM image ID or host OS image ID. For
+ // Cloud, this value is from the provider.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ami-07b06b442921831e5"
+ HostImageIDKey = attribute.Key("host.image.id")
+
+ // HostImageNameKey is the attribute Key conforming to the "host.image.name"
+ // semantic conventions. It represents the name of the VM image or OS install
+ // the host was instantiated from.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "infra-ami-eks-worker-node-7d4ec78312", "CentOS-8-x86_64-1905"
+ HostImageNameKey = attribute.Key("host.image.name")
+
+ // HostImageVersionKey is the attribute Key conforming to the
+ // "host.image.version" semantic conventions. It represents the version string
+ // of the VM image or host OS as defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0.1"
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ HostImageVersionKey = attribute.Key("host.image.version")
+
+ // HostIPKey is the attribute Key conforming to the "host.ip" semantic
+ // conventions. It represents the available IP addresses of the host, excluding
+ // loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "192.168.1.140", "fe80::abc2:4a28:737a:609e"
+ // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
+ // addresses MUST be specified in the [RFC 5952] format.
+ //
+ // [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html
+ HostIPKey = attribute.Key("host.ip")
+
+ // HostMacKey is the attribute Key conforming to the "host.mac" semantic
+ // conventions. It represents the available MAC addresses of the host, excluding
+ // loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F"
+ // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as
+ // hyphen-separated octets in uppercase hexadecimal form from most to least
+ // significant.
+ //
+ // [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf
+ HostMacKey = attribute.Key("host.mac")
+
+ // HostNameKey is the attribute Key conforming to the "host.name" semantic
+ // conventions. It represents the name of the host. On Unix systems, it may
+ // contain what the hostname command returns, or the fully qualified hostname,
+ // or another name specified by the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry-test"
+ HostNameKey = attribute.Key("host.name")
+
+ // HostTypeKey is the attribute Key conforming to the "host.type" semantic
+ // conventions. It represents the type of host. For Cloud, this must be the
+ // machine type.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "n1-standard-1"
+ HostTypeKey = attribute.Key("host.type")
+)
+
+// HostCPUCacheL2Size returns an attribute KeyValue conforming to the
+// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
+// level 2 memory cache available to the processor (in Bytes).
+func HostCPUCacheL2Size(val int) attribute.KeyValue {
+ return HostCPUCacheL2SizeKey.Int(val)
+}
+
+// HostCPUFamily returns an attribute KeyValue conforming to the
+// "host.cpu.family" semantic conventions. It represents the family or generation
+// of the CPU.
+func HostCPUFamily(val string) attribute.KeyValue {
+ return HostCPUFamilyKey.String(val)
+}
+
+// HostCPUModelID returns an attribute KeyValue conforming to the
+// "host.cpu.model.id" semantic conventions. It represents the model identifier.
+// It provides more granular information about the CPU, distinguishing it from
+// other CPUs within the same family.
+func HostCPUModelID(val string) attribute.KeyValue {
+ return HostCPUModelIDKey.String(val)
+}
+
+// HostCPUModelName returns an attribute KeyValue conforming to the
+// "host.cpu.model.name" semantic conventions. It represents the model
+// designation of the processor.
+func HostCPUModelName(val string) attribute.KeyValue {
+ return HostCPUModelNameKey.String(val)
+}
+
+// HostCPUStepping returns an attribute KeyValue conforming to the
+// "host.cpu.stepping" semantic conventions. It represents the stepping or core
+// revisions.
+func HostCPUStepping(val string) attribute.KeyValue {
+ return HostCPUSteppingKey.String(val)
+}
+
+// HostCPUVendorID returns an attribute KeyValue conforming to the
+// "host.cpu.vendor.id" semantic conventions. It represents the processor
+// manufacturer identifier. A maximum 12-character string.
+func HostCPUVendorID(val string) attribute.KeyValue {
+ return HostCPUVendorIDKey.String(val)
+}
+
+// HostID returns an attribute KeyValue conforming to the "host.id" semantic
+// conventions. It represents the unique host ID. For Cloud, this must be the
+// instance_id assigned by the cloud provider. For non-containerized systems,
+// this should be the `machine-id`. See the table below for the sources to use to
+// determine the `machine-id` based on operating system.
+func HostID(val string) attribute.KeyValue {
+ return HostIDKey.String(val)
+}
+
+// HostImageID returns an attribute KeyValue conforming to the "host.image.id"
+// semantic conventions. It represents the VM image ID or host OS image ID. For
+// Cloud, this value is from the provider.
+func HostImageID(val string) attribute.KeyValue {
+ return HostImageIDKey.String(val)
+}
+
+// HostImageName returns an attribute KeyValue conforming to the
+// "host.image.name" semantic conventions. It represents the name of the VM image
+// or OS install the host was instantiated from.
+func HostImageName(val string) attribute.KeyValue {
+ return HostImageNameKey.String(val)
+}
+
+// HostImageVersion returns an attribute KeyValue conforming to the
+// "host.image.version" semantic conventions. It represents the version string of
+// the VM image or host OS as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func HostImageVersion(val string) attribute.KeyValue {
+ return HostImageVersionKey.String(val)
+}
+
+// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
+// conventions. It represents the available IP addresses of the host, excluding
+// loopback interfaces.
+func HostIP(val ...string) attribute.KeyValue {
+ return HostIPKey.StringSlice(val)
+}
+
+// HostMac returns an attribute KeyValue conforming to the "host.mac" semantic
+// conventions. It represents the available MAC addresses of the host, excluding
+// loopback interfaces.
+func HostMac(val ...string) attribute.KeyValue {
+ return HostMacKey.StringSlice(val)
+}
+
+// HostName returns an attribute KeyValue conforming to the "host.name" semantic
+// conventions. It represents the name of the host. On Unix systems, it may
+// contain what the hostname command returns, or the fully qualified hostname, or
+// another name specified by the user.
+func HostName(val string) attribute.KeyValue {
+ return HostNameKey.String(val)
+}
+
+// HostType returns an attribute KeyValue conforming to the "host.type" semantic
+// conventions. It represents the type of host. For Cloud, this must be the
+// machine type.
+func HostType(val string) attribute.KeyValue {
+ return HostTypeKey.String(val)
+}
+
+// Enum values for host.arch
+var (
+ // AMD64
+ // Stability: development
+ HostArchAMD64 = HostArchKey.String("amd64")
+ // ARM32
+ // Stability: development
+ HostArchARM32 = HostArchKey.String("arm32")
+ // ARM64
+ // Stability: development
+ HostArchARM64 = HostArchKey.String("arm64")
+ // Itanium
+ // Stability: development
+ HostArchIA64 = HostArchKey.String("ia64")
+ // 32-bit PowerPC
+ // Stability: development
+ HostArchPPC32 = HostArchKey.String("ppc32")
+ // 64-bit PowerPC
+ // Stability: development
+ HostArchPPC64 = HostArchKey.String("ppc64")
+ // IBM z/Architecture
+ // Stability: development
+ HostArchS390x = HostArchKey.String("s390x")
+ // 32-bit x86
+ // Stability: development
+ HostArchX86 = HostArchKey.String("x86")
+)
+
+// Namespace: http
+const (
+ // HTTPConnectionStateKey is the attribute Key conforming to the
+ // "http.connection.state" semantic conventions. It represents the state of the
+ // HTTP connection in the HTTP connection pool.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "active", "idle"
+ HTTPConnectionStateKey = attribute.Key("http.connection.state")
+
+ // HTTPRequestBodySizeKey is the attribute Key conforming to the
+ // "http.request.body.size" semantic conventions. It represents the size of the
+ // request payload body in bytes. This is the number of bytes transferred
+ // excluding headers and is often, but not always, present as the
+ // [Content-Length] header. For requests using transport encoding, this should
+ // be the compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+ HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
+
+ // HTTPRequestMethodKey is the attribute Key conforming to the
+ // "http.request.method" semantic conventions. It represents the HTTP request
+ // method.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GET", "POST", "HEAD"
+ // Note: HTTP request method value SHOULD be "known" to the instrumentation.
+ // By default, this convention defines "known" methods as the ones listed in
+ // [RFC9110],
+ // the PATCH method defined in [RFC5789]
+ // and the QUERY method defined in [httpbis-safe-method-w-body].
+ //
+ // If the HTTP request method is not known to instrumentation, it MUST set the
+ // `http.request.method` attribute to `_OTHER`.
+ //
+ // If the HTTP instrumentation could end up converting valid HTTP request
+ // methods to `_OTHER`, then it MUST provide a way to override
+ // the list of known HTTP methods. If this override is done via environment
+ // variable, then the environment variable MUST be named
+ // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of
+ // case-sensitive known HTTP methods.
+ //
+ //
+ // If this override is done via declarative configuration, then the list MUST be
+ // configurable via the `known_methods` property
+ // (an array of case-sensitive strings with minimum items 0) under
+ // `.instrumentation/development.general.http.client` and/or
+ // `.instrumentation/development.general.http.server`.
+ //
+ // In either case, this list MUST be a full override of the default known
+ // methods,
+ // it is not a list of known methods in addition to the defaults.
+ //
+ // HTTP method names are case-sensitive and `http.request.method` attribute
+ // value MUST match a known HTTP method name exactly.
+ // Instrumentations for specific web frameworks that consider HTTP methods to be
+ // case insensitive, SHOULD populate a canonical equivalent.
+ // Tracing instrumentations that do so, MUST also set
+ // `http.request.method_original` to the original value.
+ //
+ // [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods
+ // [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html
+ // [httpbis-safe-method-w-body]: https://datatracker.ietf.org/doc/draft-ietf-httpbis-safe-method-w-body/?include_text=1
+ HTTPRequestMethodKey = attribute.Key("http.request.method")
+
+ // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
+ // "http.request.method_original" semantic conventions. It represents the
+ // original HTTP method sent by the client in the request line.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "GeT", "ACL", "foo"
+ HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
+
+ // HTTPRequestResendCountKey is the attribute Key conforming to the
+ // "http.request.resend_count" semantic conventions. It represents the ordinal
+ // number of request resending attempt (for any reason, including redirects).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Note: The resend count SHOULD be updated each time an HTTP request gets
+ // resent by the client, regardless of what was the cause of the resending (e.g.
+ // redirection, authorization failure, 503 Server Unavailable, network issues,
+ // or any other).
+ HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
+
+ // HTTPRequestSizeKey is the attribute Key conforming to the "http.request.size"
+ // semantic conventions. It represents the total size of the request in bytes.
+ // This should be the total number of bytes sent over the wire, including the
+ // request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request
+ // body if any.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ HTTPRequestSizeKey = attribute.Key("http.request.size")
+
+ // HTTPResponseBodySizeKey is the attribute Key conforming to the
+ // "http.response.body.size" semantic conventions. It represents the size of the
+ // response payload body in bytes. This is the number of bytes transferred
+ // excluding headers and is often, but not always, present as the
+ // [Content-Length] header. For requests using transport encoding, this should
+ // be the compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+ HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
+
+ // HTTPResponseSizeKey is the attribute Key conforming to the
+ // "http.response.size" semantic conventions. It represents the total size of
+ // the response in bytes. This should be the total number of bytes sent over the
+ // wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+ // headers, and response body and trailers if any.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ HTTPResponseSizeKey = attribute.Key("http.response.size")
+
+ // HTTPResponseStatusCodeKey is the attribute Key conforming to the
+ // "http.response.status_code" semantic conventions. It represents the
+ // [HTTP response status code].
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 200
+ //
+ // [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
+ HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
+
+ // HTTPRouteKey is the attribute Key conforming to the "http.route" semantic
+ // conventions. It represents the matched route template for the request. This
+ // MUST be low-cardinality and include all static path segments, with dynamic
+ // path segments represented with placeholders.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "/users/:userID?", "my-controller/my-action/{id?}"
+ // Note: MUST NOT be populated when this is not supported by the HTTP server
+ // framework as the route attribute should have low-cardinality and the URI path
+ // can NOT substitute it.
+ // SHOULD include the [application root] if there is one.
+ //
+ // A static path segment is a part of the route template with a fixed,
+ // low-cardinality value. This includes literal strings like `/users/` and
+ // placeholders that
+ // are constrained to a finite, predefined set of values, e.g. `{controller}` or
+ // `{action}`.
+ //
+ // A dynamic path segment is a placeholder for a value that can have high
+ // cardinality and is not constrained to a predefined list like static path
+ // segments.
+ //
+ // Instrumentations SHOULD use routing information provided by the corresponding
+ // web framework. They SHOULD pick the most precise source of routing
+ // information and MAY
+ // support custom route formatting. Instrumentations SHOULD document the format
+ // and the API used to obtain the route string.
+ //
+ // [application root]: /docs/http/http-spans.md#http-server-definitions
+ HTTPRouteKey = attribute.Key("http.route")
+)
+
+// HTTPRequestBodySize returns an attribute KeyValue conforming to the
+// "http.request.body.size" semantic conventions. It represents the size of the
+// request payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length] header. For requests using transport encoding, this should be
+// the compressed size.
+//
+// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+func HTTPRequestBodySize(val int) attribute.KeyValue {
+ return HTTPRequestBodySizeKey.Int(val)
+}
+
+// HTTPRequestHeader returns an attribute KeyValue conforming to the
+// "http.request.header" semantic conventions. It represents the HTTP request
+// headers, `` being the normalized HTTP Header name (lowercase), the value
+// being the header values.
+func HTTPRequestHeader(key string, val ...string) attribute.KeyValue {
+ return attribute.StringSlice("http.request.header."+key, val)
+}
+
+// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
+// "http.request.method_original" semantic conventions. It represents the
+// original HTTP method sent by the client in the request line.
+func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
+ return HTTPRequestMethodOriginalKey.String(val)
+}
+
+// HTTPRequestResendCount returns an attribute KeyValue conforming to the
+// "http.request.resend_count" semantic conventions. It represents the ordinal
+// number of request resending attempt (for any reason, including redirects).
+func HTTPRequestResendCount(val int) attribute.KeyValue {
+ return HTTPRequestResendCountKey.Int(val)
+}
+
+// HTTPRequestSize returns an attribute KeyValue conforming to the
+// "http.request.size" semantic conventions. It represents the total size of the
+// request in bytes. This should be the total number of bytes sent over the wire,
+// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers,
+// and request body if any.
+func HTTPRequestSize(val int) attribute.KeyValue {
+ return HTTPRequestSizeKey.Int(val)
+}
+
+// HTTPResponseBodySize returns an attribute KeyValue conforming to the
+// "http.response.body.size" semantic conventions. It represents the size of the
+// response payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length] header. For requests using transport encoding, this should be
+// the compressed size.
+//
+// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length
+func HTTPResponseBodySize(val int) attribute.KeyValue {
+ return HTTPResponseBodySizeKey.Int(val)
+}
+
+// HTTPResponseHeader returns an attribute KeyValue conforming to the
+// "http.response.header" semantic conventions. It represents the HTTP response
+// headers, `` being the normalized HTTP Header name (lowercase), the value
+// being the header values.
+func HTTPResponseHeader(key string, val ...string) attribute.KeyValue {
+ return attribute.StringSlice("http.response.header."+key, val)
+}
+
+// HTTPResponseSize returns an attribute KeyValue conforming to the
+// "http.response.size" semantic conventions. It represents the total size of the
+// response in bytes. This should be the total number of bytes sent over the
+// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+// headers, and response body and trailers if any.
+func HTTPResponseSize(val int) attribute.KeyValue {
+ return HTTPResponseSizeKey.Int(val)
+}
+
+// HTTPResponseStatusCode returns an attribute KeyValue conforming to the
+// "http.response.status_code" semantic conventions. It represents the
+// [HTTP response status code].
+//
+// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6
+func HTTPResponseStatusCode(val int) attribute.KeyValue {
+ return HTTPResponseStatusCodeKey.Int(val)
+}
+
+// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
+// semantic conventions. It represents the matched route template for the
+// request. This MUST be low-cardinality and include all static path segments,
+// with dynamic path segments represented with placeholders.
+func HTTPRoute(val string) attribute.KeyValue {
+ return HTTPRouteKey.String(val)
+}
+
+// Enum values for http.connection.state
+var (
+ // active state.
+ // Stability: development
+ HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
+ // idle state.
+ // Stability: development
+ HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
+)
+
+// Enum values for http.request.method
+var (
+ // CONNECT method.
+ // Stability: stable
+ HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
+ // DELETE method.
+ // Stability: stable
+ HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
+ // GET method.
+ // Stability: stable
+ HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
+ // HEAD method.
+ // Stability: stable
+ HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
+ // OPTIONS method.
+ // Stability: stable
+ HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
+ // PATCH method.
+ // Stability: stable
+ HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
+ // POST method.
+ // Stability: stable
+ HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
+ // PUT method.
+ // Stability: stable
+ HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
+ // TRACE method.
+ // Stability: stable
+ HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
+ // QUERY method.
+ // Stability: development
+ HTTPRequestMethodQuery = HTTPRequestMethodKey.String("QUERY")
+ // Any HTTP method that the instrumentation has no prior knowledge of.
+ // Stability: stable
+ HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
+)
+
+// Namespace: hw
+const (
+ // HwBatteryCapacityKey is the attribute Key conforming to the
+ // "hw.battery.capacity" semantic conventions. It represents the design capacity
+ // in Watts-hours or Ampere-hours.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9.3Ah", "50Wh"
+ HwBatteryCapacityKey = attribute.Key("hw.battery.capacity")
+
+ // HwBatteryChemistryKey is the attribute Key conforming to the
+ // "hw.battery.chemistry" semantic conventions. It represents the battery
+ // [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Li-ion", "NiMH"
+ //
+ // [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html
+ HwBatteryChemistryKey = attribute.Key("hw.battery.chemistry")
+
+ // HwBatteryStateKey is the attribute Key conforming to the "hw.battery.state"
+ // semantic conventions. It represents the current state of the battery.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwBatteryStateKey = attribute.Key("hw.battery.state")
+
+ // HwBiosVersionKey is the attribute Key conforming to the "hw.bios_version"
+ // semantic conventions. It represents the BIOS version of the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.2.3"
+ HwBiosVersionKey = attribute.Key("hw.bios_version")
+
+ // HwDriverVersionKey is the attribute Key conforming to the "hw.driver_version"
+ // semantic conventions. It represents the driver version for the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10.2.1-3"
+ HwDriverVersionKey = attribute.Key("hw.driver_version")
+
+ // HwEnclosureTypeKey is the attribute Key conforming to the "hw.enclosure.type"
+ // semantic conventions. It represents the type of the enclosure (useful for
+ // modular systems).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Computer", "Storage", "Switch"
+ HwEnclosureTypeKey = attribute.Key("hw.enclosure.type")
+
+ // HwFirmwareVersionKey is the attribute Key conforming to the
+ // "hw.firmware_version" semantic conventions. It represents the firmware
+ // version of the hardware component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2.0.1"
+ HwFirmwareVersionKey = attribute.Key("hw.firmware_version")
+
+ // HwGpuTaskKey is the attribute Key conforming to the "hw.gpu.task" semantic
+ // conventions. It represents the type of task the GPU is performing.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwGpuTaskKey = attribute.Key("hw.gpu.task")
+
+ // HwIDKey is the attribute Key conforming to the "hw.id" semantic conventions.
+ // It represents an identifier for the hardware component, unique within the
+ // monitored host.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "win32battery_battery_testsysa33_1"
+ HwIDKey = attribute.Key("hw.id")
+
+ // HwLimitTypeKey is the attribute Key conforming to the "hw.limit_type"
+ // semantic conventions. It represents the type of limit for hardware
+ // components.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwLimitTypeKey = attribute.Key("hw.limit_type")
+
+ // HwLogicalDiskRaidLevelKey is the attribute Key conforming to the
+ // "hw.logical_disk.raid_level" semantic conventions. It represents the RAID
+ // Level of the logical disk.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "RAID0+1", "RAID5", "RAID10"
+ HwLogicalDiskRaidLevelKey = attribute.Key("hw.logical_disk.raid_level")
+
+ // HwLogicalDiskStateKey is the attribute Key conforming to the
+ // "hw.logical_disk.state" semantic conventions. It represents the state of the
+ // logical disk space usage.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwLogicalDiskStateKey = attribute.Key("hw.logical_disk.state")
+
+ // HwMemoryTypeKey is the attribute Key conforming to the "hw.memory.type"
+ // semantic conventions. It represents the type of the memory module.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "DDR4", "DDR5", "LPDDR5"
+ HwMemoryTypeKey = attribute.Key("hw.memory.type")
+
+ // HwModelKey is the attribute Key conforming to the "hw.model" semantic
+ // conventions. It represents the descriptive model name of the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "PERC H740P", "Intel(R) Core(TM) i7-10700K", "Dell XPS 15 Battery"
+ HwModelKey = attribute.Key("hw.model")
+
+ // HwNameKey is the attribute Key conforming to the "hw.name" semantic
+ // conventions. It represents an easily-recognizable name for the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "eth0"
+ HwNameKey = attribute.Key("hw.name")
+
+ // HwNetworkLogicalAddressesKey is the attribute Key conforming to the
+ // "hw.network.logical_addresses" semantic conventions. It represents the
+ // logical addresses of the adapter (e.g. IP address, or WWPN).
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "172.16.8.21", "57.11.193.42"
+ HwNetworkLogicalAddressesKey = attribute.Key("hw.network.logical_addresses")
+
+ // HwNetworkPhysicalAddressKey is the attribute Key conforming to the
+ // "hw.network.physical_address" semantic conventions. It represents the
+ // physical address of the adapter (e.g. MAC address, or WWNN).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "00-90-F5-E9-7B-36"
+ HwNetworkPhysicalAddressKey = attribute.Key("hw.network.physical_address")
+
+ // HwParentKey is the attribute Key conforming to the "hw.parent" semantic
+ // conventions. It represents the unique identifier of the parent component
+ // (typically the `hw.id` attribute of the enclosure, or disk controller).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "dellStorage_perc_0"
+ HwParentKey = attribute.Key("hw.parent")
+
+ // HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the
+ // "hw.physical_disk.smart_attribute" semantic conventions. It represents the
+ // [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute
+ // of the physical disk.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Spin Retry Count", "Seek Error Rate", "Raw Read Error Rate"
+ //
+ // [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.
+ HwPhysicalDiskSmartAttributeKey = attribute.Key("hw.physical_disk.smart_attribute")
+
+ // HwPhysicalDiskStateKey is the attribute Key conforming to the
+ // "hw.physical_disk.state" semantic conventions. It represents the state of the
+ // physical disk endurance utilization.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwPhysicalDiskStateKey = attribute.Key("hw.physical_disk.state")
+
+ // HwPhysicalDiskTypeKey is the attribute Key conforming to the
+ // "hw.physical_disk.type" semantic conventions. It represents the type of the
+ // physical disk.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "HDD", "SSD", "10K"
+ HwPhysicalDiskTypeKey = attribute.Key("hw.physical_disk.type")
+
+ // HwSensorLocationKey is the attribute Key conforming to the
+ // "hw.sensor_location" semantic conventions. It represents the location of the
+ // sensor.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cpu0", "ps1", "INLET", "CPU0_DIE", "AMBIENT", "MOTHERBOARD", "PS0
+ // V3_3", "MAIN_12V", "CPU_VCORE"
+ HwSensorLocationKey = attribute.Key("hw.sensor_location")
+
+ // HwSerialNumberKey is the attribute Key conforming to the "hw.serial_number"
+ // semantic conventions. It represents the serial number of the hardware
+ // component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CNFCP0123456789"
+ HwSerialNumberKey = attribute.Key("hw.serial_number")
+
+ // HwStateKey is the attribute Key conforming to the "hw.state" semantic
+ // conventions. It represents the current state of the component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwStateKey = attribute.Key("hw.state")
+
+ // HwTapeDriveOperationTypeKey is the attribute Key conforming to the
+ // "hw.tape_drive.operation_type" semantic conventions. It represents the type
+ // of tape drive operation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ HwTapeDriveOperationTypeKey = attribute.Key("hw.tape_drive.operation_type")
+
+ // HwTypeKey is the attribute Key conforming to the "hw.type" semantic
+ // conventions. It represents the type of the component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: Describes the category of the hardware component for which `hw.state`
+ // is being reported. For example, `hw.type=temperature` along with
+ // `hw.state=degraded` would indicate that the temperature of the hardware
+ // component has been reported as `degraded`.
+ HwTypeKey = attribute.Key("hw.type")
+
+ // HwVendorKey is the attribute Key conforming to the "hw.vendor" semantic
+ // conventions. It represents the vendor name of the hardware component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Dell", "HP", "Intel", "AMD", "LSI", "Lenovo"
+ HwVendorKey = attribute.Key("hw.vendor")
+)
+
+// HwBatteryCapacity returns an attribute KeyValue conforming to the
+// "hw.battery.capacity" semantic conventions. It represents the design capacity
+// in Watts-hours or Ampere-hours.
+func HwBatteryCapacity(val string) attribute.KeyValue {
+ return HwBatteryCapacityKey.String(val)
+}
+
+// HwBatteryChemistry returns an attribute KeyValue conforming to the
+// "hw.battery.chemistry" semantic conventions. It represents the battery
+// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc.
+//
+// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html
+func HwBatteryChemistry(val string) attribute.KeyValue {
+ return HwBatteryChemistryKey.String(val)
+}
+
+// HwBiosVersion returns an attribute KeyValue conforming to the
+// "hw.bios_version" semantic conventions. It represents the BIOS version of the
+// hardware component.
+func HwBiosVersion(val string) attribute.KeyValue {
+ return HwBiosVersionKey.String(val)
+}
+
+// HwDriverVersion returns an attribute KeyValue conforming to the
+// "hw.driver_version" semantic conventions. It represents the driver version for
+// the hardware component.
+func HwDriverVersion(val string) attribute.KeyValue {
+ return HwDriverVersionKey.String(val)
+}
+
+// HwEnclosureType returns an attribute KeyValue conforming to the
+// "hw.enclosure.type" semantic conventions. It represents the type of the
+// enclosure (useful for modular systems).
+func HwEnclosureType(val string) attribute.KeyValue {
+ return HwEnclosureTypeKey.String(val)
+}
+
+// HwFirmwareVersion returns an attribute KeyValue conforming to the
+// "hw.firmware_version" semantic conventions. It represents the firmware version
+// of the hardware component.
+func HwFirmwareVersion(val string) attribute.KeyValue {
+ return HwFirmwareVersionKey.String(val)
+}
+
+// HwID returns an attribute KeyValue conforming to the "hw.id" semantic
+// conventions. It represents an identifier for the hardware component, unique
+// within the monitored host.
+func HwID(val string) attribute.KeyValue {
+ return HwIDKey.String(val)
+}
+
+// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the
+// "hw.logical_disk.raid_level" semantic conventions. It represents the RAID
+// Level of the logical disk.
+func HwLogicalDiskRaidLevel(val string) attribute.KeyValue {
+ return HwLogicalDiskRaidLevelKey.String(val)
+}
+
+// HwMemoryType returns an attribute KeyValue conforming to the "hw.memory.type"
+// semantic conventions. It represents the type of the memory module.
+func HwMemoryType(val string) attribute.KeyValue {
+ return HwMemoryTypeKey.String(val)
+}
+
+// HwModel returns an attribute KeyValue conforming to the "hw.model" semantic
+// conventions. It represents the descriptive model name of the hardware
+// component.
+func HwModel(val string) attribute.KeyValue {
+ return HwModelKey.String(val)
+}
+
+// HwName returns an attribute KeyValue conforming to the "hw.name" semantic
+// conventions. It represents an easily-recognizable name for the hardware
+// component.
+func HwName(val string) attribute.KeyValue {
+ return HwNameKey.String(val)
+}
+
+// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the
+// "hw.network.logical_addresses" semantic conventions. It represents the logical
+// addresses of the adapter (e.g. IP address, or WWPN).
+func HwNetworkLogicalAddresses(val ...string) attribute.KeyValue {
+ return HwNetworkLogicalAddressesKey.StringSlice(val)
+}
+
+// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the
+// "hw.network.physical_address" semantic conventions. It represents the physical
+// address of the adapter (e.g. MAC address, or WWNN).
+func HwNetworkPhysicalAddress(val string) attribute.KeyValue {
+ return HwNetworkPhysicalAddressKey.String(val)
+}
+
+// HwParent returns an attribute KeyValue conforming to the "hw.parent" semantic
+// conventions. It represents the unique identifier of the parent component
+// (typically the `hw.id` attribute of the enclosure, or disk controller).
+func HwParent(val string) attribute.KeyValue {
+ return HwParentKey.String(val)
+}
+
+// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the
+// "hw.physical_disk.smart_attribute" semantic conventions. It represents the
+// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute
+// of the physical disk.
+//
+// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T.
+func HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue {
+ return HwPhysicalDiskSmartAttributeKey.String(val)
+}
+
+// HwPhysicalDiskType returns an attribute KeyValue conforming to the
+// "hw.physical_disk.type" semantic conventions. It represents the type of the
+// physical disk.
+func HwPhysicalDiskType(val string) attribute.KeyValue {
+ return HwPhysicalDiskTypeKey.String(val)
+}
+
+// HwSensorLocation returns an attribute KeyValue conforming to the
+// "hw.sensor_location" semantic conventions. It represents the location of the
+// sensor.
+func HwSensorLocation(val string) attribute.KeyValue {
+ return HwSensorLocationKey.String(val)
+}
+
+// HwSerialNumber returns an attribute KeyValue conforming to the
+// "hw.serial_number" semantic conventions. It represents the serial number of
+// the hardware component.
+func HwSerialNumber(val string) attribute.KeyValue {
+ return HwSerialNumberKey.String(val)
+}
+
+// HwVendor returns an attribute KeyValue conforming to the "hw.vendor" semantic
+// conventions. It represents the vendor name of the hardware component.
+func HwVendor(val string) attribute.KeyValue {
+ return HwVendorKey.String(val)
+}
+
+// Enum values for hw.battery.state
+var (
+ // Charging
+ // Stability: development
+ HwBatteryStateCharging = HwBatteryStateKey.String("charging")
+ // Discharging
+ // Stability: development
+ HwBatteryStateDischarging = HwBatteryStateKey.String("discharging")
+)
+
+// Enum values for hw.gpu.task
+var (
+ // Decoder
+ // Stability: development
+ HwGpuTaskDecoder = HwGpuTaskKey.String("decoder")
+ // Encoder
+ // Stability: development
+ HwGpuTaskEncoder = HwGpuTaskKey.String("encoder")
+ // General
+ // Stability: development
+ HwGpuTaskGeneral = HwGpuTaskKey.String("general")
+)
+
+// Enum values for hw.limit_type
+var (
+ // Critical
+ // Stability: development
+ HwLimitTypeCritical = HwLimitTypeKey.String("critical")
+ // Degraded
+ // Stability: development
+ HwLimitTypeDegraded = HwLimitTypeKey.String("degraded")
+ // High Critical
+ // Stability: development
+ HwLimitTypeHighCritical = HwLimitTypeKey.String("high.critical")
+ // High Degraded
+ // Stability: development
+ HwLimitTypeHighDegraded = HwLimitTypeKey.String("high.degraded")
+ // Low Critical
+ // Stability: development
+ HwLimitTypeLowCritical = HwLimitTypeKey.String("low.critical")
+ // Low Degraded
+ // Stability: development
+ HwLimitTypeLowDegraded = HwLimitTypeKey.String("low.degraded")
+ // Maximum
+ // Stability: development
+ HwLimitTypeMax = HwLimitTypeKey.String("max")
+ // Throttled
+ // Stability: development
+ HwLimitTypeThrottled = HwLimitTypeKey.String("throttled")
+ // Turbo
+ // Stability: development
+ HwLimitTypeTurbo = HwLimitTypeKey.String("turbo")
+)
+
+// Enum values for hw.logical_disk.state
+var (
+ // Used
+ // Stability: development
+ HwLogicalDiskStateUsed = HwLogicalDiskStateKey.String("used")
+ // Free
+ // Stability: development
+ HwLogicalDiskStateFree = HwLogicalDiskStateKey.String("free")
+)
+
+// Enum values for hw.physical_disk.state
+var (
+ // Remaining
+ // Stability: development
+ HwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String("remaining")
+)
+
+// Enum values for hw.state
+var (
+ // Degraded
+ // Stability: development
+ HwStateDegraded = HwStateKey.String("degraded")
+ // Failed
+ // Stability: development
+ HwStateFailed = HwStateKey.String("failed")
+ // Needs Cleaning
+ // Stability: development
+ HwStateNeedsCleaning = HwStateKey.String("needs_cleaning")
+ // OK
+ // Stability: development
+ HwStateOk = HwStateKey.String("ok")
+ // Predicted Failure
+ // Stability: development
+ HwStatePredictedFailure = HwStateKey.String("predicted_failure")
+)
+
+// Enum values for hw.tape_drive.operation_type
+var (
+ // Mount
+ // Stability: development
+ HwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String("mount")
+ // Unmount
+ // Stability: development
+ HwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String("unmount")
+ // Clean
+ // Stability: development
+ HwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String("clean")
+)
+
+// Enum values for hw.type
+var (
+ // Battery
+ // Stability: development
+ HwTypeBattery = HwTypeKey.String("battery")
+ // CPU
+ // Stability: development
+ HwTypeCPU = HwTypeKey.String("cpu")
+ // Disk controller
+ // Stability: development
+ HwTypeDiskController = HwTypeKey.String("disk_controller")
+ // Enclosure
+ // Stability: development
+ HwTypeEnclosure = HwTypeKey.String("enclosure")
+ // Fan
+ // Stability: development
+ HwTypeFan = HwTypeKey.String("fan")
+ // GPU
+ // Stability: development
+ HwTypeGpu = HwTypeKey.String("gpu")
+ // Logical disk
+ // Stability: development
+ HwTypeLogicalDisk = HwTypeKey.String("logical_disk")
+ // Memory
+ // Stability: development
+ HwTypeMemory = HwTypeKey.String("memory")
+ // Network
+ // Stability: development
+ HwTypeNetwork = HwTypeKey.String("network")
+ // Physical disk
+ // Stability: development
+ HwTypePhysicalDisk = HwTypeKey.String("physical_disk")
+ // Power supply
+ // Stability: development
+ HwTypePowerSupply = HwTypeKey.String("power_supply")
+ // Tape drive
+ // Stability: development
+ HwTypeTapeDrive = HwTypeKey.String("tape_drive")
+ // Temperature
+ // Stability: development
+ HwTypeTemperature = HwTypeKey.String("temperature")
+ // Voltage
+ // Stability: development
+ HwTypeVoltage = HwTypeKey.String("voltage")
+)
+
+// Namespace: ios
+const (
+ // IOSAppStateKey is the attribute Key conforming to the "ios.app.state"
+ // semantic conventions. It represents the this attribute represents the state
+ // of the application.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The iOS lifecycle states are defined in the
+ // [UIApplicationDelegate documentation], and from which the `OS terminology`
+ // column values are derived.
+ //
+ // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate
+ IOSAppStateKey = attribute.Key("ios.app.state")
+)
+
+// Enum values for ios.app.state
+var (
+ // The app has become `active`. Associated with UIKit notification
+ // `applicationDidBecomeActive`.
+ //
+ // Stability: development
+ IOSAppStateActive = IOSAppStateKey.String("active")
+ // The app is now `inactive`. Associated with UIKit notification
+ // `applicationWillResignActive`.
+ //
+ // Stability: development
+ IOSAppStateInactive = IOSAppStateKey.String("inactive")
+ // The app is now in the background. This value is associated with UIKit
+ // notification `applicationDidEnterBackground`.
+ //
+ // Stability: development
+ IOSAppStateBackground = IOSAppStateKey.String("background")
+ // The app is now in the foreground. This value is associated with UIKit
+ // notification `applicationWillEnterForeground`.
+ //
+ // Stability: development
+ IOSAppStateForeground = IOSAppStateKey.String("foreground")
+ // The app is about to terminate. Associated with UIKit notification
+ // `applicationWillTerminate`.
+ //
+ // Stability: development
+ IOSAppStateTerminate = IOSAppStateKey.String("terminate")
+)
+
+// Namespace: jsonrpc
+const (
+ // JSONRPCProtocolVersionKey is the attribute Key conforming to the
+ // "jsonrpc.protocol.version" semantic conventions. It represents the protocol
+ // version, as specified in the `jsonrpc` property of the request and its
+ // corresponding response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2.0", "1.0"
+ JSONRPCProtocolVersionKey = attribute.Key("jsonrpc.protocol.version")
+
+ // JSONRPCRequestIDKey is the attribute Key conforming to the
+ // "jsonrpc.request.id" semantic conventions. It represents a string
+ // representation of the `id` property of the request and its corresponding
+ // response.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "10", "request-7"
+ // Note: Under the [JSON-RPC specification], the `id` property may be a string,
+ // number, null, or omitted entirely. When omitted, the request is treated as a
+ // notification. Using `null` is not equivalent to omitting the `id`, but it is
+ // discouraged.
+ // Instrumentations SHOULD NOT capture this attribute when the `id` is `null` or
+ // omitted.
+ //
+ // [JSON-RPC specification]: https://www.jsonrpc.org/specification
+ JSONRPCRequestIDKey = attribute.Key("jsonrpc.request.id")
+)
+
+// JSONRPCProtocolVersion returns an attribute KeyValue conforming to the
+// "jsonrpc.protocol.version" semantic conventions. It represents the protocol
+// version, as specified in the `jsonrpc` property of the request and its
+// corresponding response.
+func JSONRPCProtocolVersion(val string) attribute.KeyValue {
+ return JSONRPCProtocolVersionKey.String(val)
+}
+
+// JSONRPCRequestID returns an attribute KeyValue conforming to the
+// "jsonrpc.request.id" semantic conventions. It represents a string
+// representation of the `id` property of the request and its corresponding
+// response.
+func JSONRPCRequestID(val string) attribute.KeyValue {
+ return JSONRPCRequestIDKey.String(val)
+}
+
+// Namespace: k8s
+const (
+ // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name"
+ // semantic conventions. It represents the name of the cluster.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry-cluster"
+ K8SClusterNameKey = attribute.Key("k8s.cluster.name")
+
+ // K8SClusterUIDKey is the attribute Key conforming to the "k8s.cluster.uid"
+ // semantic conventions. It represents a pseudo-ID for the cluster, set to the
+ // UID of the `kube-system` namespace.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d"
+ // Note: K8s doesn't have support for obtaining a cluster ID. If this is ever
+ // added, we will recommend collecting the `k8s.cluster.uid` through the
+ // official APIs. In the meantime, we are able to use the `uid` of the
+ // `kube-system` namespace as a proxy for cluster ID. Read on for the
+ // rationale.
+ //
+ // Every object created in a K8s cluster is assigned a distinct UID. The
+ // `kube-system` namespace is used by Kubernetes itself and will exist
+ // for the lifetime of the cluster. Using the `uid` of the `kube-system`
+ // namespace is a reasonable proxy for the K8s ClusterID as it will only
+ // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
+ // UUIDs as standardized by
+ // [ISO/IEC 9834-8 and ITU-T X.667].
+ // Which states:
+ //
+ // > If generated according to one of the mechanisms defined in Rec.
+ // > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
+ // > different from all other UUIDs generated before 3603 A.D., or is
+ // > extremely likely to be different (depending on the mechanism chosen).
+ //
+ // Therefore, UIDs between clusters should be extremely unlikely to
+ // conflict.
+ //
+ // [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html
+ K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
+
+ // K8SContainerEphemeralStorageFsTypeKey is the attribute Key conforming to the
+ // "k8s.container.ephemeral_storage.fs_type" semantic conventions. It represents
+ // the type of file system component for ephemeral storage.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "rootfs", "logs"
+ // Note: Eviction decisions based on ephemeral-storage resource limits are made
+ // based on the total container usage.
+ K8SContainerEphemeralStorageFsTypeKey = attribute.Key("k8s.container.ephemeral_storage.fs_type")
+
+ // K8SContainerNameKey is the attribute Key conforming to the
+ // "k8s.container.name" semantic conventions. It represents the name of the
+ // Container from Pod specification, must be unique within a Pod. Container
+ // runtime usually uses different globally unique name (`container.name`).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "redis"
+ K8SContainerNameKey = attribute.Key("k8s.container.name")
+
+ // K8SContainerRestartCountKey is the attribute Key conforming to the
+ // "k8s.container.restart_count" semantic conventions. It represents the number
+ // of times the container was restarted. This attribute can be used to identify
+ // a particular container (running or stopped) within a container spec.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
+
+ // K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to
+ // the "k8s.container.status.last_terminated_reason" semantic conventions. It
+ // represents the last terminated reason of the Container.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Evicted", "Error"
+ K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
+
+ // K8SContainerStatusReasonKey is the attribute Key conforming to the
+ // "k8s.container.status.reason" semantic conventions. It represents the reason
+ // for the container state. Corresponds to the `reason` field of the:
+ // [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ContainerCreating", "CrashLoopBackOff",
+ // "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff",
+ // "OOMKilled", "Completed", "Error", "ContainerCannotRun"
+ //
+ // [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstatewaiting-v1-core
+ // [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstateterminated-v1-core
+ K8SContainerStatusReasonKey = attribute.Key("k8s.container.status.reason")
+
+ // K8SContainerStatusStateKey is the attribute Key conforming to the
+ // "k8s.container.status.state" semantic conventions. It represents the state of
+ // the container. [K8s ContainerState].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "terminated", "running", "waiting"
+ //
+ // [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#containerstate-v1-core
+ K8SContainerStatusStateKey = attribute.Key("k8s.container.status.state")
+
+ // K8SCronJobNameKey is the attribute Key conforming to the "k8s.cronjob.name"
+ // semantic conventions. It represents the name of the CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
+
+ // K8SCronJobUIDKey is the attribute Key conforming to the "k8s.cronjob.uid"
+ // semantic conventions. It represents the UID of the CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
+
+ // K8SDaemonSetNameKey is the attribute Key conforming to the
+ // "k8s.daemonset.name" semantic conventions. It represents the name of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
+
+ // K8SDaemonSetUIDKey is the attribute Key conforming to the "k8s.daemonset.uid"
+ // semantic conventions. It represents the UID of the DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
+
+ // K8SDeploymentNameKey is the attribute Key conforming to the
+ // "k8s.deployment.name" semantic conventions. It represents the name of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
+
+ // K8SDeploymentUIDKey is the attribute Key conforming to the
+ // "k8s.deployment.uid" semantic conventions. It represents the UID of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
+
+ // K8SHPAMetricTypeKey is the attribute Key conforming to the
+ // "k8s.hpa.metric.type" semantic conventions. It represents the type of metric
+ // source for the horizontal pod autoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Resource", "ContainerResource"
+ // Note: This attribute reflects the `type` field of spec.metrics[] in the HPA.
+ K8SHPAMetricTypeKey = attribute.Key("k8s.hpa.metric.type")
+
+ // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic
+ // conventions. It represents the name of the horizontal pod autoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SHPANameKey = attribute.Key("k8s.hpa.name")
+
+ // K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the
+ // "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the
+ // API version of the target resource to scale for the HorizontalPodAutoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "apps/v1", "autoscaling/v2"
+ // Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA
+ // spec.
+ K8SHPAScaletargetrefAPIVersionKey = attribute.Key("k8s.hpa.scaletargetref.api_version")
+
+ // K8SHPAScaletargetrefKindKey is the attribute Key conforming to the
+ // "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of
+ // the target resource to scale for the HorizontalPodAutoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Deployment", "StatefulSet"
+ // Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.
+ K8SHPAScaletargetrefKindKey = attribute.Key("k8s.hpa.scaletargetref.kind")
+
+ // K8SHPAScaletargetrefNameKey is the attribute Key conforming to the
+ // "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of
+ // the target resource to scale for the HorizontalPodAutoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-deployment", "my-statefulset"
+ // Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec.
+ K8SHPAScaletargetrefNameKey = attribute.Key("k8s.hpa.scaletargetref.name")
+
+ // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic
+ // conventions. It represents the UID of the horizontal pod autoscaler.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SHPAUIDKey = attribute.Key("k8s.hpa.uid")
+
+ // K8SHugepageSizeKey is the attribute Key conforming to the "k8s.hugepage.size"
+ // semantic conventions. It represents the size (identifier) of the K8s huge
+ // page.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2Mi"
+ K8SHugepageSizeKey = attribute.Key("k8s.hugepage.size")
+
+ // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic
+ // conventions. It represents the name of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SJobNameKey = attribute.Key("k8s.job.name")
+
+ // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" semantic
+ // conventions. It represents the UID of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SJobUIDKey = attribute.Key("k8s.job.uid")
+
+ // K8SNamespaceNameKey is the attribute Key conforming to the
+ // "k8s.namespace.name" semantic conventions. It represents the name of the
+ // namespace that the pod is running in.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "default"
+ K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
+
+ // K8SNamespacePhaseKey is the attribute Key conforming to the
+ // "k8s.namespace.phase" semantic conventions. It represents the phase of the
+ // K8s namespace.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "active", "terminating"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s NamespaceStatus]
+ //
+ // [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#namespacestatus-v1-core
+ K8SNamespacePhaseKey = attribute.Key("k8s.namespace.phase")
+
+ // K8SNodeConditionStatusKey is the attribute Key conforming to the
+ // "k8s.node.condition.status" semantic conventions. It represents the status of
+ // the condition, one of True, False, Unknown.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "true", "false", "unknown"
+ // Note: This attribute aligns with the `status` field of the
+ // [NodeCondition]
+ //
+ // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#nodecondition-v1-core
+ K8SNodeConditionStatusKey = attribute.Key("k8s.node.condition.status")
+
+ // K8SNodeConditionTypeKey is the attribute Key conforming to the
+ // "k8s.node.condition.type" semantic conventions. It represents the condition
+ // type of a K8s Node.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Ready", "DiskPressure"
+ // Note: K8s Node conditions as described
+ // by [K8s documentation].
+ //
+ // This attribute aligns with the `type` field of the
+ // [NodeCondition]
+ //
+ // The set of possible values is not limited to those listed here. Managed
+ // Kubernetes environments,
+ // or custom controllers MAY introduce additional node condition types.
+ // When this occurs, the exact value as reported by the Kubernetes API SHOULD be
+ // used.
+ //
+ // [K8s documentation]: https://kubernetes.io/docs/reference/node/node-status/#condition
+ // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#nodecondition-v1-core
+ K8SNodeConditionTypeKey = attribute.Key("k8s.node.condition.type")
+
+ // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
+ // semantic conventions. It represents the name of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "node-1"
+ K8SNodeNameKey = attribute.Key("k8s.node.name")
+
+ // K8SNodeSystemContainerNameKey is the attribute Key conforming to the
+ // "k8s.node.system_container.name" semantic conventions. It represents the name
+ // of the system container running on the K8s Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "kubelet", "runtime", "pods", "misc"
+ K8SNodeSystemContainerNameKey = attribute.Key("k8s.node.system_container.name")
+
+ // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" semantic
+ // conventions. It represents the UID of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2"
+ K8SNodeUIDKey = attribute.Key("k8s.node.uid")
+
+ // K8SPersistentvolumeNameKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.name" semantic conventions. It represents the name of
+ // the PersistentVolume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pv-data-01"
+ K8SPersistentvolumeNameKey = attribute.Key("k8s.persistentvolume.name")
+
+ // K8SPersistentvolumeReclaimPolicyKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.reclaim_policy" semantic conventions. It represents the
+ // reclaim policy of the PersistentVolume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Delete", "Retain", "Recycle"
+ // Note: This attribute aligns with the `persistentVolumeReclaimPolicy` field of
+ // the
+ // [K8s PersistentVolumeSpec].
+ //
+ // [K8s PersistentVolumeSpec]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeSpec
+ K8SPersistentvolumeReclaimPolicyKey = attribute.Key("k8s.persistentvolume.reclaim_policy")
+
+ // K8SPersistentvolumeStatusPhaseKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.status.phase" semantic conventions. It represents the
+ // phase of the PersistentVolume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Pending", "Available", "Bound", "Released", "Failed"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s PersistentVolumeStatus].
+ //
+ // [K8s PersistentVolumeStatus]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-v1/#PersistentVolumeStatus
+ K8SPersistentvolumeStatusPhaseKey = attribute.Key("k8s.persistentvolume.status.phase")
+
+ // K8SPersistentvolumeUIDKey is the attribute Key conforming to the
+ // "k8s.persistentvolume.uid" semantic conventions. It represents the UID of the
+ // PersistentVolume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPersistentvolumeUIDKey = attribute.Key("k8s.persistentvolume.uid")
+
+ // K8SPersistentvolumeclaimNameKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.name" semantic conventions. It represents the name
+ // of the PersistentVolumeClaim.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pvc-data-01"
+ K8SPersistentvolumeclaimNameKey = attribute.Key("k8s.persistentvolumeclaim.name")
+
+ // K8SPersistentvolumeclaimStatusPhaseKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.status.phase" semantic conventions. It represents
+ // the phase of the PersistentVolumeClaim.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Pending", "Bound", "Lost"
+ // Note: This attribute aligns with the `phase` field of the
+ // [K8s PersistentVolumeClaimStatus].
+ //
+ // [K8s PersistentVolumeClaimStatus]: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#PersistentVolumeClaimStatus
+ K8SPersistentvolumeclaimStatusPhaseKey = attribute.Key("k8s.persistentvolumeclaim.status.phase")
+
+ // K8SPersistentvolumeclaimUIDKey is the attribute Key conforming to the
+ // "k8s.persistentvolumeclaim.uid" semantic conventions. It represents the UID
+ // of the PersistentVolumeClaim.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPersistentvolumeclaimUIDKey = attribute.Key("k8s.persistentvolumeclaim.uid")
+
+ // K8SPodHostnameKey is the attribute Key conforming to the "k8s.pod.hostname"
+ // semantic conventions. It represents the specifies the hostname of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "collector-gateway"
+ // Note: The K8s Pod spec has an optional hostname field, which can be used to
+ // specify a hostname.
+ // Refer to [K8s docs]
+ // for more information about this field.
+ //
+ // This attribute aligns with the `hostname` field of the
+ // [K8s PodSpec].
+ //
+ // [K8s docs]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-hostname-and-subdomain-field
+ // [K8s PodSpec]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podspec-v1-core
+ K8SPodHostnameKey = attribute.Key("k8s.pod.hostname")
+
+ // K8SPodIPKey is the attribute Key conforming to the "k8s.pod.ip" semantic
+ // conventions. It represents the IP address allocated to the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "172.18.0.2"
+ // Note: This attribute aligns with the `podIP` field of the
+ // [K8s PodStatus].
+ //
+ // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core
+ K8SPodIPKey = attribute.Key("k8s.pod.ip")
+
+ // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" semantic
+ // conventions. It represents the name of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry-pod-autoconf"
+ K8SPodNameKey = attribute.Key("k8s.pod.name")
+
+ // K8SPodStartTimeKey is the attribute Key conforming to the
+ // "k8s.pod.start_time" semantic conventions. It represents the start timestamp
+ // of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "2025-12-04T08:41:03Z"
+ // Note: Date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ //
+ // This attribute aligns with the `startTime` field of the
+ // [K8s PodStatus],
+ // in ISO 8601 (RFC 3339 compatible) format.
+ //
+ // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podstatus-v1-core
+ K8SPodStartTimeKey = attribute.Key("k8s.pod.start_time")
+
+ // K8SPodStatusPhaseKey is the attribute Key conforming to the
+ // "k8s.pod.status.phase" semantic conventions. It represents the phase for the
+ // pod. Corresponds to the `phase` field of the: [K8s PodStatus].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Pending", "Running"
+ //
+ // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core
+ K8SPodStatusPhaseKey = attribute.Key("k8s.pod.status.phase")
+
+ // K8SPodStatusReasonKey is the attribute Key conforming to the
+ // "k8s.pod.status.reason" semantic conventions. It represents the reason for
+ // the pod state. Corresponds to the `reason` field of the: [K8s PodStatus].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Evicted", "NodeAffinity"
+ //
+ // [K8s PodStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#podstatus-v1-core
+ K8SPodStatusReasonKey = attribute.Key("k8s.pod.status.reason")
+
+ // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" semantic
+ // conventions. It represents the UID of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SPodUIDKey = attribute.Key("k8s.pod.uid")
+
+ // K8SReplicaSetNameKey is the attribute Key conforming to the
+ // "k8s.replicaset.name" semantic conventions. It represents the name of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
+
+ // K8SReplicaSetUIDKey is the attribute Key conforming to the
+ // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
+
+ // K8SReplicationControllerNameKey is the attribute Key conforming to the
+ // "k8s.replicationcontroller.name" semantic conventions. It represents the name
+ // of the replication controller.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name")
+
+ // K8SReplicationControllerUIDKey is the attribute Key conforming to the
+ // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID
+ // of the replication controller.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid")
+
+ // K8SResourceQuotaNameKey is the attribute Key conforming to the
+ // "k8s.resourcequota.name" semantic conventions. It represents the name of the
+ // resource quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name")
+
+ // K8SResourceQuotaResourceNameKey is the attribute Key conforming to the
+ // "k8s.resourcequota.resource_name" semantic conventions. It represents the
+ // name of the K8s resource a resource quota defines.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "count/replicationcontrollers"
+ // Note: The value for this attribute can be either the full
+ // `count/[.]` string (e.g., count/deployments.apps,
+ // count/pods), or, for certain core Kubernetes resources, just the resource
+ // name (e.g., pods, services, configmaps). Both forms are supported by
+ // Kubernetes for object count quotas. See
+ // [Kubernetes Resource Quotas documentation] for more details.
+ //
+ // [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-on-object-count
+ K8SResourceQuotaResourceNameKey = attribute.Key("k8s.resourcequota.resource_name")
+
+ // K8SResourceQuotaUIDKey is the attribute Key conforming to the
+ // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
+ // resource quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid")
+
+ // K8SServiceEndpointAddressTypeKey is the attribute Key conforming to the
+ // "k8s.service.endpoint.address_type" semantic conventions. It represents the
+ // address type of the service endpoint.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "IPv4", "IPv6"
+ // Note: The network address family or type of the endpoint.
+ // This attribute aligns with the `addressType` field of the
+ // [K8s EndpointSlice].
+ // It is used to differentiate metrics when a Service is backed by multiple
+ // address types
+ // (e.g., in dual-stack clusters).
+ //
+ // [K8s EndpointSlice]: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/
+ K8SServiceEndpointAddressTypeKey = attribute.Key("k8s.service.endpoint.address_type")
+
+ // K8SServiceEndpointConditionKey is the attribute Key conforming to the
+ // "k8s.service.endpoint.condition" semantic conventions. It represents the
+ // condition of the service endpoint.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ready", "serving", "terminating"
+ // Note: The current operational condition of the service endpoint.
+ // An endpoint can have multiple conditions set at once (e.g., both `serving`
+ // and `terminating` during rollout).
+ // This attribute aligns with the condition fields in the [K8s EndpointSlice].
+ //
+ // [K8s EndpointSlice]: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/
+ K8SServiceEndpointConditionKey = attribute.Key("k8s.service.endpoint.condition")
+
+ // K8SServiceEndpointZoneKey is the attribute Key conforming to the
+ // "k8s.service.endpoint.zone" semantic conventions. It represents the zone of
+ // the service endpoint.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "us-east-1a", "us-west-2b", "zone-a", ""
+ // Note: The zone where the endpoint is located, typically corresponding to a
+ // failure domain.
+ // This attribute aligns with the `zone` field of endpoints in the
+ // [K8s EndpointSlice].
+ // It enables zone-aware monitoring of service endpoint distribution and
+ // supports
+ // features like [Topology Aware Routing].
+ //
+ // If the zone is not populated (e.g., nodes without the
+ // `topology.kubernetes.io/zone` label),
+ // the attribute value will be an empty string.
+ //
+ // [K8s EndpointSlice]: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/
+ // [Topology Aware Routing]: https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/
+ K8SServiceEndpointZoneKey = attribute.Key("k8s.service.endpoint.zone")
+
+ // K8SServiceNameKey is the attribute Key conforming to the "k8s.service.name"
+ // semantic conventions. It represents the name of the Service.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-service"
+ K8SServiceNameKey = attribute.Key("k8s.service.name")
+
+ // K8SServicePublishNotReadyAddressesKey is the attribute Key conforming to the
+ // "k8s.service.publish_not_ready_addresses" semantic conventions. It represents
+ // the whether the Service publishes not-ready endpoints.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: true, false
+ // Note: Whether the Service is configured to publish endpoints before the pods
+ // are ready.
+ // This attribute is typically used to indicate that a Service (such as a
+ // headless
+ // Service for a StatefulSet) allows peer discovery before pods pass their
+ // readiness probes.
+ // It aligns with the `publishNotReadyAddresses` field of the
+ // [K8s ServiceSpec].
+ //
+ // [K8s ServiceSpec]: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec
+ K8SServicePublishNotReadyAddressesKey = attribute.Key("k8s.service.publish_not_ready_addresses")
+
+ // K8SServiceTrafficDistributionKey is the attribute Key conforming to the
+ // "k8s.service.traffic_distribution" semantic conventions. It represents the
+ // traffic distribution policy for the Service.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "PreferSameZone", "PreferSameNode"
+ // Note: Specifies how traffic is distributed to endpoints for this Service.
+ // This attribute aligns with the `trafficDistribution` field of the
+ // [K8s ServiceSpec].
+ // Known values include `PreferSameZone` (prefer endpoints in the same zone as
+ // the client) and
+ // `PreferSameNode` (prefer endpoints on the same node, fallback to same zone,
+ // then cluster-wide).
+ // If this field is not set on the Service, the attribute SHOULD NOT be emitted.
+ // When not set, Kubernetes distributes traffic evenly across all endpoints
+ // cluster-wide.
+ //
+ // [K8s ServiceSpec]: https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution
+ K8SServiceTrafficDistributionKey = attribute.Key("k8s.service.traffic_distribution")
+
+ // K8SServiceTypeKey is the attribute Key conforming to the "k8s.service.type"
+ // semantic conventions. It represents the type of the Kubernetes Service.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ClusterIP", "NodePort", "LoadBalancer"
+ // Note: This attribute aligns with the `type` field of the
+ // [K8s ServiceSpec].
+ //
+ // [K8s ServiceSpec]: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#ServiceSpec
+ K8SServiceTypeKey = attribute.Key("k8s.service.type")
+
+ // K8SServiceUIDKey is the attribute Key conforming to the "k8s.service.uid"
+ // semantic conventions. It represents the UID of the Service.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SServiceUIDKey = attribute.Key("k8s.service.uid")
+
+ // K8SStatefulSetNameKey is the attribute Key conforming to the
+ // "k8s.statefulset.name" semantic conventions. It represents the name of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
+
+ // K8SStatefulSetUIDKey is the attribute Key conforming to the
+ // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
+
+ // K8SStorageclassNameKey is the attribute Key conforming to the
+ // "k8s.storageclass.name" semantic conventions. It represents the name of K8s
+ // [StorageClass] object.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "gold.storageclass.storage.k8s.io"
+ //
+ // [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#storageclass-v1-storage-k8s-io
+ K8SStorageclassNameKey = attribute.Key("k8s.storageclass.name")
+
+ // K8SVolumeNameKey is the attribute Key conforming to the "k8s.volume.name"
+ // semantic conventions. It represents the name of the K8s volume.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "volume0"
+ K8SVolumeNameKey = attribute.Key("k8s.volume.name")
+
+ // K8SVolumeTypeKey is the attribute Key conforming to the "k8s.volume.type"
+ // semantic conventions. It represents the type of the K8s volume.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "emptyDir", "persistentVolumeClaim"
+ K8SVolumeTypeKey = attribute.Key("k8s.volume.type")
+)
+
+// K8SClusterName returns an attribute KeyValue conforming to the
+// "k8s.cluster.name" semantic conventions. It represents the name of the
+// cluster.
+func K8SClusterName(val string) attribute.KeyValue {
+ return K8SClusterNameKey.String(val)
+}
+
+// K8SClusterUID returns an attribute KeyValue conforming to the
+// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
+// cluster, set to the UID of the `kube-system` namespace.
+func K8SClusterUID(val string) attribute.KeyValue {
+ return K8SClusterUIDKey.String(val)
+}
+
+// K8SContainerName returns an attribute KeyValue conforming to the
+// "k8s.container.name" semantic conventions. It represents the name of the
+// Container from Pod specification, must be unique within a Pod. Container
+// runtime usually uses different globally unique name (`container.name`).
+func K8SContainerName(val string) attribute.KeyValue {
+ return K8SContainerNameKey.String(val)
+}
+
+// K8SContainerRestartCount returns an attribute KeyValue conforming to the
+// "k8s.container.restart_count" semantic conventions. It represents the number
+// of times the container was restarted. This attribute can be used to identify a
+// particular container (running or stopped) within a container spec.
+func K8SContainerRestartCount(val int) attribute.KeyValue {
+ return K8SContainerRestartCountKey.Int(val)
+}
+
+// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
+// conforming to the "k8s.container.status.last_terminated_reason" semantic
+// conventions. It represents the last terminated reason of the Container.
+func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
+ return K8SContainerStatusLastTerminatedReasonKey.String(val)
+}
+
+// K8SCronJobAnnotation returns an attribute KeyValue conforming to the
+// "k8s.cronjob.annotation" semantic conventions. It represents the cronjob
+// annotation placed on the CronJob, the `` being the annotation name, the
+// value being the annotation value.
+func K8SCronJobAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.cronjob.annotation."+key, val)
+}
+
+// K8SCronJobLabel returns an attribute KeyValue conforming to the
+// "k8s.cronjob.label" semantic conventions. It represents the label placed on
+// the CronJob, the `` being the label name, the value being the label
+// value.
+func K8SCronJobLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.cronjob.label."+key, val)
+}
+
+// K8SCronJobName returns an attribute KeyValue conforming to the
+// "k8s.cronjob.name" semantic conventions. It represents the name of the
+// CronJob.
+func K8SCronJobName(val string) attribute.KeyValue {
+ return K8SCronJobNameKey.String(val)
+}
+
+// K8SCronJobUID returns an attribute KeyValue conforming to the
+// "k8s.cronjob.uid" semantic conventions. It represents the UID of the CronJob.
+func K8SCronJobUID(val string) attribute.KeyValue {
+ return K8SCronJobUIDKey.String(val)
+}
+
+// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the
+// "k8s.daemonset.annotation" semantic conventions. It represents the annotation
+// placed on the DaemonSet, the `` being the annotation name, the value
+// being the annotation value, even if the value is empty.
+func K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.daemonset.annotation."+key, val)
+}
+
+// K8SDaemonSetLabel returns an attribute KeyValue conforming to the
+// "k8s.daemonset.label" semantic conventions. It represents the label placed on
+// the DaemonSet, the `` being the label name, the value being the label
+// value, even if the value is empty.
+func K8SDaemonSetLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.daemonset.label."+key, val)
+}
+
+// K8SDaemonSetName returns an attribute KeyValue conforming to the
+// "k8s.daemonset.name" semantic conventions. It represents the name of the
+// DaemonSet.
+func K8SDaemonSetName(val string) attribute.KeyValue {
+ return K8SDaemonSetNameKey.String(val)
+}
+
+// K8SDaemonSetUID returns an attribute KeyValue conforming to the
+// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+// DaemonSet.
+func K8SDaemonSetUID(val string) attribute.KeyValue {
+ return K8SDaemonSetUIDKey.String(val)
+}
+
+// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the
+// "k8s.deployment.annotation" semantic conventions. It represents the annotation
+// placed on the Deployment, the `` being the annotation name, the value
+// being the annotation value, even if the value is empty.
+func K8SDeploymentAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.deployment.annotation."+key, val)
+}
+
+// K8SDeploymentLabel returns an attribute KeyValue conforming to the
+// "k8s.deployment.label" semantic conventions. It represents the label placed on
+// the Deployment, the `` being the label name, the value being the label
+// value, even if the value is empty.
+func K8SDeploymentLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.deployment.label."+key, val)
+}
+
+// K8SDeploymentName returns an attribute KeyValue conforming to the
+// "k8s.deployment.name" semantic conventions. It represents the name of the
+// Deployment.
+func K8SDeploymentName(val string) attribute.KeyValue {
+ return K8SDeploymentNameKey.String(val)
+}
+
+// K8SDeploymentUID returns an attribute KeyValue conforming to the
+// "k8s.deployment.uid" semantic conventions. It represents the UID of the
+// Deployment.
+func K8SDeploymentUID(val string) attribute.KeyValue {
+ return K8SDeploymentUIDKey.String(val)
+}
+
+// K8SHPAMetricType returns an attribute KeyValue conforming to the
+// "k8s.hpa.metric.type" semantic conventions. It represents the type of metric
+// source for the horizontal pod autoscaler.
+func K8SHPAMetricType(val string) attribute.KeyValue {
+ return K8SHPAMetricTypeKey.String(val)
+}
+
+// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name"
+// semantic conventions. It represents the name of the horizontal pod autoscaler.
+func K8SHPAName(val string) attribute.KeyValue {
+ return K8SHPANameKey.String(val)
+}
+
+// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the
+// "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the
+// API version of the target resource to scale for the HorizontalPodAutoscaler.
+func K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue {
+ return K8SHPAScaletargetrefAPIVersionKey.String(val)
+}
+
+// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the
+// "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of
+// the target resource to scale for the HorizontalPodAutoscaler.
+func K8SHPAScaletargetrefKind(val string) attribute.KeyValue {
+ return K8SHPAScaletargetrefKindKey.String(val)
+}
+
+// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the
+// "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of
+// the target resource to scale for the HorizontalPodAutoscaler.
+func K8SHPAScaletargetrefName(val string) attribute.KeyValue {
+ return K8SHPAScaletargetrefNameKey.String(val)
+}
+
+// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid"
+// semantic conventions. It represents the UID of the horizontal pod autoscaler.
+func K8SHPAUID(val string) attribute.KeyValue {
+ return K8SHPAUIDKey.String(val)
+}
+
+// K8SHugepageSize returns an attribute KeyValue conforming to the
+// "k8s.hugepage.size" semantic conventions. It represents the size (identifier)
+// of the K8s huge page.
+func K8SHugepageSize(val string) attribute.KeyValue {
+ return K8SHugepageSizeKey.String(val)
+}
+
+// K8SJobAnnotation returns an attribute KeyValue conforming to the
+// "k8s.job.annotation" semantic conventions. It represents the annotation placed
+// on the Job, the `` being the annotation name, the value being the
+// annotation value, even if the value is empty.
+func K8SJobAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.job.annotation."+key, val)
+}
+
+// K8SJobLabel returns an attribute KeyValue conforming to the "k8s.job.label"
+// semantic conventions. It represents the label placed on the Job, the ``
+// being the label name, the value being the label value, even if the value is
+// empty.
+func K8SJobLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.job.label."+key, val)
+}
+
+// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
+// semantic conventions. It represents the name of the Job.
+func K8SJobName(val string) attribute.KeyValue {
+ return K8SJobNameKey.String(val)
+}
+
+// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
+// semantic conventions. It represents the UID of the Job.
+func K8SJobUID(val string) attribute.KeyValue {
+ return K8SJobUIDKey.String(val)
+}
+
+// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the
+// "k8s.namespace.annotation" semantic conventions. It represents the annotation
+// placed on the Namespace, the `` being the annotation name, the value
+// being the annotation value, even if the value is empty.
+func K8SNamespaceAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.namespace.annotation."+key, val)
+}
+
+// K8SNamespaceLabel returns an attribute KeyValue conforming to the
+// "k8s.namespace.label" semantic conventions. It represents the label placed on
+// the Namespace, the `` being the label name, the value being the label
+// value, even if the value is empty.
+func K8SNamespaceLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.namespace.label."+key, val)
+}
+
+// K8SNamespaceName returns an attribute KeyValue conforming to the
+// "k8s.namespace.name" semantic conventions. It represents the name of the
+// namespace that the pod is running in.
+func K8SNamespaceName(val string) attribute.KeyValue {
+ return K8SNamespaceNameKey.String(val)
+}
+
+// K8SNodeAnnotation returns an attribute KeyValue conforming to the
+// "k8s.node.annotation" semantic conventions. It represents the annotation
+// placed on the Node, the `` being the annotation name, the value being the
+// annotation value, even if the value is empty.
+func K8SNodeAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.node.annotation."+key, val)
+}
+
+// K8SNodeLabel returns an attribute KeyValue conforming to the "k8s.node.label"
+// semantic conventions. It represents the label placed on the Node, the ``
+// being the label name, the value being the label value, even if the value is
+// empty.
+func K8SNodeLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.node.label."+key, val)
+}
+
+// K8SNodeName returns an attribute KeyValue conforming to the "k8s.node.name"
+// semantic conventions. It represents the name of the Node.
+func K8SNodeName(val string) attribute.KeyValue {
+ return K8SNodeNameKey.String(val)
+}
+
+// K8SNodeSystemContainerName returns an attribute KeyValue conforming to the
+// "k8s.node.system_container.name" semantic conventions. It represents the name
+// of the system container running on the K8s Node.
+func K8SNodeSystemContainerName(val string) attribute.KeyValue {
+ return K8SNodeSystemContainerNameKey.String(val)
+}
+
+// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
+// semantic conventions. It represents the UID of the Node.
+func K8SNodeUID(val string) attribute.KeyValue {
+ return K8SNodeUIDKey.String(val)
+}
+
+// K8SPersistentvolumeAnnotation returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.annotation" semantic conventions. It represents the
+// annotation placed on the PersistentVolume, the `` being the annotation
+// name, the value being the annotation value, even if the value is empty.
+func K8SPersistentvolumeAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolume.annotation."+key, val)
+}
+
+// K8SPersistentvolumeLabel returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.label" semantic conventions. It represents the label
+// placed on the PersistentVolume, the `` being the label name, the value
+// being the label value, even if the value is empty.
+func K8SPersistentvolumeLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolume.label."+key, val)
+}
+
+// K8SPersistentvolumeName returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.name" semantic conventions. It represents the name of
+// the PersistentVolume.
+func K8SPersistentvolumeName(val string) attribute.KeyValue {
+ return K8SPersistentvolumeNameKey.String(val)
+}
+
+// K8SPersistentvolumeUID returns an attribute KeyValue conforming to the
+// "k8s.persistentvolume.uid" semantic conventions. It represents the UID of the
+// PersistentVolume.
+func K8SPersistentvolumeUID(val string) attribute.KeyValue {
+ return K8SPersistentvolumeUIDKey.String(val)
+}
+
+// K8SPersistentvolumeclaimAnnotation returns an attribute KeyValue conforming to
+// the "k8s.persistentvolumeclaim.annotation" semantic conventions. It represents
+// the annotation placed on the PersistentVolumeClaim, the `` being the
+// annotation name, the value being the annotation value, even if the value is
+// empty.
+func K8SPersistentvolumeclaimAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolumeclaim.annotation."+key, val)
+}
+
+// K8SPersistentvolumeclaimLabel returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.label" semantic conventions. It represents the
+// label placed on the PersistentVolumeClaim, the `` being the label name,
+// the value being the label value, even if the value is empty.
+func K8SPersistentvolumeclaimLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.persistentvolumeclaim.label."+key, val)
+}
+
+// K8SPersistentvolumeclaimName returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.name" semantic conventions. It represents the name
+// of the PersistentVolumeClaim.
+func K8SPersistentvolumeclaimName(val string) attribute.KeyValue {
+ return K8SPersistentvolumeclaimNameKey.String(val)
+}
+
+// K8SPersistentvolumeclaimUID returns an attribute KeyValue conforming to the
+// "k8s.persistentvolumeclaim.uid" semantic conventions. It represents the UID of
+// the PersistentVolumeClaim.
+func K8SPersistentvolumeclaimUID(val string) attribute.KeyValue {
+ return K8SPersistentvolumeclaimUIDKey.String(val)
+}
+
+// K8SPodAnnotation returns an attribute KeyValue conforming to the
+// "k8s.pod.annotation" semantic conventions. It represents the annotation placed
+// on the Pod, the `` being the annotation name, the value being the
+// annotation value.
+func K8SPodAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.pod.annotation."+key, val)
+}
+
+// K8SPodHostname returns an attribute KeyValue conforming to the
+// "k8s.pod.hostname" semantic conventions. It represents the specifies the
+// hostname of the Pod.
+func K8SPodHostname(val string) attribute.KeyValue {
+ return K8SPodHostnameKey.String(val)
+}
+
+// K8SPodIP returns an attribute KeyValue conforming to the "k8s.pod.ip" semantic
+// conventions. It represents the IP address allocated to the Pod.
+func K8SPodIP(val string) attribute.KeyValue {
+ return K8SPodIPKey.String(val)
+}
+
+// K8SPodLabel returns an attribute KeyValue conforming to the "k8s.pod.label"
+// semantic conventions. It represents the label placed on the Pod, the ``
+// being the label name, the value being the label value.
+func K8SPodLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.pod.label."+key, val)
+}
+
+// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
+// semantic conventions. It represents the name of the Pod.
+func K8SPodName(val string) attribute.KeyValue {
+ return K8SPodNameKey.String(val)
+}
+
+// K8SPodStartTime returns an attribute KeyValue conforming to the
+// "k8s.pod.start_time" semantic conventions. It represents the start timestamp
+// of the Pod.
+func K8SPodStartTime(val string) attribute.KeyValue {
+ return K8SPodStartTimeKey.String(val)
+}
+
+// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
+// semantic conventions. It represents the UID of the Pod.
+func K8SPodUID(val string) attribute.KeyValue {
+ return K8SPodUIDKey.String(val)
+}
+
+// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the
+// "k8s.replicaset.annotation" semantic conventions. It represents the annotation
+// placed on the ReplicaSet, the `` being the annotation name, the value
+// being the annotation value, even if the value is empty.
+func K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.replicaset.annotation."+key, val)
+}
+
+// K8SReplicaSetLabel returns an attribute KeyValue conforming to the
+// "k8s.replicaset.label" semantic conventions. It represents the label placed on
+// the ReplicaSet, the `` being the label name, the value being the label
+// value, even if the value is empty.
+func K8SReplicaSetLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.replicaset.label."+key, val)
+}
+
+// K8SReplicaSetName returns an attribute KeyValue conforming to the
+// "k8s.replicaset.name" semantic conventions. It represents the name of the
+// ReplicaSet.
+func K8SReplicaSetName(val string) attribute.KeyValue {
+ return K8SReplicaSetNameKey.String(val)
+}
+
+// K8SReplicaSetUID returns an attribute KeyValue conforming to the
+// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+// ReplicaSet.
+func K8SReplicaSetUID(val string) attribute.KeyValue {
+ return K8SReplicaSetUIDKey.String(val)
+}
+
+// K8SReplicationControllerName returns an attribute KeyValue conforming to the
+// "k8s.replicationcontroller.name" semantic conventions. It represents the name
+// of the replication controller.
+func K8SReplicationControllerName(val string) attribute.KeyValue {
+ return K8SReplicationControllerNameKey.String(val)
+}
+
+// K8SReplicationControllerUID returns an attribute KeyValue conforming to the
+// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of
+// the replication controller.
+func K8SReplicationControllerUID(val string) attribute.KeyValue {
+ return K8SReplicationControllerUIDKey.String(val)
+}
+
+// K8SResourceQuotaName returns an attribute KeyValue conforming to the
+// "k8s.resourcequota.name" semantic conventions. It represents the name of the
+// resource quota.
+func K8SResourceQuotaName(val string) attribute.KeyValue {
+ return K8SResourceQuotaNameKey.String(val)
+}
+
+// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the
+// "k8s.resourcequota.resource_name" semantic conventions. It represents the name
+// of the K8s resource a resource quota defines.
+func K8SResourceQuotaResourceName(val string) attribute.KeyValue {
+ return K8SResourceQuotaResourceNameKey.String(val)
+}
+
+// K8SResourceQuotaUID returns an attribute KeyValue conforming to the
+// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the
+// resource quota.
+func K8SResourceQuotaUID(val string) attribute.KeyValue {
+ return K8SResourceQuotaUIDKey.String(val)
+}
+
+// K8SServiceAnnotation returns an attribute KeyValue conforming to the
+// "k8s.service.annotation" semantic conventions. It represents the annotation
+// placed on the Service, the `` being the annotation name, the value being
+// the annotation value, even if the value is empty.
+func K8SServiceAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.service.annotation."+key, val)
+}
+
+// K8SServiceEndpointZone returns an attribute KeyValue conforming to the
+// "k8s.service.endpoint.zone" semantic conventions. It represents the zone of
+// the service endpoint.
+func K8SServiceEndpointZone(val string) attribute.KeyValue {
+ return K8SServiceEndpointZoneKey.String(val)
+}
+
+// K8SServiceLabel returns an attribute KeyValue conforming to the
+// "k8s.service.label" semantic conventions. It represents the label placed on
+// the Service, the `` being the label name, the value being the label
+// value, even if the value is empty.
+func K8SServiceLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.service.label."+key, val)
+}
+
+// K8SServiceName returns an attribute KeyValue conforming to the
+// "k8s.service.name" semantic conventions. It represents the name of the
+// Service.
+func K8SServiceName(val string) attribute.KeyValue {
+ return K8SServiceNameKey.String(val)
+}
+
+// K8SServicePublishNotReadyAddresses returns an attribute KeyValue conforming to
+// the "k8s.service.publish_not_ready_addresses" semantic conventions. It
+// represents the whether the Service publishes not-ready endpoints.
+func K8SServicePublishNotReadyAddresses(val bool) attribute.KeyValue {
+ return K8SServicePublishNotReadyAddressesKey.Bool(val)
+}
+
+// K8SServiceSelector returns an attribute KeyValue conforming to the
+// "k8s.service.selector" semantic conventions. It represents the selector
+// key-value pair placed on the Service, the `` being the selector key, the
+// value being the selector value.
+func K8SServiceSelector(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.service.selector."+key, val)
+}
+
+// K8SServiceTrafficDistribution returns an attribute KeyValue conforming to the
+// "k8s.service.traffic_distribution" semantic conventions. It represents the
+// traffic distribution policy for the Service.
+func K8SServiceTrafficDistribution(val string) attribute.KeyValue {
+ return K8SServiceTrafficDistributionKey.String(val)
+}
+
+// K8SServiceUID returns an attribute KeyValue conforming to the
+// "k8s.service.uid" semantic conventions. It represents the UID of the Service.
+func K8SServiceUID(val string) attribute.KeyValue {
+ return K8SServiceUIDKey.String(val)
+}
+
+// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the
+// "k8s.statefulset.annotation" semantic conventions. It represents the
+// annotation placed on the StatefulSet, the `` being the annotation name,
+// the value being the annotation value, even if the value is empty.
+func K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.statefulset.annotation."+key, val)
+}
+
+// K8SStatefulSetLabel returns an attribute KeyValue conforming to the
+// "k8s.statefulset.label" semantic conventions. It represents the label placed
+// on the StatefulSet, the `` being the label name, the value being the
+// label value, even if the value is empty.
+func K8SStatefulSetLabel(key string, val string) attribute.KeyValue {
+ return attribute.String("k8s.statefulset.label."+key, val)
+}
+
+// K8SStatefulSetName returns an attribute KeyValue conforming to the
+// "k8s.statefulset.name" semantic conventions. It represents the name of the
+// StatefulSet.
+func K8SStatefulSetName(val string) attribute.KeyValue {
+ return K8SStatefulSetNameKey.String(val)
+}
+
+// K8SStatefulSetUID returns an attribute KeyValue conforming to the
+// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+// StatefulSet.
+func K8SStatefulSetUID(val string) attribute.KeyValue {
+ return K8SStatefulSetUIDKey.String(val)
+}
+
+// K8SStorageclassName returns an attribute KeyValue conforming to the
+// "k8s.storageclass.name" semantic conventions. It represents the name of K8s
+// [StorageClass] object.
+//
+// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#storageclass-v1-storage-k8s-io
+func K8SStorageclassName(val string) attribute.KeyValue {
+ return K8SStorageclassNameKey.String(val)
+}
+
+// K8SVolumeName returns an attribute KeyValue conforming to the
+// "k8s.volume.name" semantic conventions. It represents the name of the K8s
+// volume.
+func K8SVolumeName(val string) attribute.KeyValue {
+ return K8SVolumeNameKey.String(val)
+}
+
+// Enum values for k8s.container.ephemeral_storage.fs_type
+var (
+ // For the container's writable layer usage.
+ // Stability: development
+ K8SContainerEphemeralStorageFsTypeRootfs = K8SContainerEphemeralStorageFsTypeKey.String("rootfs")
+ // For the container's log files usage (stdout/stderr).
+ // Stability: development
+ K8SContainerEphemeralStorageFsTypeLogs = K8SContainerEphemeralStorageFsTypeKey.String("logs")
+)
+
+// Enum values for k8s.container.status.reason
+var (
+ // The container is being created.
+ // Stability: development
+ K8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String("ContainerCreating")
+ // The container is in a crash loop back off state.
+ // Stability: development
+ K8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String("CrashLoopBackOff")
+ // There was an error creating the container configuration.
+ // Stability: development
+ K8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String("CreateContainerConfigError")
+ // There was an error pulling the container image.
+ // Stability: development
+ K8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String("ErrImagePull")
+ // The container image pull is in back off state.
+ // Stability: development
+ K8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String("ImagePullBackOff")
+ // The container was killed due to out of memory.
+ // Stability: development
+ K8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String("OOMKilled")
+ // The container has completed execution.
+ // Stability: development
+ K8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String("Completed")
+ // There was an error with the container.
+ // Stability: development
+ K8SContainerStatusReasonError = K8SContainerStatusReasonKey.String("Error")
+ // The container cannot run.
+ // Stability: development
+ K8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String("ContainerCannotRun")
+)
+
+// Enum values for k8s.container.status.state
+var (
+ // The container has terminated.
+ // Stability: development
+ K8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String("terminated")
+ // The container is running.
+ // Stability: development
+ K8SContainerStatusStateRunning = K8SContainerStatusStateKey.String("running")
+ // The container is waiting.
+ // Stability: development
+ K8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String("waiting")
+)
+
+// Enum values for k8s.namespace.phase
+var (
+ // Active namespace phase as described by [K8s API]
+ // Stability: development
+ //
+ // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
+ K8SNamespacePhaseActive = K8SNamespacePhaseKey.String("active")
+ // Terminating namespace phase as described by [K8s API]
+ // Stability: development
+ //
+ // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase
+ K8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String("terminating")
+)
+
+// Enum values for k8s.node.condition.status
+var (
+ // condition_true
+ // Stability: development
+ K8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String("true")
+ // condition_false
+ // Stability: development
+ K8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String("false")
+ // condition_unknown
+ // Stability: development
+ K8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String("unknown")
+)
+
+// Enum values for k8s.node.condition.type
+var (
+ // The node is healthy and ready to accept pods
+ // Stability: development
+ K8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String("Ready")
+ // Pressure exists on the disk size—that is, if the disk capacity is low
+ // Stability: development
+ K8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String("DiskPressure")
+ // Pressure exists on the node memory—that is, if the node memory is low
+ // Stability: development
+ K8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String("MemoryPressure")
+ // Pressure exists on the processes—that is, if there are too many processes
+ // on the node
+ // Stability: development
+ K8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String("PIDPressure")
+ // The network for the node is not correctly configured
+ // Stability: development
+ K8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String("NetworkUnavailable")
+)
+
+// Enum values for k8s.persistentvolume.reclaim_policy
+var (
+ // The volume will be deleted when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyDelete = K8SPersistentvolumeReclaimPolicyKey.String("Delete")
+ // The volume will be recycled (basic scrub) when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyRecycle = K8SPersistentvolumeReclaimPolicyKey.String("Recycle")
+ // The volume will be retained when released from its claim.
+ // Stability: development
+ K8SPersistentvolumeReclaimPolicyRetain = K8SPersistentvolumeReclaimPolicyKey.String("Retain")
+)
+
+// Enum values for k8s.persistentvolume.status.phase
+var (
+ // The volume is available and not yet bound to a claim.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseAvailable = K8SPersistentvolumeStatusPhaseKey.String("Available")
+ // The volume is bound to a claim.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseBound = K8SPersistentvolumeStatusPhaseKey.String("Bound")
+ // The volume has failed its automatic reclamation.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseFailed = K8SPersistentvolumeStatusPhaseKey.String("Failed")
+ // The volume is being provisioned.
+ // Stability: development
+ K8SPersistentvolumeStatusPhasePending = K8SPersistentvolumeStatusPhaseKey.String("Pending")
+ // The claim has been deleted but the volume is not yet available.
+ // Stability: development
+ K8SPersistentvolumeStatusPhaseReleased = K8SPersistentvolumeStatusPhaseKey.String("Released")
+)
+
+// Enum values for k8s.persistentvolumeclaim.status.phase
+var (
+ // The claim is bound to a volume.
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhaseBound = K8SPersistentvolumeclaimStatusPhaseKey.String("Bound")
+ // The claim has lost its underlying volume (the volume does not exist anymore).
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhaseLost = K8SPersistentvolumeclaimStatusPhaseKey.String("Lost")
+ // The claim has not yet been bound to a volume.
+ // Stability: development
+ K8SPersistentvolumeclaimStatusPhasePending = K8SPersistentvolumeclaimStatusPhaseKey.String("Pending")
+)
+
+// Enum values for k8s.pod.status.phase
+var (
+ // The pod has been accepted by the system, but one or more of the containers
+ // has not been started. This includes time before being bound to a node, as
+ // well as time spent pulling images onto the host.
+ //
+ // Stability: development
+ K8SPodStatusPhasePending = K8SPodStatusPhaseKey.String("Pending")
+ // The pod has been bound to a node and all of the containers have been started.
+ // At least one container is still running or is in the process of being
+ // restarted.
+ //
+ // Stability: development
+ K8SPodStatusPhaseRunning = K8SPodStatusPhaseKey.String("Running")
+ // All containers in the pod have voluntarily terminated with a container exit
+ // code of 0, and the system is not going to restart any of these containers.
+ //
+ // Stability: development
+ K8SPodStatusPhaseSucceeded = K8SPodStatusPhaseKey.String("Succeeded")
+ // All containers in the pod have terminated, and at least one container has
+ // terminated in a failure (exited with a non-zero exit code or was stopped by
+ // the system).
+ //
+ // Stability: development
+ K8SPodStatusPhaseFailed = K8SPodStatusPhaseKey.String("Failed")
+ // For some reason the state of the pod could not be obtained, typically due to
+ // an error in communicating with the host of the pod.
+ //
+ // Stability: development
+ K8SPodStatusPhaseUnknown = K8SPodStatusPhaseKey.String("Unknown")
+)
+
+// Enum values for k8s.pod.status.reason
+var (
+ // The pod is evicted.
+ // Stability: development
+ K8SPodStatusReasonEvicted = K8SPodStatusReasonKey.String("Evicted")
+ // The pod is in a status because of its node affinity
+ // Stability: development
+ K8SPodStatusReasonNodeAffinity = K8SPodStatusReasonKey.String("NodeAffinity")
+ // The reason on a pod when its state cannot be confirmed as kubelet is
+ // unresponsive on the node it is (was) running.
+ //
+ // Stability: development
+ K8SPodStatusReasonNodeLost = K8SPodStatusReasonKey.String("NodeLost")
+ // The node is shutdown
+ // Stability: development
+ K8SPodStatusReasonShutdown = K8SPodStatusReasonKey.String("Shutdown")
+ // The pod was rejected admission to the node because of an error during
+ // admission that could not be categorized.
+ //
+ // Stability: development
+ K8SPodStatusReasonUnexpectedAdmissionError = K8SPodStatusReasonKey.String("UnexpectedAdmissionError")
+)
+
+// Enum values for k8s.service.endpoint.address_type
+var (
+ // IPv4 address type
+ // Stability: development
+ K8SServiceEndpointAddressTypeIPv4 = K8SServiceEndpointAddressTypeKey.String("IPv4")
+ // IPv6 address type
+ // Stability: development
+ K8SServiceEndpointAddressTypeIPv6 = K8SServiceEndpointAddressTypeKey.String("IPv6")
+ // FQDN address type
+ // Stability: development
+ K8SServiceEndpointAddressTypeFqdn = K8SServiceEndpointAddressTypeKey.String("FQDN")
+)
+
+// Enum values for k8s.service.endpoint.condition
+var (
+ // The endpoint is ready to receive new connections.
+ // Stability: development
+ K8SServiceEndpointConditionReady = K8SServiceEndpointConditionKey.String("ready")
+ // The endpoint is currently handling traffic.
+ // Stability: development
+ K8SServiceEndpointConditionServing = K8SServiceEndpointConditionKey.String("serving")
+ // The endpoint is in the process of shutting down.
+ // Stability: development
+ K8SServiceEndpointConditionTerminating = K8SServiceEndpointConditionKey.String("terminating")
+)
+
+// Enum values for k8s.service.type
+var (
+ // ClusterIP service type
+ // Stability: development
+ K8SServiceTypeClusterIP = K8SServiceTypeKey.String("ClusterIP")
+ // NodePort service type
+ // Stability: development
+ K8SServiceTypeNodePort = K8SServiceTypeKey.String("NodePort")
+ // LoadBalancer service type
+ // Stability: development
+ K8SServiceTypeLoadBalancer = K8SServiceTypeKey.String("LoadBalancer")
+ // ExternalName service type
+ // Stability: development
+ K8SServiceTypeExternalName = K8SServiceTypeKey.String("ExternalName")
+)
+
+// Enum values for k8s.volume.type
+var (
+ // A [persistentVolumeClaim] volume
+ // Stability: development
+ //
+ // [persistentVolumeClaim]: https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim
+ K8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String("persistentVolumeClaim")
+ // A [configMap] volume
+ // Stability: development
+ //
+ // [configMap]: https://kubernetes.io/docs/concepts/storage/volumes/#configmap
+ K8SVolumeTypeConfigMap = K8SVolumeTypeKey.String("configMap")
+ // A [downwardAPI] volume
+ // Stability: development
+ //
+ // [downwardAPI]: https://kubernetes.io/docs/concepts/storage/volumes/#downwardapi
+ K8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String("downwardAPI")
+ // An [emptyDir] volume
+ // Stability: development
+ //
+ // [emptyDir]: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
+ K8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String("emptyDir")
+ // A [secret] volume
+ // Stability: development
+ //
+ // [secret]: https://kubernetes.io/docs/concepts/storage/volumes/#secret
+ K8SVolumeTypeSecret = K8SVolumeTypeKey.String("secret")
+ // A [local] volume
+ // Stability: development
+ //
+ // [local]: https://kubernetes.io/docs/concepts/storage/volumes/#local
+ K8SVolumeTypeLocal = K8SVolumeTypeKey.String("local")
+)
+
+// Namespace: log
+const (
+ // LogFileNameKey is the attribute Key conforming to the "log.file.name"
+ // semantic conventions. It represents the basename of the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "audit.log"
+ LogFileNameKey = attribute.Key("log.file.name")
+
+ // LogFileNameResolvedKey is the attribute Key conforming to the
+ // "log.file.name_resolved" semantic conventions. It represents the basename of
+ // the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "uuid.log"
+ LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
+
+ // LogFilePathKey is the attribute Key conforming to the "log.file.path"
+ // semantic conventions. It represents the full path to the file.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/var/log/mysql/audit.log"
+ LogFilePathKey = attribute.Key("log.file.path")
+
+ // LogFilePathResolvedKey is the attribute Key conforming to the
+ // "log.file.path_resolved" semantic conventions. It represents the full path to
+ // the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/var/lib/docker/uuid.log"
+ LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
+
+ // LogIostreamKey is the attribute Key conforming to the "log.iostream" semantic
+ // conventions. It represents the stream associated with the log. See below for
+ // a list of well-known values.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ LogIostreamKey = attribute.Key("log.iostream")
+
+ // LogRecordOriginalKey is the attribute Key conforming to the
+ // "log.record.original" semantic conventions. It represents the complete
+ // original Log Record.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - -
+ // Something happened", "[INFO] 8/3/24 12:34:56 Something happened"
+ // Note: This value MAY be added when processing a Log Record which was
+ // originally transmitted as a string or equivalent data type AND the Body field
+ // of the Log Record does not contain the same value. (e.g. a syslog or a log
+ // record read from a file.)
+ LogRecordOriginalKey = attribute.Key("log.record.original")
+
+ // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
+ // semantic conventions. It represents a unique identifier for the Log Record.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "01ARZ3NDEKTSV4RRFFQ69G5FAV"
+ // Note: If an id is provided, other log records with the same id will be
+ // considered duplicates and can be removed safely. This means, that two
+ // distinguishable log records MUST have different values.
+ // The id MAY be an
+ // [Universally Unique Lexicographically Sortable Identifier (ULID)], but other
+ // identifiers (e.g. UUID) may be used as needed.
+ //
+ // [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec
+ LogRecordUIDKey = attribute.Key("log.record.uid")
+)
+
+// LogFileName returns an attribute KeyValue conforming to the "log.file.name"
+// semantic conventions. It represents the basename of the file.
+func LogFileName(val string) attribute.KeyValue {
+ return LogFileNameKey.String(val)
+}
+
+// LogFileNameResolved returns an attribute KeyValue conforming to the
+// "log.file.name_resolved" semantic conventions. It represents the basename of
+// the file, with symlinks resolved.
+func LogFileNameResolved(val string) attribute.KeyValue {
+ return LogFileNameResolvedKey.String(val)
+}
+
+// LogFilePath returns an attribute KeyValue conforming to the "log.file.path"
+// semantic conventions. It represents the full path to the file.
+func LogFilePath(val string) attribute.KeyValue {
+ return LogFilePathKey.String(val)
+}
+
+// LogFilePathResolved returns an attribute KeyValue conforming to the
+// "log.file.path_resolved" semantic conventions. It represents the full path to
+// the file, with symlinks resolved.
+func LogFilePathResolved(val string) attribute.KeyValue {
+ return LogFilePathResolvedKey.String(val)
+}
+
+// LogRecordOriginal returns an attribute KeyValue conforming to the
+// "log.record.original" semantic conventions. It represents the complete
+// original Log Record.
+func LogRecordOriginal(val string) attribute.KeyValue {
+ return LogRecordOriginalKey.String(val)
+}
+
+// LogRecordUID returns an attribute KeyValue conforming to the "log.record.uid"
+// semantic conventions. It represents a unique identifier for the Log Record.
+func LogRecordUID(val string) attribute.KeyValue {
+ return LogRecordUIDKey.String(val)
+}
+
+// Enum values for log.iostream
+var (
+ // Logs from stdout stream
+ // Stability: development
+ LogIostreamStdout = LogIostreamKey.String("stdout")
+ // Events from stderr stream
+ // Stability: development
+ LogIostreamStderr = LogIostreamKey.String("stderr")
+)
+
+// Namespace: mainframe
+const (
+ // MainframeLparNameKey is the attribute Key conforming to the
+ // "mainframe.lpar.name" semantic conventions. It represents the name of the
+ // logical partition that hosts a systems with a mainframe operating system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "LPAR01"
+ MainframeLparNameKey = attribute.Key("mainframe.lpar.name")
+)
+
+// MainframeLparName returns an attribute KeyValue conforming to the
+// "mainframe.lpar.name" semantic conventions. It represents the name of the
+// logical partition that hosts a systems with a mainframe operating system.
+func MainframeLparName(val string) attribute.KeyValue {
+ return MainframeLparNameKey.String(val)
+}
+
+// Namespace: messaging
+const (
+ // MessagingBatchMessageCountKey is the attribute Key conforming to the
+ // "messaging.batch.message_count" semantic conventions. It represents the
+ // number of messages sent, received, or processed in the scope of the batching
+ // operation.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 0, 1, 2
+ // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
+ // spans that operate with a single message. When a messaging client library
+ // supports both batch and single-message API for the same operation,
+ // instrumentations SHOULD use `messaging.batch.message_count` for batching APIs
+ // and SHOULD NOT use it for single-message APIs.
+ MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
+
+ // MessagingClientIDKey is the attribute Key conforming to the
+ // "messaging.client.id" semantic conventions. It represents a unique identifier
+ // for the client that consumes or produces a message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "client-5", "myhost@8742@s8083jm"
+ MessagingClientIDKey = attribute.Key("messaging.client.id")
+
+ // MessagingConsumerGroupNameKey is the attribute Key conforming to the
+ // "messaging.consumer.group.name" semantic conventions. It represents the name
+ // of the consumer group with which a consumer is associated.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "my-group", "indexer"
+ // Note: Semantic conventions for individual messaging systems SHOULD document
+ // whether `messaging.consumer.group.name` is applicable and what it means in
+ // the context of that system.
+ MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name")
+
+ // MessagingDestinationAnonymousKey is the attribute Key conforming to the
+ // "messaging.destination.anonymous" semantic conventions. It represents a
+ // boolean that is true if the message destination is anonymous (could be
+ // unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
+
+ // MessagingDestinationNameKey is the attribute Key conforming to the
+ // "messaging.destination.name" semantic conventions. It represents the message
+ // destination name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MyQueue", "MyTopic"
+ // Note: Destination name SHOULD uniquely identify a specific queue, topic or
+ // other entity within the broker. If
+ // the broker doesn't have such notion, the destination name SHOULD uniquely
+ // identify the broker.
+ MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
+
+ // MessagingDestinationPartitionIDKey is the attribute Key conforming to the
+ // "messaging.destination.partition.id" semantic conventions. It represents the
+ // identifier of the partition messages are sent to or received from, unique
+ // within the `messaging.destination.name`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 1
+ MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
+
+ // MessagingDestinationSubscriptionNameKey is the attribute Key conforming to
+ // the "messaging.destination.subscription.name" semantic conventions. It
+ // represents the name of the destination subscription from which a message is
+ // consumed.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "subscription-a"
+ // Note: Semantic conventions for individual messaging systems SHOULD document
+ // whether `messaging.destination.subscription.name` is applicable and what it
+ // means in the context of that system.
+ MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name")
+
+ // MessagingDestinationTemplateKey is the attribute Key conforming to the
+ // "messaging.destination.template" semantic conventions. It represents the low
+ // cardinality representation of the messaging destination name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/customers/{customerId}"
+ // Note: Destination names could be constructed from templates. An example would
+ // be a destination name involving a user name or product id. Although the
+ // destination name in this case is of high cardinality, the underlying template
+ // is of low cardinality and can be effectively used for grouping and
+ // aggregation.
+ MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
+
+ // MessagingDestinationTemporaryKey is the attribute Key conforming to the
+ // "messaging.destination.temporary" semantic conventions. It represents a
+ // boolean that is true if the message destination is temporary and might not
+ // exist anymore after messages are processed.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
+
+ // MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to
+ // the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
+ // represents the UTC epoch seconds at which the message has been accepted and
+ // stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
+
+ // MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to
+ // the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
+ // represents the ack deadline in seconds set for the modify ack deadline
+ // request.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingGCPPubSubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
+
+ // MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the
+ // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
+ // ack id for a given message.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: ack_id
+ MessagingGCPPubSubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
+
+ // MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming
+ // to the "messaging.gcp_pubsub.message.delivery_attempt" semantic conventions.
+ // It represents the delivery attempt for a given message.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
+
+ // MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to
+ // the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
+ // represents the ordering key for a given message. If the attribute is not
+ // present, the message does not have an ordering key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: ordering_key
+ MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
+
+ // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
+ // "messaging.kafka.message.key" semantic conventions. It represents the message
+ // keys in Kafka are used for grouping alike messages to ensure they're
+ // processed on the same partition. They differ from `messaging.message.id` in
+ // that they're not unique. If the key is `null`, the attribute MUST NOT be set.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myKey
+ // Note: If the key type is not string, it's string representation has to be
+ // supplied for the attribute. If the key has no unambiguous, canonical string
+ // form, don't include its value.
+ MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
+
+ // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
+ // "messaging.kafka.message.tombstone" semantic conventions. It represents a
+ // boolean that is true if the message is a tombstone.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
+
+ // MessagingKafkaOffsetKey is the attribute Key conforming to the
+ // "messaging.kafka.offset" semantic conventions. It represents the offset of a
+ // record in the corresponding Kafka partition.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset")
+
+ // MessagingMessageBodySizeKey is the attribute Key conforming to the
+ // "messaging.message.body.size" semantic conventions. It represents the size of
+ // the message body in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: This can refer to both the compressed or uncompressed body size. If
+ // both sizes are known, the uncompressed
+ // body size should be used.
+ MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
+
+ // MessagingMessageConversationIDKey is the attribute Key conforming to the
+ // "messaging.message.conversation_id" semantic conventions. It represents the
+ // conversation ID identifying the conversation to which the message belongs,
+ // represented as a string. Sometimes called "Correlation ID".
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: MyConversationId
+ MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
+
+ // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
+ // "messaging.message.envelope.size" semantic conventions. It represents the
+ // size of the message body and metadata in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note: This can refer to both the compressed or uncompressed size. If both
+ // sizes are known, the uncompressed
+ // size should be used.
+ MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
+
+ // MessagingMessageIDKey is the attribute Key conforming to the
+ // "messaging.message.id" semantic conventions. It represents a value used by
+ // the messaging system as an identifier for the message, represented as a
+ // string.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 452a7c7c7c7048c2f887f61572b18fc2
+ MessagingMessageIDKey = attribute.Key("messaging.message.id")
+
+ // MessagingOperationNameKey is the attribute Key conforming to the
+ // "messaging.operation.name" semantic conventions. It represents the
+ // system-specific name of the messaging operation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ack", "nack", "send"
+ MessagingOperationNameKey = attribute.Key("messaging.operation.name")
+
+ // MessagingOperationTypeKey is the attribute Key conforming to the
+ // "messaging.operation.type" semantic conventions. It represents a string
+ // identifying the type of the messaging operation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: If a custom value is used, it MUST be of low cardinality.
+ MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
+
+ // MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to
+ // the "messaging.rabbitmq.destination.routing_key" semantic conventions. It
+ // represents the rabbitMQ message routing key.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myKey
+ MessagingRabbitMQDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
+
+ // MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the
+ // "messaging.rabbitmq.message.delivery_tag" semantic conventions. It represents
+ // the rabbitMQ message delivery tag.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
+
+ // MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the
+ // "messaging.rocketmq.consumption_model" semantic conventions. It represents
+ // the model of message consumption. This only applies to consumer spans.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingRocketMQConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
+
+ // MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to
+ // the "messaging.rocketmq.message.delay_time_level" semantic conventions. It
+ // represents the delay time level for delay message, which determines the
+ // message delay time.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRocketMQMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
+
+ // MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming
+ // to the "messaging.rocketmq.message.delivery_timestamp" semantic conventions.
+ // It represents the timestamp in milliseconds that the delay message is
+ // expected to be delivered to consumer.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingRocketMQMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
+
+ // MessagingRocketMQMessageGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.group" semantic conventions. It represents the it
+ // is essential for FIFO message. Messages that belong to the same message group
+ // are always processed one by one within the same consumer group.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myMessageGroup
+ MessagingRocketMQMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
+
+ // MessagingRocketMQMessageKeysKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.keys" semantic conventions. It represents the
+ // key(s) of message, another way to mark message besides message id.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "keyA", "keyB"
+ MessagingRocketMQMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
+
+ // MessagingRocketMQMessageTagKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.tag" semantic conventions. It represents the
+ // secondary classifier of message besides topic.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: tagA
+ MessagingRocketMQMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
+
+ // MessagingRocketMQMessageTypeKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.type" semantic conventions. It represents the
+ // type of message.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ MessagingRocketMQMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
+
+ // MessagingRocketMQNamespaceKey is the attribute Key conforming to the
+ // "messaging.rocketmq.namespace" semantic conventions. It represents the
+ // namespace of RocketMQ resources, resources in different namespaces are
+ // individual.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: myNamespace
+ MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
+
+ // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to
+ // the "messaging.servicebus.disposition_status" semantic conventions. It
+ // represents the describes the [settlement type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
+ MessagingServiceBusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
+
+ // MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to
+ // the "messaging.servicebus.message.delivery_count" semantic conventions. It
+ // represents the number of deliveries that have been attempted for this
+ // message.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingServiceBusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
+
+ // MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to
+ // the "messaging.servicebus.message.enqueued_time" semantic conventions. It
+ // represents the UTC epoch seconds at which the message has been accepted and
+ // stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
+
+ // MessagingSystemKey is the attribute Key conforming to the "messaging.system"
+ // semantic conventions. It represents the messaging system as identified by the
+ // client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The actual messaging system may differ from the one known by the
+ // client. For example, when using Kafka client libraries to communicate with
+ // Azure Event Hubs, the `messaging.system` is set to `kafka` based on the
+ // instrumentation's best knowledge.
+ MessagingSystemKey = attribute.Key("messaging.system")
+)
+
+// MessagingBatchMessageCount returns an attribute KeyValue conforming to the
+// "messaging.batch.message_count" semantic conventions. It represents the number
+// of messages sent, received, or processed in the scope of the batching
+// operation.
+func MessagingBatchMessageCount(val int) attribute.KeyValue {
+ return MessagingBatchMessageCountKey.Int(val)
+}
+
+// MessagingClientID returns an attribute KeyValue conforming to the
+// "messaging.client.id" semantic conventions. It represents a unique identifier
+// for the client that consumes or produces a message.
+func MessagingClientID(val string) attribute.KeyValue {
+ return MessagingClientIDKey.String(val)
+}
+
+// MessagingConsumerGroupName returns an attribute KeyValue conforming to the
+// "messaging.consumer.group.name" semantic conventions. It represents the name
+// of the consumer group with which a consumer is associated.
+func MessagingConsumerGroupName(val string) attribute.KeyValue {
+ return MessagingConsumerGroupNameKey.String(val)
+}
+
+// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the
+// "messaging.destination.anonymous" semantic conventions. It represents a
+// boolean that is true if the message destination is anonymous (could be unnamed
+// or have auto-generated name).
+func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
+ return MessagingDestinationAnonymousKey.Bool(val)
+}
+
+// MessagingDestinationName returns an attribute KeyValue conforming to the
+// "messaging.destination.name" semantic conventions. It represents the message
+// destination name.
+func MessagingDestinationName(val string) attribute.KeyValue {
+ return MessagingDestinationNameKey.String(val)
+}
+
+// MessagingDestinationPartitionID returns an attribute KeyValue conforming to
+// the "messaging.destination.partition.id" semantic conventions. It represents
+// the identifier of the partition messages are sent to or received from, unique
+// within the `messaging.destination.name`.
+func MessagingDestinationPartitionID(val string) attribute.KeyValue {
+ return MessagingDestinationPartitionIDKey.String(val)
+}
+
+// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming
+// to the "messaging.destination.subscription.name" semantic conventions. It
+// represents the name of the destination subscription from which a message is
+// consumed.
+func MessagingDestinationSubscriptionName(val string) attribute.KeyValue {
+ return MessagingDestinationSubscriptionNameKey.String(val)
+}
+
+// MessagingDestinationTemplate returns an attribute KeyValue conforming to the
+// "messaging.destination.template" semantic conventions. It represents the low
+// cardinality representation of the messaging destination name.
+func MessagingDestinationTemplate(val string) attribute.KeyValue {
+ return MessagingDestinationTemplateKey.String(val)
+}
+
+// MessagingDestinationTemporary returns an attribute KeyValue conforming to the
+// "messaging.destination.temporary" semantic conventions. It represents a
+// boolean that is true if the message destination is temporary and might not
+// exist anymore after messages are processed.
+func MessagingDestinationTemporary(val bool) attribute.KeyValue {
+ return MessagingDestinationTemporaryKey.Bool(val)
+}
+
+// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming
+// to the "messaging.eventhubs.message.enqueued_time" semantic conventions. It
+// represents the UTC epoch seconds at which the message has been accepted and
+// stored in the entity.
+func MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingEventHubsMessageEnqueuedTimeKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming
+// to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It
+// represents the ack deadline in seconds set for the modify ack deadline
+// request.
+func MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue {
+ return MessagingGCPPubSubMessageAckDeadlineKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the
+// "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the
+// ack id for a given message.
+func MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue {
+ return MessagingGCPPubSubMessageAckIDKey.String(val)
+}
+
+// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue
+// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
+// conventions. It represents the delivery attempt for a given message.
+func MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue {
+ return MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val)
+}
+
+// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming
+// to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It
+// represents the ordering key for a given message. If the attribute is not
+// present, the message does not have an ordering key.
+func MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue {
+ return MessagingGCPPubSubMessageOrderingKeyKey.String(val)
+}
+
+// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.key" semantic conventions. It represents the message
+// keys in Kafka are used for grouping alike messages to ensure they're processed
+// on the same partition. They differ from `messaging.message.id` in that they're
+// not unique. If the key is `null`, the attribute MUST NOT be set.
+func MessagingKafkaMessageKey(val string) attribute.KeyValue {
+ return MessagingKafkaMessageKeyKey.String(val)
+}
+
+// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.tombstone" semantic conventions. It represents a
+// boolean that is true if the message is a tombstone.
+func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
+ return MessagingKafkaMessageTombstoneKey.Bool(val)
+}
+
+// MessagingKafkaOffset returns an attribute KeyValue conforming to the
+// "messaging.kafka.offset" semantic conventions. It represents the offset of a
+// record in the corresponding Kafka partition.
+func MessagingKafkaOffset(val int) attribute.KeyValue {
+ return MessagingKafkaOffsetKey.Int(val)
+}
+
+// MessagingMessageBodySize returns an attribute KeyValue conforming to the
+// "messaging.message.body.size" semantic conventions. It represents the size of
+// the message body in bytes.
+func MessagingMessageBodySize(val int) attribute.KeyValue {
+ return MessagingMessageBodySizeKey.Int(val)
+}
+
+// MessagingMessageConversationID returns an attribute KeyValue conforming to the
+// "messaging.message.conversation_id" semantic conventions. It represents the
+// conversation ID identifying the conversation to which the message belongs,
+// represented as a string. Sometimes called "Correlation ID".
+func MessagingMessageConversationID(val string) attribute.KeyValue {
+ return MessagingMessageConversationIDKey.String(val)
+}
+
+// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the
+// "messaging.message.envelope.size" semantic conventions. It represents the size
+// of the message body and metadata in bytes.
+func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
+ return MessagingMessageEnvelopeSizeKey.Int(val)
+}
+
+// MessagingMessageID returns an attribute KeyValue conforming to the
+// "messaging.message.id" semantic conventions. It represents a value used by the
+// messaging system as an identifier for the message, represented as a string.
+func MessagingMessageID(val string) attribute.KeyValue {
+ return MessagingMessageIDKey.String(val)
+}
+
+// MessagingOperationName returns an attribute KeyValue conforming to the
+// "messaging.operation.name" semantic conventions. It represents the
+// system-specific name of the messaging operation.
+func MessagingOperationName(val string) attribute.KeyValue {
+ return MessagingOperationNameKey.String(val)
+}
+
+// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue
+// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+// conventions. It represents the rabbitMQ message routing key.
+func MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue {
+ return MessagingRabbitMQDestinationRoutingKeyKey.String(val)
+}
+
+// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming
+// to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. It
+// represents the rabbitMQ message delivery tag.
+func MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue {
+ return MessagingRabbitMQMessageDeliveryTagKey.Int(val)
+}
+
+// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+// conventions. It represents the delay time level for delay message, which
+// determines the message delay time.
+func MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue {
+ return MessagingRocketMQMessageDelayTimeLevelKey.Int(val)
+}
+
+// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
+// conventions. It represents the timestamp in milliseconds that the delay
+// message is expected to be delivered to consumer.
+func MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue {
+ return MessagingRocketMQMessageDeliveryTimestampKey.Int(val)
+}
+
+// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.group" semantic conventions. It represents the it
+// is essential for FIFO message. Messages that belong to the same message group
+// are always processed one by one within the same consumer group.
+func MessagingRocketMQMessageGroup(val string) attribute.KeyValue {
+ return MessagingRocketMQMessageGroupKey.String(val)
+}
+
+// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.keys" semantic conventions. It represents the
+// key(s) of message, another way to mark message besides message id.
+func MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue {
+ return MessagingRocketMQMessageKeysKey.StringSlice(val)
+}
+
+// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.message.tag" semantic conventions. It represents the
+// secondary classifier of message besides topic.
+func MessagingRocketMQMessageTag(val string) attribute.KeyValue {
+ return MessagingRocketMQMessageTagKey.String(val)
+}
+
+// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.namespace" semantic conventions. It represents the
+// namespace of RocketMQ resources, resources in different namespaces are
+// individual.
+func MessagingRocketMQNamespace(val string) attribute.KeyValue {
+ return MessagingRocketMQNamespaceKey.String(val)
+}
+
+// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.delivery_count" semantic
+// conventions. It represents the number of deliveries that have been attempted
+// for this message.
+func MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue {
+ return MessagingServiceBusMessageDeliveryCountKey.Int(val)
+}
+
+// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.enqueued_time" semantic
+// conventions. It represents the UTC epoch seconds at which the message has been
+// accepted and stored in the entity.
+func MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingServiceBusMessageEnqueuedTimeKey.Int(val)
+}
+
+// Enum values for messaging.operation.type
+var (
+ // A message is created. "Create" spans always refer to a single message and are
+ // used to provide a unique creation context for messages in batch sending
+ // scenarios.
+ //
+ // Stability: development
+ MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
+ // One or more messages are provided for sending to an intermediary. If a single
+ // message is sent, the context of the "Send" span can be used as the creation
+ // context and no "Create" span needs to be created.
+ //
+ // Stability: development
+ MessagingOperationTypeSend = MessagingOperationTypeKey.String("send")
+ // One or more messages are requested by a consumer. This operation refers to
+ // pull-based scenarios, where consumers explicitly call methods of messaging
+ // SDKs to receive messages.
+ //
+ // Stability: development
+ MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
+ // One or more messages are processed by a consumer.
+ //
+ // Stability: development
+ MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process")
+ // One or more messages are settled.
+ //
+ // Stability: development
+ MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
+)
+
+// Enum values for messaging.rocketmq.consumption_model
+var (
+ // Clustering consumption model
+ // Stability: development
+ MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering")
+ // Broadcasting consumption model
+ // Stability: development
+ MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting")
+)
+
+// Enum values for messaging.rocketmq.message.type
+var (
+ // Normal message
+ // Stability: development
+ MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal")
+ // FIFO message
+ // Stability: development
+ MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo")
+ // Delay message
+ // Stability: development
+ MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay")
+ // Transaction message
+ // Stability: development
+ MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction")
+)
+
+// Enum values for messaging.servicebus.disposition_status
+var (
+ // Message is completed
+ // Stability: development
+ MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete")
+ // Message is abandoned
+ // Stability: development
+ MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon")
+ // Message is sent to dead letter queue
+ // Stability: development
+ MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter")
+ // Message is deferred
+ // Stability: development
+ MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer")
+)
+
+// Enum values for messaging.system
+var (
+ // Apache ActiveMQ
+ // Stability: development
+ MessagingSystemActiveMQ = MessagingSystemKey.String("activemq")
+ // Amazon Simple Notification Service (SNS)
+ // Stability: development
+ MessagingSystemAWSSNS = MessagingSystemKey.String("aws.sns")
+ // Amazon Simple Queue Service (SQS)
+ // Stability: development
+ MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs")
+ // Azure Event Grid
+ // Stability: development
+ MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid")
+ // Azure Event Hubs
+ // Stability: development
+ MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs")
+ // Azure Service Bus
+ // Stability: development
+ MessagingSystemServiceBus = MessagingSystemKey.String("servicebus")
+ // Google Cloud Pub/Sub
+ // Stability: development
+ MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub")
+ // Java Message Service
+ // Stability: development
+ MessagingSystemJMS = MessagingSystemKey.String("jms")
+ // Apache Kafka
+ // Stability: development
+ MessagingSystemKafka = MessagingSystemKey.String("kafka")
+ // RabbitMQ
+ // Stability: development
+ MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq")
+ // Apache RocketMQ
+ // Stability: development
+ MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq")
+ // Apache Pulsar
+ // Stability: development
+ MessagingSystemPulsar = MessagingSystemKey.String("pulsar")
+)
+
+// Namespace: network
+const (
+ // NetworkCarrierICCKey is the attribute Key conforming to the
+ // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+ // alpha-2 2-character country code associated with the mobile carrier network.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: DE
+ NetworkCarrierICCKey = attribute.Key("network.carrier.icc")
+
+ // NetworkCarrierMCCKey is the attribute Key conforming to the
+ // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
+ // country code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 310
+ NetworkCarrierMCCKey = attribute.Key("network.carrier.mcc")
+
+ // NetworkCarrierMNCKey is the attribute Key conforming to the
+ // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
+ // network code.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 001
+ NetworkCarrierMNCKey = attribute.Key("network.carrier.mnc")
+
+ // NetworkCarrierNameKey is the attribute Key conforming to the
+ // "network.carrier.name" semantic conventions. It represents the name of the
+ // mobile carrier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: sprint
+ NetworkCarrierNameKey = attribute.Key("network.carrier.name")
+
+ // NetworkConnectionStateKey is the attribute Key conforming to the
+ // "network.connection.state" semantic conventions. It represents the state of
+ // network connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "close_wait"
+ // Note: Connection states are defined as part of the [rfc9293]
+ //
+ // [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2
+ NetworkConnectionStateKey = attribute.Key("network.connection.state")
+
+ // NetworkConnectionSubtypeKey is the attribute Key conforming to the
+ // "network.connection.subtype" semantic conventions. It represents the this
+ // describes more details regarding the connection.type. It may be the type of
+ // cell technology connection, but it could be used for describing details about
+ // a wifi connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: LTE
+ NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
+
+ // NetworkConnectionTypeKey is the attribute Key conforming to the
+ // "network.connection.type" semantic conventions. It represents the internet
+ // connection type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: wifi
+ NetworkConnectionTypeKey = attribute.Key("network.connection.type")
+
+ // NetworkInterfaceNameKey is the attribute Key conforming to the
+ // "network.interface.name" semantic conventions. It represents the network
+ // interface name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "lo", "eth0"
+ NetworkInterfaceNameKey = attribute.Key("network.interface.name")
+
+ // NetworkIODirectionKey is the attribute Key conforming to the
+ // "network.io.direction" semantic conventions. It represents the direction of
+ // traffic from the perspective of the observing host's physical or virtual
+ // network interface. It should not be used to represent the logical direction
+ // of a stateful connection or network flow.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "transmit"
+ NetworkIODirectionKey = attribute.Key("network.io.direction")
+
+ // NetworkLocalAddressKey is the attribute Key conforming to the
+ // "network.local.address" semantic conventions. It represents the local address
+ // of the network connection - IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "10.1.2.80", "/tmp/my.sock"
+ NetworkLocalAddressKey = attribute.Key("network.local.address")
+
+ // NetworkLocalPortKey is the attribute Key conforming to the
+ // "network.local.port" semantic conventions. It represents the local port
+ // number of the network connection.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ NetworkLocalPortKey = attribute.Key("network.local.port")
+
+ // NetworkPeerAddressKey is the attribute Key conforming to the
+ // "network.peer.address" semantic conventions. It represents the peer address
+ // of the network connection - IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "10.1.2.80", "/tmp/my.sock"
+ NetworkPeerAddressKey = attribute.Key("network.peer.address")
+
+ // NetworkPeerPortKey is the attribute Key conforming to the "network.peer.port"
+ // semantic conventions. It represents the peer port number of the network
+ // connection.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 65123
+ NetworkPeerPortKey = attribute.Key("network.peer.port")
+
+ // NetworkProtocolNameKey is the attribute Key conforming to the
+ // "network.protocol.name" semantic conventions. It represents the
+ // [OSI application layer] or non-OSI equivalent.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "amqp", "http", "mqtt"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // [OSI application layer]: https://wikipedia.org/wiki/Application_layer
+ NetworkProtocolNameKey = attribute.Key("network.protocol.name")
+
+ // NetworkProtocolVersionKey is the attribute Key conforming to the
+ // "network.protocol.version" semantic conventions. It represents the actual
+ // version of the protocol used for network communication.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.1", "2"
+ // Note: If protocol version is subject to negotiation (for example using [ALPN]
+ // ), this attribute SHOULD be set to the negotiated version. If the actual
+ // protocol version is not known, this attribute SHOULD NOT be set.
+ //
+ // [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html
+ NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
+
+ // NetworkTransportKey is the attribute Key conforming to the
+ // "network.transport" semantic conventions. It represents the
+ // [OSI transport layer] or [inter-process communication method].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "tcp", "udp"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // Consider always setting the transport when setting a port number, since
+ // a port number is ambiguous without knowing the transport. For example
+ // different processes could be listening on TCP port 12345 and UDP port 12345.
+ //
+ // [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer
+ // [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication
+ NetworkTransportKey = attribute.Key("network.transport")
+
+ // NetworkTypeKey is the attribute Key conforming to the "network.type" semantic
+ // conventions. It represents the [OSI network layer] or non-OSI equivalent.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "ipv4", "ipv6"
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // [OSI network layer]: https://wikipedia.org/wiki/Network_layer
+ NetworkTypeKey = attribute.Key("network.type")
+)
+
+// NetworkCarrierICC returns an attribute KeyValue conforming to the
+// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+// alpha-2 2-character country code associated with the mobile carrier network.
+func NetworkCarrierICC(val string) attribute.KeyValue {
+ return NetworkCarrierICCKey.String(val)
+}
+
+// NetworkCarrierMCC returns an attribute KeyValue conforming to the
+// "network.carrier.mcc" semantic conventions. It represents the mobile carrier
+// country code.
+func NetworkCarrierMCC(val string) attribute.KeyValue {
+ return NetworkCarrierMCCKey.String(val)
+}
+
+// NetworkCarrierMNC returns an attribute KeyValue conforming to the
+// "network.carrier.mnc" semantic conventions. It represents the mobile carrier
+// network code.
+func NetworkCarrierMNC(val string) attribute.KeyValue {
+ return NetworkCarrierMNCKey.String(val)
+}
+
+// NetworkCarrierName returns an attribute KeyValue conforming to the
+// "network.carrier.name" semantic conventions. It represents the name of the
+// mobile carrier.
+func NetworkCarrierName(val string) attribute.KeyValue {
+ return NetworkCarrierNameKey.String(val)
+}
+
+// NetworkInterfaceName returns an attribute KeyValue conforming to the
+// "network.interface.name" semantic conventions. It represents the network
+// interface name.
+func NetworkInterfaceName(val string) attribute.KeyValue {
+ return NetworkInterfaceNameKey.String(val)
+}
+
+// NetworkLocalAddress returns an attribute KeyValue conforming to the
+// "network.local.address" semantic conventions. It represents the local address
+// of the network connection - IP address or Unix domain socket name.
+func NetworkLocalAddress(val string) attribute.KeyValue {
+ return NetworkLocalAddressKey.String(val)
+}
+
+// NetworkLocalPort returns an attribute KeyValue conforming to the
+// "network.local.port" semantic conventions. It represents the local port number
+// of the network connection.
+func NetworkLocalPort(val int) attribute.KeyValue {
+ return NetworkLocalPortKey.Int(val)
+}
+
+// NetworkPeerAddress returns an attribute KeyValue conforming to the
+// "network.peer.address" semantic conventions. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func NetworkPeerAddress(val string) attribute.KeyValue {
+ return NetworkPeerAddressKey.String(val)
+}
+
+// NetworkPeerPort returns an attribute KeyValue conforming to the
+// "network.peer.port" semantic conventions. It represents the peer port number
+// of the network connection.
+func NetworkPeerPort(val int) attribute.KeyValue {
+ return NetworkPeerPortKey.Int(val)
+}
+
+// NetworkProtocolName returns an attribute KeyValue conforming to the
+// "network.protocol.name" semantic conventions. It represents the
+// [OSI application layer] or non-OSI equivalent.
+//
+// [OSI application layer]: https://wikipedia.org/wiki/Application_layer
+func NetworkProtocolName(val string) attribute.KeyValue {
+ return NetworkProtocolNameKey.String(val)
+}
+
+// NetworkProtocolVersion returns an attribute KeyValue conforming to the
+// "network.protocol.version" semantic conventions. It represents the actual
+// version of the protocol used for network communication.
+func NetworkProtocolVersion(val string) attribute.KeyValue {
+ return NetworkProtocolVersionKey.String(val)
+}
+
+// Enum values for network.connection.state
+var (
+ // closed
+ // Stability: development
+ NetworkConnectionStateClosed = NetworkConnectionStateKey.String("closed")
+ // close_wait
+ // Stability: development
+ NetworkConnectionStateCloseWait = NetworkConnectionStateKey.String("close_wait")
+ // closing
+ // Stability: development
+ NetworkConnectionStateClosing = NetworkConnectionStateKey.String("closing")
+ // established
+ // Stability: development
+ NetworkConnectionStateEstablished = NetworkConnectionStateKey.String("established")
+ // fin_wait_1
+ // Stability: development
+ NetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String("fin_wait_1")
+ // fin_wait_2
+ // Stability: development
+ NetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String("fin_wait_2")
+ // last_ack
+ // Stability: development
+ NetworkConnectionStateLastAck = NetworkConnectionStateKey.String("last_ack")
+ // listen
+ // Stability: development
+ NetworkConnectionStateListen = NetworkConnectionStateKey.String("listen")
+ // syn_received
+ // Stability: development
+ NetworkConnectionStateSynReceived = NetworkConnectionStateKey.String("syn_received")
+ // syn_sent
+ // Stability: development
+ NetworkConnectionStateSynSent = NetworkConnectionStateKey.String("syn_sent")
+ // time_wait
+ // Stability: development
+ NetworkConnectionStateTimeWait = NetworkConnectionStateKey.String("time_wait")
+)
+
+// Enum values for network.connection.subtype
+var (
+ // GPRS
+ // Stability: development
+ NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
+ // EDGE
+ // Stability: development
+ NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
+ // UMTS
+ // Stability: development
+ NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
+ // CDMA
+ // Stability: development
+ NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
+ // EVDO Rel. 0
+ // Stability: development
+ NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
+ // EVDO Rev. A
+ // Stability: development
+ NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
+ // CDMA2000 1XRTT
+ // Stability: development
+ NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
+ // HSDPA
+ // Stability: development
+ NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
+ // HSUPA
+ // Stability: development
+ NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
+ // HSPA
+ // Stability: development
+ NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
+ // IDEN
+ // Stability: development
+ NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
+ // EVDO Rev. B
+ // Stability: development
+ NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
+ // LTE
+ // Stability: development
+ NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
+ // EHRPD
+ // Stability: development
+ NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
+ // HSPAP
+ // Stability: development
+ NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
+ // GSM
+ // Stability: development
+ NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
+ // TD-SCDMA
+ // Stability: development
+ NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
+ // IWLAN
+ // Stability: development
+ NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
+ // 5G NR (New Radio)
+ // Stability: development
+ NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
+ // 5G NRNSA (New Radio Non-Standalone)
+ // Stability: development
+ NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
+ // LTE CA
+ // Stability: development
+ NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
+)
+
+// Enum values for network.connection.type
+var (
+ // wifi
+ // Stability: development
+ NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
+ // wired
+ // Stability: development
+ NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
+ // cell
+ // Stability: development
+ NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
+ // unavailable
+ // Stability: development
+ NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
+ // unknown
+ // Stability: development
+ NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
+)
+
+// Enum values for network.io.direction
+var (
+ // transmit
+ // Stability: release_candidate
+ NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit")
+ // receive
+ // Stability: release_candidate
+ NetworkIODirectionReceive = NetworkIODirectionKey.String("receive")
+)
+
+// Enum values for network.transport
+var (
+ // TCP
+ // Stability: stable
+ NetworkTransportTCP = NetworkTransportKey.String("tcp")
+ // UDP
+ // Stability: stable
+ NetworkTransportUDP = NetworkTransportKey.String("udp")
+ // Named or anonymous pipe.
+ // Stability: stable
+ NetworkTransportPipe = NetworkTransportKey.String("pipe")
+ // Unix domain socket
+ // Stability: stable
+ NetworkTransportUnix = NetworkTransportKey.String("unix")
+ // QUIC
+ // Stability: stable
+ NetworkTransportQUIC = NetworkTransportKey.String("quic")
+)
+
+// Enum values for network.type
+var (
+ // IPv4
+ // Stability: stable
+ NetworkTypeIPv4 = NetworkTypeKey.String("ipv4")
+ // IPv6
+ // Stability: stable
+ NetworkTypeIPv6 = NetworkTypeKey.String("ipv6")
+)
+
+// Namespace: nfs
+const (
+ // NfsOperationNameKey is the attribute Key conforming to the
+ // "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation
+ // name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "OPEN", "READ", "GETATTR"
+ NfsOperationNameKey = attribute.Key("nfs.operation.name")
+
+ // NfsServerRepcacheStatusKey is the attribute Key conforming to the
+ // "nfs.server.repcache.status" semantic conventions. It represents the linux:
+ // one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or
+ // "nocache" (NFSD_STATS_RC_NOCACHE -- uncacheable).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: hit
+ NfsServerRepcacheStatusKey = attribute.Key("nfs.server.repcache.status")
+)
+
+// NfsOperationName returns an attribute KeyValue conforming to the
+// "nfs.operation.name" semantic conventions. It represents the NFSv4+ operation
+// name.
+func NfsOperationName(val string) attribute.KeyValue {
+ return NfsOperationNameKey.String(val)
+}
+
+// NfsServerRepcacheStatus returns an attribute KeyValue conforming to the
+// "nfs.server.repcache.status" semantic conventions. It represents the linux:
+// one of "hit" (NFSD_STATS_RC_HITS), "miss" (NFSD_STATS_RC_MISSES), or "nocache"
+// (NFSD_STATS_RC_NOCACHE -- uncacheable).
+func NfsServerRepcacheStatus(val string) attribute.KeyValue {
+ return NfsServerRepcacheStatusKey.String(val)
+}
+
+// Namespace: oci
+const (
+ // OCIManifestDigestKey is the attribute Key conforming to the
+ // "oci.manifest.digest" semantic conventions. It represents the digest of the
+ // OCI image manifest. For container images specifically is the digest by which
+ // the container image is known.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // "sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4"
+ // Note: Follows [OCI Image Manifest Specification], and specifically the
+ // [Digest property].
+ // An example can be found in [Example Image Manifest].
+ //
+ // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md
+ // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
+ // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest
+ OCIManifestDigestKey = attribute.Key("oci.manifest.digest")
+)
+
+// OCIManifestDigest returns an attribute KeyValue conforming to the
+// "oci.manifest.digest" semantic conventions. It represents the digest of the
+// OCI image manifest. For container images specifically is the digest by which
+// the container image is known.
+func OCIManifestDigest(val string) attribute.KeyValue {
+ return OCIManifestDigestKey.String(val)
+}
+
+// Namespace: onc_rpc
+const (
+ // OncRPCProcedureNameKey is the attribute Key conforming to the
+ // "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC
+ // procedure name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "OPEN", "READ", "GETATTR"
+ OncRPCProcedureNameKey = attribute.Key("onc_rpc.procedure.name")
+
+ // OncRPCProcedureNumberKey is the attribute Key conforming to the
+ // "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun
+ // RPC procedure number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OncRPCProcedureNumberKey = attribute.Key("onc_rpc.procedure.number")
+
+ // OncRPCProgramNameKey is the attribute Key conforming to the
+ // "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC
+ // program name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "portmapper", "nfs"
+ OncRPCProgramNameKey = attribute.Key("onc_rpc.program.name")
+
+ // OncRPCVersionKey is the attribute Key conforming to the "onc_rpc.version"
+ // semantic conventions. It represents the ONC/Sun RPC program version.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OncRPCVersionKey = attribute.Key("onc_rpc.version")
+)
+
+// OncRPCProcedureName returns an attribute KeyValue conforming to the
+// "onc_rpc.procedure.name" semantic conventions. It represents the ONC/Sun RPC
+// procedure name.
+func OncRPCProcedureName(val string) attribute.KeyValue {
+ return OncRPCProcedureNameKey.String(val)
+}
+
+// OncRPCProcedureNumber returns an attribute KeyValue conforming to the
+// "onc_rpc.procedure.number" semantic conventions. It represents the ONC/Sun RPC
+// procedure number.
+func OncRPCProcedureNumber(val int) attribute.KeyValue {
+ return OncRPCProcedureNumberKey.Int(val)
+}
+
+// OncRPCProgramName returns an attribute KeyValue conforming to the
+// "onc_rpc.program.name" semantic conventions. It represents the ONC/Sun RPC
+// program name.
+func OncRPCProgramName(val string) attribute.KeyValue {
+ return OncRPCProgramNameKey.String(val)
+}
+
+// OncRPCVersion returns an attribute KeyValue conforming to the
+// "onc_rpc.version" semantic conventions. It represents the ONC/Sun RPC program
+// version.
+func OncRPCVersion(val int) attribute.KeyValue {
+ return OncRPCVersionKey.Int(val)
+}
+
+// Namespace: openshift
+const (
+ // OpenShiftClusterquotaNameKey is the attribute Key conforming to the
+ // "openshift.clusterquota.name" semantic conventions. It represents the name of
+ // the cluster quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "opentelemetry"
+ OpenShiftClusterquotaNameKey = attribute.Key("openshift.clusterquota.name")
+
+ // OpenShiftClusterquotaUIDKey is the attribute Key conforming to the
+ // "openshift.clusterquota.uid" semantic conventions. It represents the UID of
+ // the cluster quota.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff"
+ OpenShiftClusterquotaUIDKey = attribute.Key("openshift.clusterquota.uid")
+)
+
+// OpenShiftClusterquotaName returns an attribute KeyValue conforming to the
+// "openshift.clusterquota.name" semantic conventions. It represents the name of
+// the cluster quota.
+func OpenShiftClusterquotaName(val string) attribute.KeyValue {
+ return OpenShiftClusterquotaNameKey.String(val)
+}
+
+// OpenShiftClusterquotaUID returns an attribute KeyValue conforming to the
+// "openshift.clusterquota.uid" semantic conventions. It represents the UID of
+// the cluster quota.
+func OpenShiftClusterquotaUID(val string) attribute.KeyValue {
+ return OpenShiftClusterquotaUIDKey.String(val)
+}
+
+// Namespace: opentracing
+const (
+ // OpenTracingRefTypeKey is the attribute Key conforming to the
+ // "opentracing.ref_type" semantic conventions. It represents the parent-child
+ // Reference type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: The causal relationship between a child Span and a parent Span.
+ OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type")
+)
+
+// Enum values for opentracing.ref_type
+var (
+ // The parent Span depends on the child Span in some capacity
+ // Stability: development
+ OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of")
+ // The parent Span doesn't depend in any way on the result of the child Span
+ // Stability: development
+ OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from")
+)
+
+// Namespace: oracle
+const (
+ // OracleDBDomainKey is the attribute Key conforming to the "oracle.db.domain"
+ // semantic conventions. It represents the database domain associated with the
+ // connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "example.com", "corp.internal", "prod.db.local"
+ // Note: This attribute SHOULD be set to the value of the `DB_DOMAIN`
+ // initialization parameter,
+ // as exposed in `v$parameter`. `DB_DOMAIN` defines the domain portion of the
+ // global
+ // database name and SHOULD be configured when a database is, or may become,
+ // part of a
+ // distributed environment. Its value consists of one or more valid identifiers
+ // (alphanumeric ASCII characters) separated by periods.
+ OracleDBDomainKey = attribute.Key("oracle.db.domain")
+
+ // OracleDBInstanceNameKey is the attribute Key conforming to the
+ // "oracle.db.instance.name" semantic conventions. It represents the instance
+ // name associated with the connection in an Oracle Real Application Clusters
+ // environment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "ORCL1", "ORCL2", "ORCL3"
+ // Note: There can be multiple instances associated with a single database
+ // service. It indicates the
+ // unique instance name to which the connection is currently bound. For non-RAC
+ // databases, this value
+ // defaults to the `oracle.db.name`.
+ OracleDBInstanceNameKey = attribute.Key("oracle.db.instance.name")
+
+ // OracleDBNameKey is the attribute Key conforming to the "oracle.db.name"
+ // semantic conventions. It represents the database name associated with the
+ // connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "ORCL1", "FREE"
+ // Note: This attribute SHOULD be set to the value of the parameter `DB_NAME`
+ // exposed in `v$parameter`.
+ OracleDBNameKey = attribute.Key("oracle.db.name")
+
+ // OracleDBPdbKey is the attribute Key conforming to the "oracle.db.pdb"
+ // semantic conventions. It represents the pluggable database (PDB) name
+ // associated with the connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "PDB1", "FREEPDB"
+ // Note: This attribute SHOULD reflect the PDB that the session is currently
+ // connected to.
+ // If instrumentation cannot reliably obtain the active PDB name for each
+ // operation
+ // without issuing an additional query (such as `SELECT SYS_CONTEXT`), it is
+ // RECOMMENDED to fall back to the PDB name specified at connection
+ // establishment.
+ OracleDBPdbKey = attribute.Key("oracle.db.pdb")
+
+ // OracleDBServiceKey is the attribute Key conforming to the "oracle.db.service"
+ // semantic conventions. It represents the service name currently associated
+ // with the database connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "order-processing-service", "db_low.adb.oraclecloud.com",
+ // "db_high.adb.oraclecloud.com"
+ // Note: The effective service name for a connection can change during its
+ // lifetime,
+ // for example after executing sql, `ALTER SESSION`. If an instrumentation
+ // cannot reliably
+ // obtain the current service name for each operation without issuing an
+ // additional
+ // query (such as `SELECT SYS_CONTEXT`), it is RECOMMENDED to fall back to the
+ // service name originally provided at connection establishment.
+ OracleDBServiceKey = attribute.Key("oracle.db.service")
+)
+
+// OracleDBDomain returns an attribute KeyValue conforming to the
+// "oracle.db.domain" semantic conventions. It represents the database domain
+// associated with the connection.
+func OracleDBDomain(val string) attribute.KeyValue {
+ return OracleDBDomainKey.String(val)
+}
+
+// OracleDBInstanceName returns an attribute KeyValue conforming to the
+// "oracle.db.instance.name" semantic conventions. It represents the instance
+// name associated with the connection in an Oracle Real Application Clusters
+// environment.
+func OracleDBInstanceName(val string) attribute.KeyValue {
+ return OracleDBInstanceNameKey.String(val)
+}
+
+// OracleDBName returns an attribute KeyValue conforming to the "oracle.db.name"
+// semantic conventions. It represents the database name associated with the
+// connection.
+func OracleDBName(val string) attribute.KeyValue {
+ return OracleDBNameKey.String(val)
+}
+
+// OracleDBPdb returns an attribute KeyValue conforming to the "oracle.db.pdb"
+// semantic conventions. It represents the pluggable database (PDB) name
+// associated with the connection.
+func OracleDBPdb(val string) attribute.KeyValue {
+ return OracleDBPdbKey.String(val)
+}
+
+// OracleDBService returns an attribute KeyValue conforming to the
+// "oracle.db.service" semantic conventions. It represents the service name
+// currently associated with the database connection.
+func OracleDBService(val string) attribute.KeyValue {
+ return OracleDBServiceKey.String(val)
+}
+
+// Namespace: oracle_cloud
+const (
+ // OracleCloudRealmKey is the attribute Key conforming to the
+ // "oracle_cloud.realm" semantic conventions. It represents the OCI realm
+ // identifier that indicates the isolated partition in which the tenancy and its
+ // resources reside.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "oc1", "oc2"
+ // Note: See [OCI documentation on realms]
+ //
+ // [OCI documentation on realms]: https://docs.oracle.com/iaas/Content/General/Concepts/regions.htm
+ OracleCloudRealmKey = attribute.Key("oracle_cloud.realm")
+)
+
+// OracleCloudRealm returns an attribute KeyValue conforming to the
+// "oracle_cloud.realm" semantic conventions. It represents the OCI realm
+// identifier that indicates the isolated partition in which the tenancy and its
+// resources reside.
+func OracleCloudRealm(val string) attribute.KeyValue {
+ return OracleCloudRealmKey.String(val)
+}
+
+// Namespace: os
+const (
+ // OSBuildIDKey is the attribute Key conforming to the "os.build_id" semantic
+ // conventions. It represents the unique identifier for a particular build or
+ // compilation of the operating system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TQ3C.230805.001.B2", "20E247", "22621"
+ OSBuildIDKey = attribute.Key("os.build_id")
+
+ // OSDescriptionKey is the attribute Key conforming to the "os.description"
+ // semantic conventions. It represents the human readable (not intended to be
+ // parsed) OS version information, like e.g. reported by `ver` or
+ // `lsb_release -a` commands.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Microsoft Windows [Version 10.0.18363.778]", "Ubuntu 18.04.1 LTS"
+ OSDescriptionKey = attribute.Key("os.description")
+
+ // OSNameKey is the attribute Key conforming to the "os.name" semantic
+ // conventions. It represents the human readable operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iOS", "Android", "Ubuntu"
+ OSNameKey = attribute.Key("os.name")
+
+ // OSTypeKey is the attribute Key conforming to the "os.type" semantic
+ // conventions. It represents the operating system type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OSTypeKey = attribute.Key("os.type")
+
+ // OSVersionKey is the attribute Key conforming to the "os.version" semantic
+ // conventions. It represents the version string of the operating system as
+ // defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.2.1", "18.04.1"
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ OSVersionKey = attribute.Key("os.version")
+)
+
+// OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
+// semantic conventions. It represents the unique identifier for a particular
+// build or compilation of the operating system.
+func OSBuildID(val string) attribute.KeyValue {
+ return OSBuildIDKey.String(val)
+}
+
+// OSDescription returns an attribute KeyValue conforming to the "os.description"
+// semantic conventions. It represents the human readable (not intended to be
+// parsed) OS version information, like e.g. reported by `ver` or
+// `lsb_release -a` commands.
+func OSDescription(val string) attribute.KeyValue {
+ return OSDescriptionKey.String(val)
+}
+
+// OSName returns an attribute KeyValue conforming to the "os.name" semantic
+// conventions. It represents the human readable operating system name.
+func OSName(val string) attribute.KeyValue {
+ return OSNameKey.String(val)
+}
+
+// OSVersion returns an attribute KeyValue conforming to the "os.version"
+// semantic conventions. It represents the version string of the operating system
+// as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func OSVersion(val string) attribute.KeyValue {
+ return OSVersionKey.String(val)
+}
+
+// Enum values for os.type
+var (
+ // Microsoft Windows
+ // Stability: development
+ OSTypeWindows = OSTypeKey.String("windows")
+ // Linux
+ // Stability: development
+ OSTypeLinux = OSTypeKey.String("linux")
+ // Apple Darwin
+ // Stability: development
+ OSTypeDarwin = OSTypeKey.String("darwin")
+ // FreeBSD
+ // Stability: development
+ OSTypeFreeBSD = OSTypeKey.String("freebsd")
+ // NetBSD
+ // Stability: development
+ OSTypeNetBSD = OSTypeKey.String("netbsd")
+ // OpenBSD
+ // Stability: development
+ OSTypeOpenBSD = OSTypeKey.String("openbsd")
+ // DragonFly BSD
+ // Stability: development
+ OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
+ // HP-UX (Hewlett Packard Unix)
+ // Stability: development
+ OSTypeHPUX = OSTypeKey.String("hpux")
+ // AIX (Advanced Interactive eXecutive)
+ // Stability: development
+ OSTypeAIX = OSTypeKey.String("aix")
+ // SunOS, Oracle Solaris
+ // Stability: development
+ OSTypeSolaris = OSTypeKey.String("solaris")
+ // IBM z/OS
+ // Stability: development
+ OSTypeZOS = OSTypeKey.String("zos")
+)
+
+// Namespace: otel
+const (
+ // OTelComponentNameKey is the attribute Key conforming to the
+ // "otel.component.name" semantic conventions. It represents a name uniquely
+ // identifying the instance of the OpenTelemetry component within its containing
+ // SDK instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "otlp_grpc_span_exporter/0", "custom-name"
+ // Note: Implementations SHOULD ensure a low cardinality for this attribute,
+ // even across application or SDK restarts.
+ // E.g. implementations MUST NOT use UUIDs as values for this attribute.
+ //
+ // Implementations MAY achieve these goals by following a
+ // `/` pattern, e.g.
+ // `batching_span_processor/0`.
+ // Hereby `otel.component.type` refers to the corresponding attribute value of
+ // the component.
+ //
+ // The value of `instance-counter` MAY be automatically assigned by the
+ // component and uniqueness within the enclosing SDK instance MUST be
+ // guaranteed.
+ // For example, `` MAY be implemented by using a monotonically
+ // increasing counter (starting with `0`), which is incremented every time an
+ // instance of the given component type is started.
+ //
+ // With this implementation, for example the first Batching Span Processor would
+ // have `batching_span_processor/0`
+ // as `otel.component.name`, the second one `batching_span_processor/1` and so
+ // on.
+ // These values will therefore be reused in the case of an application restart.
+ OTelComponentNameKey = attribute.Key("otel.component.name")
+
+ // OTelComponentTypeKey is the attribute Key conforming to the
+ // "otel.component.type" semantic conventions. It represents a name identifying
+ // the type of the OpenTelemetry component.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "batching_span_processor", "com.example.MySpanExporter"
+ // Note: If none of the standardized values apply, implementations SHOULD use
+ // the language-defined name of the type.
+ // E.g. for Java the fully qualified classname SHOULD be used in this case.
+ OTelComponentTypeKey = attribute.Key("otel.component.type")
+
+ // OTelEventNameKey is the attribute Key conforming to the "otel.event.name"
+ // semantic conventions. It represents the identifies the class / type of event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "browser.mouse.click", "device.app.lifecycle"
+ // Note: This attribute SHOULD be used by non-OTLP exporters when destination
+ // does not support `EventName` or equivalent field. This attribute MAY be used
+ // by applications using existing logging libraries so that it can be used to
+ // set the `EventName` field by Collector or SDK components.
+ OTelEventNameKey = attribute.Key("otel.event.name")
+
+ // OTelScopeNameKey is the attribute Key conforming to the "otel.scope.name"
+ // semantic conventions. It represents the name of the instrumentation scope - (
+ // `InstrumentationScope.Name` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "io.opentelemetry.contrib.mongodb"
+ OTelScopeNameKey = attribute.Key("otel.scope.name")
+
+ // OTelScopeSchemaURLKey is the attribute Key conforming to the
+ // "otel.scope.schema_url" semantic conventions. It represents the schema URL of
+ // the instrumentation scope.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://opentelemetry.io/schemas/1.31.0"
+ OTelScopeSchemaURLKey = attribute.Key("otel.scope.schema_url")
+
+ // OTelScopeVersionKey is the attribute Key conforming to the
+ // "otel.scope.version" semantic conventions. It represents the version of the
+ // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.0.0"
+ OTelScopeVersionKey = attribute.Key("otel.scope.version")
+
+ // OTelSpanParentOriginKey is the attribute Key conforming to the
+ // "otel.span.parent.origin" semantic conventions. It represents the determines
+ // whether the span has a parent span, and if so,
+ // [whether it is a remote parent].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+ OTelSpanParentOriginKey = attribute.Key("otel.span.parent.origin")
+
+ // OTelSpanSamplingResultKey is the attribute Key conforming to the
+ // "otel.span.sampling_result" semantic conventions. It represents the result
+ // value of the sampler for this span.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result")
+
+ // OTelStatusCodeKey is the attribute Key conforming to the "otel.status_code"
+ // semantic conventions. It represents the name of the code, either "OK" or
+ // "ERROR". MUST NOT be set if the status code is UNSET.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ OTelStatusCodeKey = attribute.Key("otel.status_code")
+
+ // OTelStatusDescriptionKey is the attribute Key conforming to the
+ // "otel.status_description" semantic conventions. It represents the description
+ // of the Status if it has a value, otherwise not set.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "resource not found"
+ OTelStatusDescriptionKey = attribute.Key("otel.status_description")
+)
+
+// OTelComponentName returns an attribute KeyValue conforming to the
+// "otel.component.name" semantic conventions. It represents a name uniquely
+// identifying the instance of the OpenTelemetry component within its containing
+// SDK instance.
+func OTelComponentName(val string) attribute.KeyValue {
+ return OTelComponentNameKey.String(val)
+}
+
+// OTelEventName returns an attribute KeyValue conforming to the
+// "otel.event.name" semantic conventions. It represents the identifies the class
+// / type of event.
+func OTelEventName(val string) attribute.KeyValue {
+ return OTelEventNameKey.String(val)
+}
+
+// OTelScopeName returns an attribute KeyValue conforming to the
+// "otel.scope.name" semantic conventions. It represents the name of the
+// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+func OTelScopeName(val string) attribute.KeyValue {
+ return OTelScopeNameKey.String(val)
+}
+
+// OTelScopeSchemaURL returns an attribute KeyValue conforming to the
+// "otel.scope.schema_url" semantic conventions. It represents the schema URL of
+// the instrumentation scope.
+func OTelScopeSchemaURL(val string) attribute.KeyValue {
+ return OTelScopeSchemaURLKey.String(val)
+}
+
+// OTelScopeVersion returns an attribute KeyValue conforming to the
+// "otel.scope.version" semantic conventions. It represents the version of the
+// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+func OTelScopeVersion(val string) attribute.KeyValue {
+ return OTelScopeVersionKey.String(val)
+}
+
+// OTelStatusDescription returns an attribute KeyValue conforming to the
+// "otel.status_description" semantic conventions. It represents the description
+// of the Status if it has a value, otherwise not set.
+func OTelStatusDescription(val string) attribute.KeyValue {
+ return OTelStatusDescriptionKey.String(val)
+}
+
+// Enum values for otel.component.type
+var (
+ // The builtin SDK batching span processor
+ //
+ // Stability: development
+ OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor")
+ // The builtin SDK simple span processor
+ //
+ // Stability: development
+ OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor")
+ // The builtin SDK batching log record processor
+ //
+ // Stability: development
+ OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor")
+ // The builtin SDK simple log record processor
+ //
+ // Stability: development
+ OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor")
+ // OTLP span exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter")
+ // OTLP span exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter")
+ // OTLP span exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter")
+ // Zipkin span exporter over HTTP
+ //
+ // Stability: development
+ OTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String("zipkin_http_span_exporter")
+ // OTLP log record exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter")
+ // OTLP log record exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter")
+ // OTLP log record exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter")
+ // The builtin SDK periodically exporting metric reader
+ //
+ // Stability: development
+ OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader")
+ // OTLP metric exporter over gRPC with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter")
+ // OTLP metric exporter over HTTP with protobuf serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter")
+ // OTLP metric exporter over HTTP with JSON serialization
+ //
+ // Stability: development
+ OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter")
+ // Prometheus metric exporter over HTTP with the default text-based format
+ //
+ // Stability: development
+ OTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String("prometheus_http_text_metric_exporter")
+)
+
+// Enum values for otel.span.parent.origin
+var (
+ // The span does not have a parent, it is a root span
+ // Stability: development
+ OTelSpanParentOriginNone = OTelSpanParentOriginKey.String("none")
+ // The span has a parent and the parent's span context [isRemote()] is false
+ // Stability: development
+ //
+ // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+ OTelSpanParentOriginLocal = OTelSpanParentOriginKey.String("local")
+ // The span has a parent and the parent's span context [isRemote()] is true
+ // Stability: development
+ //
+ // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+ OTelSpanParentOriginRemote = OTelSpanParentOriginKey.String("remote")
+)
+
+// Enum values for otel.span.sampling_result
+var (
+ // The span is not sampled and not recording
+ // Stability: development
+ OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP")
+ // The span is not sampled, but recording
+ // Stability: development
+ OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY")
+ // The span is sampled and recording
+ // Stability: development
+ OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE")
+)
+
+// Enum values for otel.status_code
+var (
+ // The operation has been validated by an Application developer or Operator to
+ // have completed successfully.
+ // Stability: stable
+ OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
+ // The operation contains an error.
+ // Stability: stable
+ OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
+)
+
+// Namespace: pprof
+const (
+ // PprofLocationIsFoldedKey is the attribute Key conforming to the
+ // "pprof.location.is_folded" semantic conventions. It represents the provides
+ // an indication that multiple symbols map to this location's address, for
+ // example due to identical code folding by the linker. In that case the line
+ // information represents one of the multiple symbols. This field must be
+ // recomputed when the symbolization state of the profile changes.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ PprofLocationIsFoldedKey = attribute.Key("pprof.location.is_folded")
+
+ // PprofMappingHasFilenamesKey is the attribute Key conforming to the
+ // "pprof.mapping.has_filenames" semantic conventions. It represents the
+ // indicates that there are filenames related to this mapping.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ PprofMappingHasFilenamesKey = attribute.Key("pprof.mapping.has_filenames")
+
+ // PprofMappingHasFunctionsKey is the attribute Key conforming to the
+ // "pprof.mapping.has_functions" semantic conventions. It represents the
+ // indicates that there are functions related to this mapping.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ PprofMappingHasFunctionsKey = attribute.Key("pprof.mapping.has_functions")
+
+ // PprofMappingHasInlineFramesKey is the attribute Key conforming to the
+ // "pprof.mapping.has_inline_frames" semantic conventions. It represents the
+ // indicates that there are inline frames related to this mapping.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ PprofMappingHasInlineFramesKey = attribute.Key("pprof.mapping.has_inline_frames")
+
+ // PprofMappingHasLineNumbersKey is the attribute Key conforming to the
+ // "pprof.mapping.has_line_numbers" semantic conventions. It represents the
+ // indicates that there are line numbers related to this mapping.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ PprofMappingHasLineNumbersKey = attribute.Key("pprof.mapping.has_line_numbers")
+
+ // PprofProfileCommentKey is the attribute Key conforming to the
+ // "pprof.profile.comment" semantic conventions. It represents the free-form
+ // text associated with the profile. This field should not be used to store any
+ // machine-readable information, it is only for human-friendly content.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "hello world", "bazinga"
+ PprofProfileCommentKey = attribute.Key("pprof.profile.comment")
+
+ // PprofProfileDocURLKey is the attribute Key conforming to the
+ // "pprof.profile.doc_url" semantic conventions. It represents the documentation
+ // link for this profile type.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "http://pprof.example.com/cpu-profile.html"
+ // Note: The URL must be absolute and may be missing if the profile was
+ // generated by code that did not supply a link
+ PprofProfileDocURLKey = attribute.Key("pprof.profile.doc_url")
+
+ // PprofProfileDropFramesKey is the attribute Key conforming to the
+ // "pprof.profile.drop_frames" semantic conventions. It represents the frames
+ // with Function.function_name fully matching the regexp will be dropped from
+ // the samples, along with their successors.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/foobar/"
+ PprofProfileDropFramesKey = attribute.Key("pprof.profile.drop_frames")
+
+ // PprofProfileKeepFramesKey is the attribute Key conforming to the
+ // "pprof.profile.keep_frames" semantic conventions. It represents the frames
+ // with Function.function_name fully matching the regexp will be kept, even if
+ // it matches drop_frames.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/bazinga/"
+ PprofProfileKeepFramesKey = attribute.Key("pprof.profile.keep_frames")
+
+ // PprofScopeDefaultSampleTypeKey is the attribute Key conforming to the
+ // "pprof.scope.default_sample_type" semantic conventions. It represents the
+ // records the pprof's default_sample_type in the original profile. Not set if
+ // the default sample type was missing.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cpu"
+ // Note: This attribute, if present, MUST be set at the scope level
+ // (resource_profiles[].scope_profiles[].scope.attributes[]).
+ PprofScopeDefaultSampleTypeKey = attribute.Key("pprof.scope.default_sample_type")
+
+ // PprofScopeSampleTypeOrderKey is the attribute Key conforming to the
+ // "pprof.scope.sample_type_order" semantic conventions. It represents the
+ // records the indexes of the sample types in the original profile.
+ //
+ // Type: int[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3, 0, 1, 2
+ // Note: This attribute, if present, MUST be set at the scope level
+ // (resource_profiles[].scope_profiles[].scope.attributes[]).
+ PprofScopeSampleTypeOrderKey = attribute.Key("pprof.scope.sample_type_order")
+)
+
+// PprofLocationIsFolded returns an attribute KeyValue conforming to the
+// "pprof.location.is_folded" semantic conventions. It represents the provides an
+// indication that multiple symbols map to this location's address, for example
+// due to identical code folding by the linker. In that case the line information
+// represents one of the multiple symbols. This field must be recomputed when the
+// symbolization state of the profile changes.
+func PprofLocationIsFolded(val bool) attribute.KeyValue {
+ return PprofLocationIsFoldedKey.Bool(val)
+}
+
+// PprofMappingHasFilenames returns an attribute KeyValue conforming to the
+// "pprof.mapping.has_filenames" semantic conventions. It represents the
+// indicates that there are filenames related to this mapping.
+func PprofMappingHasFilenames(val bool) attribute.KeyValue {
+ return PprofMappingHasFilenamesKey.Bool(val)
+}
+
+// PprofMappingHasFunctions returns an attribute KeyValue conforming to the
+// "pprof.mapping.has_functions" semantic conventions. It represents the
+// indicates that there are functions related to this mapping.
+func PprofMappingHasFunctions(val bool) attribute.KeyValue {
+ return PprofMappingHasFunctionsKey.Bool(val)
+}
+
+// PprofMappingHasInlineFrames returns an attribute KeyValue conforming to the
+// "pprof.mapping.has_inline_frames" semantic conventions. It represents the
+// indicates that there are inline frames related to this mapping.
+func PprofMappingHasInlineFrames(val bool) attribute.KeyValue {
+ return PprofMappingHasInlineFramesKey.Bool(val)
+}
+
+// PprofMappingHasLineNumbers returns an attribute KeyValue conforming to the
+// "pprof.mapping.has_line_numbers" semantic conventions. It represents the
+// indicates that there are line numbers related to this mapping.
+func PprofMappingHasLineNumbers(val bool) attribute.KeyValue {
+ return PprofMappingHasLineNumbersKey.Bool(val)
+}
+
+// PprofProfileComment returns an attribute KeyValue conforming to the
+// "pprof.profile.comment" semantic conventions. It represents the free-form text
+// associated with the profile. This field should not be used to store any
+// machine-readable information, it is only for human-friendly content.
+func PprofProfileComment(val ...string) attribute.KeyValue {
+ return PprofProfileCommentKey.StringSlice(val)
+}
+
+// PprofProfileDocURL returns an attribute KeyValue conforming to the
+// "pprof.profile.doc_url" semantic conventions. It represents the documentation
+// link for this profile type.
+func PprofProfileDocURL(val string) attribute.KeyValue {
+ return PprofProfileDocURLKey.String(val)
+}
+
+// PprofProfileDropFrames returns an attribute KeyValue conforming to the
+// "pprof.profile.drop_frames" semantic conventions. It represents the frames
+// with Function.function_name fully matching the regexp will be dropped from the
+// samples, along with their successors.
+func PprofProfileDropFrames(val string) attribute.KeyValue {
+ return PprofProfileDropFramesKey.String(val)
+}
+
+// PprofProfileKeepFrames returns an attribute KeyValue conforming to the
+// "pprof.profile.keep_frames" semantic conventions. It represents the frames
+// with Function.function_name fully matching the regexp will be kept, even if it
+// matches drop_frames.
+func PprofProfileKeepFrames(val string) attribute.KeyValue {
+ return PprofProfileKeepFramesKey.String(val)
+}
+
+// PprofScopeDefaultSampleType returns an attribute KeyValue conforming to the
+// "pprof.scope.default_sample_type" semantic conventions. It represents the
+// records the pprof's default_sample_type in the original profile. Not set if
+// the default sample type was missing.
+func PprofScopeDefaultSampleType(val string) attribute.KeyValue {
+ return PprofScopeDefaultSampleTypeKey.String(val)
+}
+
+// PprofScopeSampleTypeOrder returns an attribute KeyValue conforming to the
+// "pprof.scope.sample_type_order" semantic conventions. It represents the
+// records the indexes of the sample types in the original profile.
+func PprofScopeSampleTypeOrder(val ...int) attribute.KeyValue {
+ return PprofScopeSampleTypeOrderKey.IntSlice(val)
+}
+
+// Namespace: process
+const (
+ // ProcessArgsCountKey is the attribute Key conforming to the
+ // "process.args_count" semantic conventions. It represents the length of the
+ // process.command_args array.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 4
+ // Note: This field can be useful for querying or performing bucket analysis on
+ // how many arguments were provided to start a process. More arguments may be an
+ // indication of suspicious activity.
+ ProcessArgsCountKey = attribute.Key("process.args_count")
+
+ // ProcessCommandKey is the attribute Key conforming to the "process.command"
+ // semantic conventions. It represents the command used to launch the process
+ // (i.e. the command name). On Linux based systems, can be set to the zeroth
+ // string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter
+ // extracted from `GetCommandLineW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "cmd/otelcol"
+ ProcessCommandKey = attribute.Key("process.command")
+
+ // ProcessCommandArgsKey is the attribute Key conforming to the
+ // "process.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) as received by
+ // the process. On Linux-based systems (and some other Unixoid systems
+ // supporting procfs), can be set according to the list of null-delimited
+ // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this
+ // would be the full argv vector passed to `main`. SHOULD NOT be collected by
+ // default unless there is sanitization that excludes sensitive data.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "cmd/otecol", "--config=config.yaml"
+ ProcessCommandArgsKey = attribute.Key("process.command_args")
+
+ // ProcessCommandLineKey is the attribute Key conforming to the
+ // "process.command_line" semantic conventions. It represents the full command
+ // used to launch the process as a single string representing the full command.
+ // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
+ // you have to assemble it just for monitoring; use `process.command_args`
+ // instead. SHOULD NOT be collected by default unless there is sanitization that
+ // excludes sensitive data.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "C:\cmd\otecol --config="my directory\config.yaml""
+ ProcessCommandLineKey = attribute.Key("process.command_line")
+
+ // ProcessContextSwitchTypeKey is the attribute Key conforming to the
+ // "process.context_switch.type" semantic conventions. It represents the
+ // specifies whether the context switches for this data point were voluntary or
+ // involuntary.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ ProcessContextSwitchTypeKey = attribute.Key("process.context_switch.type")
+
+ // ProcessCreationTimeKey is the attribute Key conforming to the
+ // "process.creation.time" semantic conventions. It represents the date and time
+ // the process was created, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "2023-11-21T09:25:34.853Z"
+ ProcessCreationTimeKey = attribute.Key("process.creation.time")
+
+ // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the
+ // "process.executable.build_id.gnu" semantic conventions. It represents the GNU
+ // build ID as found in the `.note.gnu.build-id` ELF section (hex string).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "c89b11207f6479603b0d49bf291c092c2b719293"
+ ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu")
+
+ // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the
+ // "process.executable.build_id.go" semantic conventions. It represents the Go
+ // build ID as retrieved by `go tool buildid `.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ // "foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY"
+ ProcessExecutableBuildIDGoKey = attribute.Key("process.executable.build_id.go")
+
+ // ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the
+ // "process.executable.build_id.htlhash" semantic conventions. It represents the
+ // deterministic build ID for executables.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "600DCAFE4A110000F2BF38C493F5FB92"
+ // Note: GNU and Go build IDs may be stripped or unavailable in some
+ // environments
+ // (e.g., Alpine Linux, Docker images). This attribute provides a deterministic
+ // build ID computed by hashing the first and last 4096 bytes of the file
+ // along with its length:
+ //
+ // ```
+ // Input ← Concat(File[:4096], File[-4096:], BigEndianUInt64(Len(File)))
+ // Digest ← SHA256(Input)
+ // BuildID ← Digest[:16]
+ // ```
+ //
+ // The result is the first 16 bytes (128 bits) of the SHA256 digest,
+ // represented as a hex string.
+ ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash")
+
+ // ProcessExecutableNameKey is the attribute Key conforming to the
+ // "process.executable.name" semantic conventions. It represents the name of the
+ // process executable. On Linux based systems, this SHOULD be set to the base
+ // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to
+ // the base name of `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "otelcol"
+ ProcessExecutableNameKey = attribute.Key("process.executable.name")
+
+ // ProcessExecutablePathKey is the attribute Key conforming to the
+ // "process.executable.path" semantic conventions. It represents the full path
+ // to the process executable. On Linux based systems, can be set to the target
+ // of `proc/[pid]/exe`. On Windows, can be set to the result of
+ // `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "/usr/bin/cmd/otelcol"
+ ProcessExecutablePathKey = attribute.Key("process.executable.path")
+
+ // ProcessExitCodeKey is the attribute Key conforming to the "process.exit.code"
+ // semantic conventions. It represents the exit code of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 127
+ ProcessExitCodeKey = attribute.Key("process.exit.code")
+
+ // ProcessExitTimeKey is the attribute Key conforming to the "process.exit.time"
+ // semantic conventions. It represents the date and time the process exited, in
+ // ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "2023-11-21T09:26:12.315Z"
+ ProcessExitTimeKey = attribute.Key("process.exit.time")
+
+ // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
+ // "process.group_leader.pid" semantic conventions. It represents the PID of the
+ // process's group leader. This is also the process group ID (PGID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 23
+ ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
+
+ // ProcessInteractiveKey is the attribute Key conforming to the
+ // "process.interactive" semantic conventions. It represents the whether the
+ // process is connected to an interactive shell.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ ProcessInteractiveKey = attribute.Key("process.interactive")
+
+ // ProcessLinuxCgroupKey is the attribute Key conforming to the
+ // "process.linux.cgroup" semantic conventions. It represents the control group
+ // associated with the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "1:name=systemd:/user.slice/user-1000.slice/session-3.scope",
+ // "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope"
+ // Note: Control groups (cgroups) are a kernel feature used to organize and
+ // manage process resources. This attribute provides the path(s) to the
+ // cgroup(s) associated with the process, which should match the contents of the
+ // [/proc/[PID]/cgroup] file.
+ //
+ // [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html
+ ProcessLinuxCgroupKey = attribute.Key("process.linux.cgroup")
+
+ // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
+ // semantic conventions. It represents the username of the user that owns the
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "root"
+ ProcessOwnerKey = attribute.Key("process.owner")
+
+ // ProcessParentPIDKey is the attribute Key conforming to the
+ // "process.parent_pid" semantic conventions. It represents the parent Process
+ // identifier (PPID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 111
+ ProcessParentPIDKey = attribute.Key("process.parent_pid")
+
+ // ProcessPIDKey is the attribute Key conforming to the "process.pid" semantic
+ // conventions. It represents the process identifier (PID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 1234
+ ProcessPIDKey = attribute.Key("process.pid")
+
+ // ProcessRealUserIDKey is the attribute Key conforming to the
+ // "process.real_user.id" semantic conventions. It represents the real user ID
+ // (RUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 1000
+ ProcessRealUserIDKey = attribute.Key("process.real_user.id")
+
+ // ProcessRealUserNameKey is the attribute Key conforming to the
+ // "process.real_user.name" semantic conventions. It represents the username of
+ // the real user of the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "operator"
+ ProcessRealUserNameKey = attribute.Key("process.real_user.name")
+
+ // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
+ // "process.runtime.description" semantic conventions. It represents an
+ // additional description about the runtime of the process, for example a
+ // specific vendor customization of the runtime environment.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0
+ ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
+
+ // ProcessRuntimeNameKey is the attribute Key conforming to the
+ // "process.runtime.name" semantic conventions. It represents the name of the
+ // runtime of this process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "OpenJDK Runtime Environment"
+ ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
+
+ // ProcessRuntimeVersionKey is the attribute Key conforming to the
+ // "process.runtime.version" semantic conventions. It represents the version of
+ // the runtime of this process, as returned by the runtime without modification.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 14.0.2
+ ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
+
+ // ProcessSavedUserIDKey is the attribute Key conforming to the
+ // "process.saved_user.id" semantic conventions. It represents the saved user ID
+ // (SUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 1002
+ ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
+
+ // ProcessSavedUserNameKey is the attribute Key conforming to the
+ // "process.saved_user.name" semantic conventions. It represents the username of
+ // the saved user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "operator"
+ ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
+
+ // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
+ // "process.session_leader.pid" semantic conventions. It represents the PID of
+ // the process's session leader. This is also the session ID (SID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 14
+ ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
+
+ // ProcessStateKey is the attribute Key conforming to the "process.state"
+ // semantic conventions. It represents the process state, e.g.,
+ // [Linux Process State Codes].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "running"
+ //
+ // [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES
+ ProcessStateKey = attribute.Key("process.state")
+
+ // ProcessTitleKey is the attribute Key conforming to the "process.title"
+ // semantic conventions. It represents the process title (proctitle).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "cat /etc/hostname", "xfce4-session", "bash"
+ // Note: In many Unix-like systems, process title (proctitle), is the string
+ // that represents the name or command line of a running process, displayed by
+ // system monitoring tools like ps, top, and htop.
+ ProcessTitleKey = attribute.Key("process.title")
+
+ // ProcessUserIDKey is the attribute Key conforming to the "process.user.id"
+ // semantic conventions. It represents the effective user ID (EUID) of the
+ // process.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 1001
+ ProcessUserIDKey = attribute.Key("process.user.id")
+
+ // ProcessUserNameKey is the attribute Key conforming to the "process.user.name"
+ // semantic conventions. It represents the username of the effective user of the
+ // process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "root"
+ ProcessUserNameKey = attribute.Key("process.user.name")
+
+ // ProcessVpidKey is the attribute Key conforming to the "process.vpid" semantic
+ // conventions. It represents the virtual process identifier.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: 12
+ // Note: The process ID within a PID namespace. This is not necessarily unique
+ // across all processes on the host but it is unique within the process
+ // namespace that the process exists within.
+ ProcessVpidKey = attribute.Key("process.vpid")
+
+ // ProcessWorkingDirectoryKey is the attribute Key conforming to the
+ // "process.working_directory" semantic conventions. It represents the working
+ // directory of the process.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "/root"
+ ProcessWorkingDirectoryKey = attribute.Key("process.working_directory")
+)
+
+// ProcessArgsCount returns an attribute KeyValue conforming to the
+// "process.args_count" semantic conventions. It represents the length of the
+// process.command_args array.
+func ProcessArgsCount(val int) attribute.KeyValue {
+ return ProcessArgsCountKey.Int(val)
+}
+
+// ProcessCommand returns an attribute KeyValue conforming to the
+// "process.command" semantic conventions. It represents the command used to
+// launch the process (i.e. the command name). On Linux based systems, can be set
+// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the
+// first parameter extracted from `GetCommandLineW`.
+func ProcessCommand(val string) attribute.KeyValue {
+ return ProcessCommandKey.String(val)
+}
+
+// ProcessCommandArgs returns an attribute KeyValue conforming to the
+// "process.command_args" semantic conventions. It represents the all the command
+// arguments (including the command/executable itself) as received by the
+// process. On Linux-based systems (and some other Unixoid systems supporting
+// procfs), can be set according to the list of null-delimited strings extracted
+// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full
+// argv vector passed to `main`. SHOULD NOT be collected by default unless there
+// is sanitization that excludes sensitive data.
+func ProcessCommandArgs(val ...string) attribute.KeyValue {
+ return ProcessCommandArgsKey.StringSlice(val)
+}
+
+// ProcessCommandLine returns an attribute KeyValue conforming to the
+// "process.command_line" semantic conventions. It represents the full command
+// used to launch the process as a single string representing the full command.
+// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if
+// you have to assemble it just for monitoring; use `process.command_args`
+// instead. SHOULD NOT be collected by default unless there is sanitization that
+// excludes sensitive data.
+func ProcessCommandLine(val string) attribute.KeyValue {
+ return ProcessCommandLineKey.String(val)
+}
+
+// ProcessCreationTime returns an attribute KeyValue conforming to the
+// "process.creation.time" semantic conventions. It represents the date and time
+// the process was created, in ISO 8601 format.
+func ProcessCreationTime(val string) attribute.KeyValue {
+ return ProcessCreationTimeKey.String(val)
+}
+
+// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the
+// "process.environment_variable" semantic conventions. It represents the process
+// environment variables, `` being the environment variable name, the value
+// being the environment variable value.
+func ProcessEnvironmentVariable(key string, val string) attribute.KeyValue {
+ return attribute.String("process.environment_variable."+key, val)
+}
+
+// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the
+// "process.executable.build_id.gnu" semantic conventions. It represents the GNU
+// build ID as found in the `.note.gnu.build-id` ELF section (hex string).
+func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDGNUKey.String(val)
+}
+
+// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the
+// "process.executable.build_id.go" semantic conventions. It represents the Go
+// build ID as retrieved by `go tool buildid `.
+func ProcessExecutableBuildIDGo(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDGoKey.String(val)
+}
+
+// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to
+// the "process.executable.build_id.htlhash" semantic conventions. It represents
+// the deterministic build ID for executables.
+func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue {
+ return ProcessExecutableBuildIDHtlhashKey.String(val)
+}
+
+// ProcessExecutableName returns an attribute KeyValue conforming to the
+// "process.executable.name" semantic conventions. It represents the name of the
+// process executable. On Linux based systems, this SHOULD be set to the base
+// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the
+// base name of `GetProcessImageFileNameW`.
+func ProcessExecutableName(val string) attribute.KeyValue {
+ return ProcessExecutableNameKey.String(val)
+}
+
+// ProcessExecutablePath returns an attribute KeyValue conforming to the
+// "process.executable.path" semantic conventions. It represents the full path to
+// the process executable. On Linux based systems, can be set to the target of
+// `proc/[pid]/exe`. On Windows, can be set to the result of
+// `GetProcessImageFileNameW`.
+func ProcessExecutablePath(val string) attribute.KeyValue {
+ return ProcessExecutablePathKey.String(val)
+}
+
+// ProcessExitCode returns an attribute KeyValue conforming to the
+// "process.exit.code" semantic conventions. It represents the exit code of the
+// process.
+func ProcessExitCode(val int) attribute.KeyValue {
+ return ProcessExitCodeKey.Int(val)
+}
+
+// ProcessExitTime returns an attribute KeyValue conforming to the
+// "process.exit.time" semantic conventions. It represents the date and time the
+// process exited, in ISO 8601 format.
+func ProcessExitTime(val string) attribute.KeyValue {
+ return ProcessExitTimeKey.String(val)
+}
+
+// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
+// "process.group_leader.pid" semantic conventions. It represents the PID of the
+// process's group leader. This is also the process group ID (PGID) of the
+// process.
+func ProcessGroupLeaderPID(val int) attribute.KeyValue {
+ return ProcessGroupLeaderPIDKey.Int(val)
+}
+
+// ProcessInteractive returns an attribute KeyValue conforming to the
+// "process.interactive" semantic conventions. It represents the whether the
+// process is connected to an interactive shell.
+func ProcessInteractive(val bool) attribute.KeyValue {
+ return ProcessInteractiveKey.Bool(val)
+}
+
+// ProcessLinuxCgroup returns an attribute KeyValue conforming to the
+// "process.linux.cgroup" semantic conventions. It represents the control group
+// associated with the process.
+func ProcessLinuxCgroup(val string) attribute.KeyValue {
+ return ProcessLinuxCgroupKey.String(val)
+}
+
+// ProcessOwner returns an attribute KeyValue conforming to the "process.owner"
+// semantic conventions. It represents the username of the user that owns the
+// process.
+func ProcessOwner(val string) attribute.KeyValue {
+ return ProcessOwnerKey.String(val)
+}
+
+// ProcessParentPID returns an attribute KeyValue conforming to the
+// "process.parent_pid" semantic conventions. It represents the parent Process
+// identifier (PPID).
+func ProcessParentPID(val int) attribute.KeyValue {
+ return ProcessParentPIDKey.Int(val)
+}
+
+// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
+// semantic conventions. It represents the process identifier (PID).
+func ProcessPID(val int) attribute.KeyValue {
+ return ProcessPIDKey.Int(val)
+}
+
+// ProcessRealUserID returns an attribute KeyValue conforming to the
+// "process.real_user.id" semantic conventions. It represents the real user ID
+// (RUID) of the process.
+func ProcessRealUserID(val int) attribute.KeyValue {
+ return ProcessRealUserIDKey.Int(val)
+}
+
+// ProcessRealUserName returns an attribute KeyValue conforming to the
+// "process.real_user.name" semantic conventions. It represents the username of
+// the real user of the process.
+func ProcessRealUserName(val string) attribute.KeyValue {
+ return ProcessRealUserNameKey.String(val)
+}
+
+// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
+// "process.runtime.description" semantic conventions. It represents an
+// additional description about the runtime of the process, for example a
+// specific vendor customization of the runtime environment.
+func ProcessRuntimeDescription(val string) attribute.KeyValue {
+ return ProcessRuntimeDescriptionKey.String(val)
+}
+
+// ProcessRuntimeName returns an attribute KeyValue conforming to the
+// "process.runtime.name" semantic conventions. It represents the name of the
+// runtime of this process.
+func ProcessRuntimeName(val string) attribute.KeyValue {
+ return ProcessRuntimeNameKey.String(val)
+}
+
+// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
+// "process.runtime.version" semantic conventions. It represents the version of
+// the runtime of this process, as returned by the runtime without modification.
+func ProcessRuntimeVersion(val string) attribute.KeyValue {
+ return ProcessRuntimeVersionKey.String(val)
+}
+
+// ProcessSavedUserID returns an attribute KeyValue conforming to the
+// "process.saved_user.id" semantic conventions. It represents the saved user ID
+// (SUID) of the process.
+func ProcessSavedUserID(val int) attribute.KeyValue {
+ return ProcessSavedUserIDKey.Int(val)
+}
+
+// ProcessSavedUserName returns an attribute KeyValue conforming to the
+// "process.saved_user.name" semantic conventions. It represents the username of
+// the saved user.
+func ProcessSavedUserName(val string) attribute.KeyValue {
+ return ProcessSavedUserNameKey.String(val)
+}
+
+// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
+// "process.session_leader.pid" semantic conventions. It represents the PID of
+// the process's session leader. This is also the session ID (SID) of the
+// process.
+func ProcessSessionLeaderPID(val int) attribute.KeyValue {
+ return ProcessSessionLeaderPIDKey.Int(val)
+}
+
+// ProcessTitle returns an attribute KeyValue conforming to the "process.title"
+// semantic conventions. It represents the process title (proctitle).
+func ProcessTitle(val string) attribute.KeyValue {
+ return ProcessTitleKey.String(val)
+}
+
+// ProcessUserID returns an attribute KeyValue conforming to the
+// "process.user.id" semantic conventions. It represents the effective user ID
+// (EUID) of the process.
+func ProcessUserID(val int) attribute.KeyValue {
+ return ProcessUserIDKey.Int(val)
+}
+
+// ProcessUserName returns an attribute KeyValue conforming to the
+// "process.user.name" semantic conventions. It represents the username of the
+// effective user of the process.
+func ProcessUserName(val string) attribute.KeyValue {
+ return ProcessUserNameKey.String(val)
+}
+
+// ProcessVpid returns an attribute KeyValue conforming to the "process.vpid"
+// semantic conventions. It represents the virtual process identifier.
+func ProcessVpid(val int) attribute.KeyValue {
+ return ProcessVpidKey.Int(val)
+}
+
+// ProcessWorkingDirectory returns an attribute KeyValue conforming to the
+// "process.working_directory" semantic conventions. It represents the working
+// directory of the process.
+func ProcessWorkingDirectory(val string) attribute.KeyValue {
+ return ProcessWorkingDirectoryKey.String(val)
+}
+
+// Enum values for process.context_switch.type
+var (
+ // voluntary
+ // Stability: release_candidate
+ ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
+ // involuntary
+ // Stability: release_candidate
+ ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
+)
+
+// Enum values for process.state
+var (
+ // running
+ // Stability: release_candidate
+ ProcessStateRunning = ProcessStateKey.String("running")
+ // sleeping
+ // Stability: release_candidate
+ ProcessStateSleeping = ProcessStateKey.String("sleeping")
+ // stopped
+ // Stability: release_candidate
+ ProcessStateStopped = ProcessStateKey.String("stopped")
+ // defunct
+ // Stability: release_candidate
+ ProcessStateDefunct = ProcessStateKey.String("defunct")
+)
+
+// Namespace: profile
+const (
+ // ProfileFrameTypeKey is the attribute Key conforming to the
+ // "profile.frame.type" semantic conventions. It represents the describes the
+ // interpreter or compiler of a single frame.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "cpython"
+ ProfileFrameTypeKey = attribute.Key("profile.frame.type")
+)
+
+// Enum values for profile.frame.type
+var (
+ // [.NET]
+ //
+ // Stability: development
+ //
+ // [.NET]: https://wikipedia.org/wiki/.NET
+ ProfileFrameTypeDotnet = ProfileFrameTypeKey.String("dotnet")
+ // [JVM]
+ //
+ // Stability: development
+ //
+ // [JVM]: https://wikipedia.org/wiki/Java_virtual_machine
+ ProfileFrameTypeJVM = ProfileFrameTypeKey.String("jvm")
+ // [Kernel]
+ //
+ // Stability: development
+ //
+ // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system)
+ ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel")
+ // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a
+ // more precise value MUST be used.
+ //
+ // Stability: development
+ //
+ // [C]: https://wikipedia.org/wiki/C_(programming_language)
+ // [C++]: https://wikipedia.org/wiki/C%2B%2B
+ // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
+ // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
+ ProfileFrameTypeNative = ProfileFrameTypeKey.String("native")
+ // [Perl]
+ //
+ // Stability: development
+ //
+ // [Perl]: https://wikipedia.org/wiki/Perl
+ ProfileFrameTypePerl = ProfileFrameTypeKey.String("perl")
+ // [PHP]
+ //
+ // Stability: development
+ //
+ // [PHP]: https://wikipedia.org/wiki/PHP
+ ProfileFrameTypePHP = ProfileFrameTypeKey.String("php")
+ // [Python]
+ //
+ // Stability: development
+ //
+ // [Python]: https://wikipedia.org/wiki/Python_(programming_language)
+ ProfileFrameTypeCpython = ProfileFrameTypeKey.String("cpython")
+ // [Ruby]
+ //
+ // Stability: development
+ //
+ // [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language)
+ ProfileFrameTypeRuby = ProfileFrameTypeKey.String("ruby")
+ // [V8JS]
+ //
+ // Stability: development
+ //
+ // [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine)
+ ProfileFrameTypeV8JS = ProfileFrameTypeKey.String("v8js")
+ // [Erlang]
+ //
+ // Stability: development
+ //
+ // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine)
+ ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam")
+ // [Go],
+ //
+ // Stability: development
+ //
+ // [Go]: https://wikipedia.org/wiki/Go_(programming_language)
+ ProfileFrameTypeGo = ProfileFrameTypeKey.String("go")
+ // [Rust]
+ //
+ // Stability: development
+ //
+ // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language)
+ ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust")
+ // [LuaJIT]
+ //
+ // Stability: development
+ //
+ // [LuaJIT]: https://en.wikipedia.org/wiki/LuaJIT
+ ProfileFrameTypeLuajit = ProfileFrameTypeKey.String("luajit")
+)
+
+// Namespace: rpc
+const (
+ // RPCMethodKey is the attribute Key conforming to the "rpc.method" semantic
+ // conventions. It represents the fully-qualified logical name of the method
+ // from the RPC interface perspective.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "com.example.ExampleService/exampleMethod", "EchoService/Echo",
+ // "_OTHER"
+ // Note: The method name MAY have unbounded cardinality in edge or error cases.
+ //
+ // Some RPC frameworks or libraries provide a fixed set of recognized methods
+ // for client stubs and server implementations. Instrumentations for such
+ // frameworks MUST set this attribute to the original method name only
+ // when the method is recognized by the framework or library.
+ //
+ // When the method is not recognized, for example, when the server receives
+ // a request for a method that is not predefined on the server, or when
+ // instrumentation is not able to reliably detect if the method is predefined,
+ // the attribute MUST be set to `_OTHER`. In such cases, tracing
+ // instrumentations MUST also set `rpc.method_original` attribute to
+ // the original method value.
+ //
+ // If the RPC instrumentation could end up converting valid RPC methods to
+ // `_OTHER`, then it SHOULD provide a way to configure the list of recognized
+ // RPC methods.
+ //
+ // The `rpc.method` can be different from the name of any implementing
+ // method/function.
+ // The `code.function.name` attribute may be used to record the fully-qualified
+ // method actually executing the call on the server side, or the
+ // RPC client stub method on the client side.
+ RPCMethodKey = attribute.Key("rpc.method")
+
+ // RPCMethodOriginalKey is the attribute Key conforming to the
+ // "rpc.method_original" semantic conventions. It represents the original name
+ // of the method used by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "com.myservice.EchoService/catchAll",
+ // "com.myservice.EchoService/unknownMethod", "InvalidMethod"
+ RPCMethodOriginalKey = attribute.Key("rpc.method_original")
+
+ // RPCResponseStatusCodeKey is the attribute Key conforming to the
+ // "rpc.response.status_code" semantic conventions. It represents the status
+ // code of the RPC returned by the RPC server or generated by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "OK", "DEADLINE_EXCEEDED", "-32602"
+ // Note: Usually it represents an error code, but may also represent partial
+ // success, warning, or differentiate between various types of successful
+ // outcomes.
+ // Semantic conventions for individual RPC frameworks SHOULD document what
+ // `rpc.response.status_code` means in the context of that system and which
+ // values are considered to represent errors.
+ RPCResponseStatusCodeKey = attribute.Key("rpc.response.status_code")
+
+ // RPCSystemNameKey is the attribute Key conforming to the "rpc.system.name"
+ // semantic conventions. It represents the Remote Procedure Call (RPC) system.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ // Note: The client and server RPC systems may differ for the same RPC
+ // interaction. For example, a client may use Apache Dubbo or Connect RPC to
+ // communicate with a server that uses gRPC since both protocols provide
+ // compatibility with gRPC.
+ RPCSystemNameKey = attribute.Key("rpc.system.name")
+)
+
+// RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
+// semantic conventions. It represents the fully-qualified logical name of the
+// method from the RPC interface perspective.
+func RPCMethod(val string) attribute.KeyValue {
+ return RPCMethodKey.String(val)
+}
+
+// RPCMethodOriginal returns an attribute KeyValue conforming to the
+// "rpc.method_original" semantic conventions. It represents the original name of
+// the method used by the client.
+func RPCMethodOriginal(val string) attribute.KeyValue {
+ return RPCMethodOriginalKey.String(val)
+}
+
+// RPCRequestMetadata returns an attribute KeyValue conforming to the
+// "rpc.request.metadata" semantic conventions. It represents the RPC request
+// metadata, `` being the normalized RPC metadata key (lowercase), the value
+// being the metadata values.
+func RPCRequestMetadata(key string, val ...string) attribute.KeyValue {
+ return attribute.StringSlice("rpc.request.metadata."+key, val)
+}
+
+// RPCResponseMetadata returns an attribute KeyValue conforming to the
+// "rpc.response.metadata" semantic conventions. It represents the RPC response
+// metadata, `` being the normalized RPC metadata key (lowercase), the value
+// being the metadata values.
+func RPCResponseMetadata(key string, val ...string) attribute.KeyValue {
+ return attribute.StringSlice("rpc.response.metadata."+key, val)
+}
+
+// RPCResponseStatusCode returns an attribute KeyValue conforming to the
+// "rpc.response.status_code" semantic conventions. It represents the status code
+// of the RPC returned by the RPC server or generated by the client.
+func RPCResponseStatusCode(val string) attribute.KeyValue {
+ return RPCResponseStatusCodeKey.String(val)
+}
+
+// Enum values for rpc.system.name
+var (
+ // [gRPC]
+ // Stability: release_candidate
+ //
+ // [gRPC]: https://grpc.io/
+ RPCSystemNameGRPC = RPCSystemNameKey.String("grpc")
+ // [Apache Dubbo]
+ // Stability: release_candidate
+ //
+ // [Apache Dubbo]: https://dubbo.apache.org/
+ RPCSystemNameDubbo = RPCSystemNameKey.String("dubbo")
+ // [Connect RPC]
+ // Stability: development
+ //
+ // [Connect RPC]: https://connectrpc.com/
+ RPCSystemNameConnectrpc = RPCSystemNameKey.String("connectrpc")
+ // [JSON-RPC]
+ // Stability: development
+ //
+ // [JSON-RPC]: https://www.jsonrpc.org/
+ RPCSystemNameJSONRPC = RPCSystemNameKey.String("jsonrpc")
+)
+
+// Namespace: security_rule
+const (
+ // SecurityRuleCategoryKey is the attribute Key conforming to the
+ // "security_rule.category" semantic conventions. It represents a categorization
+ // value keyword used by the entity using the rule for detection of this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Attempted Information Leak"
+ SecurityRuleCategoryKey = attribute.Key("security_rule.category")
+
+ // SecurityRuleDescriptionKey is the attribute Key conforming to the
+ // "security_rule.description" semantic conventions. It represents the
+ // description of the rule generating the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Block requests to public DNS over HTTPS / TLS protocols"
+ SecurityRuleDescriptionKey = attribute.Key("security_rule.description")
+
+ // SecurityRuleLicenseKey is the attribute Key conforming to the
+ // "security_rule.license" semantic conventions. It represents the name of the
+ // license under which the rule used to generate this event is made available.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Apache 2.0"
+ SecurityRuleLicenseKey = attribute.Key("security_rule.license")
+
+ // SecurityRuleNameKey is the attribute Key conforming to the
+ // "security_rule.name" semantic conventions. It represents the name of the rule
+ // or signature generating the event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "BLOCK_DNS_over_TLS"
+ SecurityRuleNameKey = attribute.Key("security_rule.name")
+
+ // SecurityRuleReferenceKey is the attribute Key conforming to the
+ // "security_rule.reference" semantic conventions. It represents the reference
+ // URL to additional information about the rule used to generate this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://en.wikipedia.org/wiki/DNS_over_TLS"
+ // Note: The URL can point to the vendor’s documentation about the rule. If
+ // that’s not available, it can also be a link to a more general page
+ // describing this type of alert.
+ SecurityRuleReferenceKey = attribute.Key("security_rule.reference")
+
+ // SecurityRuleRulesetNameKey is the attribute Key conforming to the
+ // "security_rule.ruleset.name" semantic conventions. It represents the name of
+ // the ruleset, policy, group, or parent category in which the rule used to
+ // generate this event is a member.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Standard_Protocol_Filters"
+ SecurityRuleRulesetNameKey = attribute.Key("security_rule.ruleset.name")
+
+ // SecurityRuleUUIDKey is the attribute Key conforming to the
+ // "security_rule.uuid" semantic conventions. It represents a rule ID that is
+ // unique within the scope of a set or group of agents, observers, or other
+ // entities using the rule for detection of this event.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "550e8400-e29b-41d4-a716-446655440000", "1100110011"
+ SecurityRuleUUIDKey = attribute.Key("security_rule.uuid")
+
+ // SecurityRuleVersionKey is the attribute Key conforming to the
+ // "security_rule.version" semantic conventions. It represents the version /
+ // revision of the rule being used for analysis.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.0.0"
+ SecurityRuleVersionKey = attribute.Key("security_rule.version")
+)
+
+// SecurityRuleCategory returns an attribute KeyValue conforming to the
+// "security_rule.category" semantic conventions. It represents a categorization
+// value keyword used by the entity using the rule for detection of this event.
+func SecurityRuleCategory(val string) attribute.KeyValue {
+ return SecurityRuleCategoryKey.String(val)
+}
+
+// SecurityRuleDescription returns an attribute KeyValue conforming to the
+// "security_rule.description" semantic conventions. It represents the
+// description of the rule generating the event.
+func SecurityRuleDescription(val string) attribute.KeyValue {
+ return SecurityRuleDescriptionKey.String(val)
+}
+
+// SecurityRuleLicense returns an attribute KeyValue conforming to the
+// "security_rule.license" semantic conventions. It represents the name of the
+// license under which the rule used to generate this event is made available.
+func SecurityRuleLicense(val string) attribute.KeyValue {
+ return SecurityRuleLicenseKey.String(val)
+}
+
+// SecurityRuleName returns an attribute KeyValue conforming to the
+// "security_rule.name" semantic conventions. It represents the name of the rule
+// or signature generating the event.
+func SecurityRuleName(val string) attribute.KeyValue {
+ return SecurityRuleNameKey.String(val)
+}
+
+// SecurityRuleReference returns an attribute KeyValue conforming to the
+// "security_rule.reference" semantic conventions. It represents the reference
+// URL to additional information about the rule used to generate this event.
+func SecurityRuleReference(val string) attribute.KeyValue {
+ return SecurityRuleReferenceKey.String(val)
+}
+
+// SecurityRuleRulesetName returns an attribute KeyValue conforming to the
+// "security_rule.ruleset.name" semantic conventions. It represents the name of
+// the ruleset, policy, group, or parent category in which the rule used to
+// generate this event is a member.
+func SecurityRuleRulesetName(val string) attribute.KeyValue {
+ return SecurityRuleRulesetNameKey.String(val)
+}
+
+// SecurityRuleUUID returns an attribute KeyValue conforming to the
+// "security_rule.uuid" semantic conventions. It represents a rule ID that is
+// unique within the scope of a set or group of agents, observers, or other
+// entities using the rule for detection of this event.
+func SecurityRuleUUID(val string) attribute.KeyValue {
+ return SecurityRuleUUIDKey.String(val)
+}
+
+// SecurityRuleVersion returns an attribute KeyValue conforming to the
+// "security_rule.version" semantic conventions. It represents the version /
+// revision of the rule being used for analysis.
+func SecurityRuleVersion(val string) attribute.KeyValue {
+ return SecurityRuleVersionKey.String(val)
+}
+
+// Namespace: server
+const (
+ // ServerAddressKey is the attribute Key conforming to the "server.address"
+ // semantic conventions. It represents the server domain name if available
+ // without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the client side, and when communicating through an
+ // intermediary, `server.address` SHOULD represent the server address behind any
+ // intermediaries, for example proxies, if it's available.
+ ServerAddressKey = attribute.Key("server.address")
+
+ // ServerPortKey is the attribute Key conforming to the "server.port" semantic
+ // conventions. It represents the server port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: 80, 8080, 443
+ // Note: When observed from the client side, and when communicating through an
+ // intermediary, `server.port` SHOULD represent the server port behind any
+ // intermediaries, for example proxies, if it's available.
+ ServerPortKey = attribute.Key("server.port")
+)
+
+// ServerAddress returns an attribute KeyValue conforming to the "server.address"
+// semantic conventions. It represents the server domain name if available
+// without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func ServerAddress(val string) attribute.KeyValue {
+ return ServerAddressKey.String(val)
+}
+
+// ServerPort returns an attribute KeyValue conforming to the "server.port"
+// semantic conventions. It represents the server port number.
+func ServerPort(val int) attribute.KeyValue {
+ return ServerPortKey.Int(val)
+}
+
+// Namespace: service
+const (
+ // ServiceCriticalityKey is the attribute Key conforming to the
+ // "service.criticality" semantic conventions. It represents the operational
+ // criticality of the service.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Alpha
+ //
+ // Examples: "critical", "high", "medium", "low"
+ // Note: Application developers are encouraged to set `service.criticality` to
+ // express the operational importance of their services. Telemetry consumers MAY
+ // use this attribute to optimize telemetry collection or improve user
+ // experience.
+ ServiceCriticalityKey = attribute.Key("service.criticality")
+
+ // ServiceInstanceIDKey is the attribute Key conforming to the
+ // "service.instance.id" semantic conventions. It represents the string ID of
+ // the service instance.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "627cc493-f310-47de-96bd-71410b7dec09"
+ // Note: MUST be unique for each instance of the same
+ // `service.namespace,service.name` pair (in other words
+ // `service.namespace,service.name,service.instance.id` triplet MUST be globally
+ // unique). The ID helps to
+ // distinguish instances of the same service that exist at the same time (e.g.
+ // instances of a horizontally scaled
+ // service).
+ //
+ // Implementations, such as SDKs, are recommended to generate a random Version 1
+ // or Version 4 [RFC
+ // 4122] UUID, but are free to use an inherent unique ID as
+ // the source of
+ // this value if stability is desirable. In that case, the ID SHOULD be used as
+ // source of a UUID Version 5 and
+ // SHOULD use the following UUID as the namespace:
+ // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
+ //
+ // UUIDs are typically recommended, as only an opaque value for the purposes of
+ // identifying a service instance is
+ // needed. Similar to what can be seen in the man page for the
+ // [`/etc/machine-id`] file, the underlying
+ // data, such as pod name and namespace should be treated as confidential, being
+ // the user's choice to expose it
+ // or not via another resource attribute.
+ //
+ // For applications running behind an application server (like unicorn), we do
+ // not recommend using one identifier
+ // for all processes participating in the application. Instead, it's recommended
+ // each division (e.g. a worker
+ // thread in unicorn) to have its own instance.id.
+ //
+ // It's not recommended for a Collector to set `service.instance.id` if it can't
+ // unambiguously determine the
+ // service instance that is generating that telemetry. For instance, creating an
+ // UUID based on `pod.name` will
+ // likely be wrong, as the Collector might not know from which container within
+ // that pod the telemetry originated.
+ // However, Collectors can set the `service.instance.id` if they can
+ // unambiguously determine the service instance
+ // for that telemetry. This is typically the case for scraping receivers, as
+ // they know the target address and
+ // port.
+ //
+ // [RFC
+ // 4122]: https://www.ietf.org/rfc/rfc4122.txt
+ // [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html
+ ServiceInstanceIDKey = attribute.Key("service.instance.id")
+
+ // ServiceNameKey is the attribute Key conforming to the "service.name" semantic
+ // conventions. It represents the logical name of the service.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "shoppingcart"
+ // Note: MUST be the same for all instances of horizontally scaled services. If
+ // the value was not specified, SDKs MUST fallback to `unknown_service:`
+ // concatenated with the process executable name, e.g. `unknown_service:bash`.
+ // If the process executable name is not available, the value MUST be set to
+ // `unknown_service`.
+ // The process executable name is the name of the process executable, the same
+ // value as described by the [`process.executable.name`] resource attribute.
+ //
+ // [`process.executable.name`]: process.md
+ ServiceNameKey = attribute.Key("service.name")
+
+ // ServiceNamespaceKey is the attribute Key conforming to the
+ // "service.namespace" semantic conventions. It represents a namespace for
+ // `service.name`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "Shop"
+ // Note: A string value having a meaning that helps to distinguish a group of
+ // services, for example the team name that owns a group of services.
+ // `service.name` is expected to be unique within the same namespace. If
+ // `service.namespace` is not specified in the Resource then `service.name` is
+ // expected to be unique for all services that have no explicit namespace
+ // defined (so the empty/unspecified namespace is simply one more valid
+ // namespace). Zero-length namespace string is assumed equal to unspecified
+ // namespace.
+ ServiceNamespaceKey = attribute.Key("service.namespace")
+
+ // ServicePeerNameKey is the attribute Key conforming to the "service.peer.name"
+ // semantic conventions. It represents the logical name of the service on the
+ // other side of the connection. SHOULD be equal to the actual [`service.name`]
+ // resource attribute of the remote service if any.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "shoppingcart"
+ //
+ // [`service.name`]: /docs/resource/README.md#service
+ ServicePeerNameKey = attribute.Key("service.peer.name")
+
+ // ServicePeerNamespaceKey is the attribute Key conforming to the
+ // "service.peer.namespace" semantic conventions. It represents the logical
+ // namespace of the service on the other side of the connection. SHOULD be equal
+ // to the actual [`service.namespace`] resource attribute of the remote service
+ // if any.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Shop"
+ //
+ // [`service.namespace`]: /docs/resource/README.md#service
+ ServicePeerNamespaceKey = attribute.Key("service.peer.namespace")
+
+ // ServiceVersionKey is the attribute Key conforming to the "service.version"
+ // semantic conventions. It represents the version string of the service
+ // component. The format is not defined by these conventions.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "2.0.0", "a01dbef8a"
+ ServiceVersionKey = attribute.Key("service.version")
+)
+
+// ServiceInstanceID returns an attribute KeyValue conforming to the
+// "service.instance.id" semantic conventions. It represents the string ID of the
+// service instance.
+func ServiceInstanceID(val string) attribute.KeyValue {
+ return ServiceInstanceIDKey.String(val)
+}
+
+// ServiceName returns an attribute KeyValue conforming to the "service.name"
+// semantic conventions. It represents the logical name of the service.
+func ServiceName(val string) attribute.KeyValue {
+ return ServiceNameKey.String(val)
+}
+
+// ServiceNamespace returns an attribute KeyValue conforming to the
+// "service.namespace" semantic conventions. It represents a namespace for
+// `service.name`.
+func ServiceNamespace(val string) attribute.KeyValue {
+ return ServiceNamespaceKey.String(val)
+}
+
+// ServicePeerName returns an attribute KeyValue conforming to the
+// "service.peer.name" semantic conventions. It represents the logical name of
+// the service on the other side of the connection. SHOULD be equal to the actual
+// [`service.name`] resource attribute of the remote service if any.
+//
+// [`service.name`]: /docs/resource/README.md#service
+func ServicePeerName(val string) attribute.KeyValue {
+ return ServicePeerNameKey.String(val)
+}
+
+// ServicePeerNamespace returns an attribute KeyValue conforming to the
+// "service.peer.namespace" semantic conventions. It represents the logical
+// namespace of the service on the other side of the connection. SHOULD be equal
+// to the actual [`service.namespace`] resource attribute of the remote service
+// if any.
+//
+// [`service.namespace`]: /docs/resource/README.md#service
+func ServicePeerNamespace(val string) attribute.KeyValue {
+ return ServicePeerNamespaceKey.String(val)
+}
+
+// ServiceVersion returns an attribute KeyValue conforming to the
+// "service.version" semantic conventions. It represents the version string of
+// the service component. The format is not defined by these conventions.
+func ServiceVersion(val string) attribute.KeyValue {
+ return ServiceVersionKey.String(val)
+}
+
+// Enum values for service.criticality
+var (
+ // Service is business-critical; downtime directly impacts revenue, user
+ // experience, or core functionality.
+ //
+ // Stability: alpha
+ ServiceCriticalityCritical = ServiceCriticalityKey.String("critical")
+ // Service is important but has degradation tolerance or fallback mechanisms.
+ //
+ // Stability: alpha
+ ServiceCriticalityHigh = ServiceCriticalityKey.String("high")
+ // Service provides supplementary functionality; degradation has limited user
+ // impact.
+ //
+ // Stability: alpha
+ ServiceCriticalityMedium = ServiceCriticalityKey.String("medium")
+ // Service is non-essential to core operations; used for background tasks or
+ // internal tools.
+ //
+ // Stability: alpha
+ ServiceCriticalityLow = ServiceCriticalityKey.String("low")
+)
+
+// Namespace: session
+const (
+ // SessionIDKey is the attribute Key conforming to the "session.id" semantic
+ // conventions. It represents a unique id to identify a session.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 00112233-4455-6677-8899-aabbccddeeff
+ SessionIDKey = attribute.Key("session.id")
+
+ // SessionPreviousIDKey is the attribute Key conforming to the
+ // "session.previous_id" semantic conventions. It represents the previous
+ // `session.id` for this user, when known.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 00112233-4455-6677-8899-aabbccddeeff
+ SessionPreviousIDKey = attribute.Key("session.previous_id")
+)
+
+// SessionID returns an attribute KeyValue conforming to the "session.id"
+// semantic conventions. It represents a unique id to identify a session.
+func SessionID(val string) attribute.KeyValue {
+ return SessionIDKey.String(val)
+}
+
+// SessionPreviousID returns an attribute KeyValue conforming to the
+// "session.previous_id" semantic conventions. It represents the previous
+// `session.id` for this user, when known.
+func SessionPreviousID(val string) attribute.KeyValue {
+ return SessionPreviousIDKey.String(val)
+}
+
+// Namespace: signalr
+const (
+ // SignalRConnectionStatusKey is the attribute Key conforming to the
+ // "signalr.connection.status" semantic conventions. It represents the signalR
+ // HTTP connection closure status.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "app_shutdown", "timeout"
+ SignalRConnectionStatusKey = attribute.Key("signalr.connection.status")
+
+ // SignalRTransportKey is the attribute Key conforming to the
+ // "signalr.transport" semantic conventions. It represents the
+ // [SignalR transport type].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "web_sockets", "long_polling"
+ //
+ // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md
+ SignalRTransportKey = attribute.Key("signalr.transport")
+)
+
+// Enum values for signalr.connection.status
+var (
+ // The connection was closed normally.
+ // Stability: stable
+ SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure")
+ // The connection was closed due to a timeout.
+ // Stability: stable
+ SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout")
+ // The connection was closed because the app is shutting down.
+ // Stability: stable
+ SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown")
+)
+
+// Enum values for signalr.transport
+var (
+ // ServerSentEvents protocol
+ // Stability: stable
+ SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events")
+ // LongPolling protocol
+ // Stability: stable
+ SignalRTransportLongPolling = SignalRTransportKey.String("long_polling")
+ // WebSockets protocol
+ // Stability: stable
+ SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets")
+)
+
+// Namespace: source
+const (
+ // SourceAddressKey is the attribute Key conforming to the "source.address"
+ // semantic conventions. It represents the source address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix domain
+ // socket name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "source.example.com", "10.1.2.80", "/tmp/my.sock"
+ // Note: When observed from the destination side, and when communicating through
+ // an intermediary, `source.address` SHOULD represent the source address behind
+ // any intermediaries, for example proxies, if it's available.
+ SourceAddressKey = attribute.Key("source.address")
+
+ // SourcePortKey is the attribute Key conforming to the "source.port" semantic
+ // conventions. It represents the source port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 3389, 2888
+ SourcePortKey = attribute.Key("source.port")
+)
+
+// SourceAddress returns an attribute KeyValue conforming to the "source.address"
+// semantic conventions. It represents the source address - domain name if
+// available without reverse DNS lookup; otherwise, IP address or Unix domain
+// socket name.
+func SourceAddress(val string) attribute.KeyValue {
+ return SourceAddressKey.String(val)
+}
+
+// SourcePort returns an attribute KeyValue conforming to the "source.port"
+// semantic conventions. It represents the source port number.
+func SourcePort(val int) attribute.KeyValue {
+ return SourcePortKey.Int(val)
+}
+
+// Namespace: system
+const (
+ // SystemDeviceKey is the attribute Key conforming to the "system.device"
+ // semantic conventions. It represents the device identifier.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "(identifier)"
+ SystemDeviceKey = attribute.Key("system.device")
+
+ // SystemFilesystemModeKey is the attribute Key conforming to the
+ // "system.filesystem.mode" semantic conventions. It represents the filesystem
+ // mode.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "rw, ro"
+ SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
+
+ // SystemFilesystemMountpointKey is the attribute Key conforming to the
+ // "system.filesystem.mountpoint" semantic conventions. It represents the
+ // filesystem mount path.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/mnt/data"
+ SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
+
+ // SystemFilesystemStateKey is the attribute Key conforming to the
+ // "system.filesystem.state" semantic conventions. It represents the filesystem
+ // state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "used"
+ SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
+
+ // SystemFilesystemTypeKey is the attribute Key conforming to the
+ // "system.filesystem.type" semantic conventions. It represents the filesystem
+ // type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "ext4"
+ SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
+
+ // SystemMemoryLinuxHugepagesStateKey is the attribute Key conforming to the
+ // "system.memory.linux.hugepages.state" semantic conventions. It represents the
+ // Linux HugePages memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free", "used"
+ SystemMemoryLinuxHugepagesStateKey = attribute.Key("system.memory.linux.hugepages.state")
+
+ // SystemMemoryLinuxSlabStateKey is the attribute Key conforming to the
+ // "system.memory.linux.slab.state" semantic conventions. It represents the
+ // Linux Slab memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "reclaimable", "unreclaimable"
+ SystemMemoryLinuxSlabStateKey = attribute.Key("system.memory.linux.slab.state")
+
+ // SystemMemoryStateKey is the attribute Key conforming to the
+ // "system.memory.state" semantic conventions. It represents the memory state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free", "cached"
+ SystemMemoryStateKey = attribute.Key("system.memory.state")
+
+ // SystemPagingDirectionKey is the attribute Key conforming to the
+ // "system.paging.direction" semantic conventions. It represents the paging
+ // access direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "in"
+ SystemPagingDirectionKey = attribute.Key("system.paging.direction")
+
+ // SystemPagingFaultTypeKey is the attribute Key conforming to the
+ // "system.paging.fault.type" semantic conventions. It represents the paging
+ // fault type.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "minor"
+ SystemPagingFaultTypeKey = attribute.Key("system.paging.fault.type")
+
+ // SystemPagingStateKey is the attribute Key conforming to the
+ // "system.paging.state" semantic conventions. It represents the memory paging
+ // state.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "free"
+ SystemPagingStateKey = attribute.Key("system.paging.state")
+)
+
+// SystemDevice returns an attribute KeyValue conforming to the "system.device"
+// semantic conventions. It represents the device identifier.
+func SystemDevice(val string) attribute.KeyValue {
+ return SystemDeviceKey.String(val)
+}
+
+// SystemFilesystemMode returns an attribute KeyValue conforming to the
+// "system.filesystem.mode" semantic conventions. It represents the filesystem
+// mode.
+func SystemFilesystemMode(val string) attribute.KeyValue {
+ return SystemFilesystemModeKey.String(val)
+}
+
+// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the
+// "system.filesystem.mountpoint" semantic conventions. It represents the
+// filesystem mount path.
+func SystemFilesystemMountpoint(val string) attribute.KeyValue {
+ return SystemFilesystemMountpointKey.String(val)
+}
+
+// Enum values for system.filesystem.state
+var (
+ // used
+ // Stability: development
+ SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
+ // free
+ // Stability: development
+ SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
+ // reserved
+ // Stability: development
+ SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
+)
+
+// Enum values for system.filesystem.type
+var (
+ // fat32
+ // Stability: development
+ SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
+ // exfat
+ // Stability: development
+ SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
+ // ntfs
+ // Stability: development
+ SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
+ // refs
+ // Stability: development
+ SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
+ // hfsplus
+ // Stability: development
+ SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
+ // ext4
+ // Stability: development
+ SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
+)
+
+// Enum values for system.memory.linux.hugepages.state
+var (
+ // free
+ // Stability: development
+ SystemMemoryLinuxHugepagesStateFree = SystemMemoryLinuxHugepagesStateKey.String("free")
+ // used
+ // Stability: development
+ SystemMemoryLinuxHugepagesStateUsed = SystemMemoryLinuxHugepagesStateKey.String("used")
+)
+
+// Enum values for system.memory.linux.slab.state
+var (
+ // reclaimable
+ // Stability: development
+ SystemMemoryLinuxSlabStateReclaimable = SystemMemoryLinuxSlabStateKey.String("reclaimable")
+ // unreclaimable
+ // Stability: development
+ SystemMemoryLinuxSlabStateUnreclaimable = SystemMemoryLinuxSlabStateKey.String("unreclaimable")
+)
+
+// Enum values for system.memory.state
+var (
+ // Actual used virtual memory in bytes.
+ // Stability: development
+ SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
+ // free
+ // Stability: development
+ SystemMemoryStateFree = SystemMemoryStateKey.String("free")
+ // buffers
+ // Stability: development
+ SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
+ // cached
+ // Stability: development
+ SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
+)
+
+// Enum values for system.paging.direction
+var (
+ // in
+ // Stability: development
+ SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
+ // out
+ // Stability: development
+ SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
+)
+
+// Enum values for system.paging.fault.type
+var (
+ // major
+ // Stability: release_candidate
+ SystemPagingFaultTypeMajor = SystemPagingFaultTypeKey.String("major")
+ // minor
+ // Stability: release_candidate
+ SystemPagingFaultTypeMinor = SystemPagingFaultTypeKey.String("minor")
+)
+
+// Enum values for system.paging.state
+var (
+ // used
+ // Stability: development
+ SystemPagingStateUsed = SystemPagingStateKey.String("used")
+ // free
+ // Stability: development
+ SystemPagingStateFree = SystemPagingStateKey.String("free")
+)
+
+// Namespace: telemetry
+const (
+ // TelemetryDistroNameKey is the attribute Key conforming to the
+ // "telemetry.distro.name" semantic conventions. It represents the name of the
+ // auto instrumentation agent or distribution, if used.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "parts-unlimited-java"
+ // Note: Official auto instrumentation agents and distributions SHOULD set the
+ // `telemetry.distro.name` attribute to
+ // a string starting with `opentelemetry-`, e.g.
+ // `opentelemetry-java-instrumentation`.
+ TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
+
+ // TelemetryDistroVersionKey is the attribute Key conforming to the
+ // "telemetry.distro.version" semantic conventions. It represents the version
+ // string of the auto instrumentation agent or distribution, if used.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.2.3"
+ TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
+
+ // TelemetrySDKLanguageKey is the attribute Key conforming to the
+ // "telemetry.sdk.language" semantic conventions. It represents the language of
+ // the telemetry SDK.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples:
+ TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
+
+ // TelemetrySDKNameKey is the attribute Key conforming to the
+ // "telemetry.sdk.name" semantic conventions. It represents the name of the
+ // telemetry SDK as defined above.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "opentelemetry"
+ // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to
+ // `opentelemetry`.
+ // If another SDK, like a fork or a vendor-provided implementation, is used,
+ // this SDK MUST set the
+ // `telemetry.sdk.name` attribute to the fully-qualified class or module name of
+ // this SDK's main entry point
+ // or another suitable identifier depending on the language.
+ // The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
+ // All custom identifiers SHOULD be stable across different versions of an
+ // implementation.
+ TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
+
+ // TelemetrySDKVersionKey is the attribute Key conforming to the
+ // "telemetry.sdk.version" semantic conventions. It represents the version
+ // string of the telemetry SDK.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "1.2.3"
+ TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
+)
+
+// TelemetryDistroName returns an attribute KeyValue conforming to the
+// "telemetry.distro.name" semantic conventions. It represents the name of the
+// auto instrumentation agent or distribution, if used.
+func TelemetryDistroName(val string) attribute.KeyValue {
+ return TelemetryDistroNameKey.String(val)
+}
+
+// TelemetryDistroVersion returns an attribute KeyValue conforming to the
+// "telemetry.distro.version" semantic conventions. It represents the version
+// string of the auto instrumentation agent or distribution, if used.
+func TelemetryDistroVersion(val string) attribute.KeyValue {
+ return TelemetryDistroVersionKey.String(val)
+}
+
+// TelemetrySDKName returns an attribute KeyValue conforming to the
+// "telemetry.sdk.name" semantic conventions. It represents the name of the
+// telemetry SDK as defined above.
+func TelemetrySDKName(val string) attribute.KeyValue {
+ return TelemetrySDKNameKey.String(val)
+}
+
+// TelemetrySDKVersion returns an attribute KeyValue conforming to the
+// "telemetry.sdk.version" semantic conventions. It represents the version string
+// of the telemetry SDK.
+func TelemetrySDKVersion(val string) attribute.KeyValue {
+ return TelemetrySDKVersionKey.String(val)
+}
+
+// Enum values for telemetry.sdk.language
+var (
+ // cpp
+ // Stability: stable
+ TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
+ // dotnet
+ // Stability: stable
+ TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
+ // erlang
+ // Stability: stable
+ TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
+ // go
+ // Stability: stable
+ TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
+ // java
+ // Stability: stable
+ TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
+ // kotlin
+ // Stability: stable
+ TelemetrySDKLanguageKotlin = TelemetrySDKLanguageKey.String("kotlin")
+ // nodejs
+ // Stability: stable
+ TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
+ // php
+ // Stability: stable
+ TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
+ // python
+ // Stability: stable
+ TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
+ // ruby
+ // Stability: stable
+ TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
+ // rust
+ // Stability: stable
+ TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
+ // swift
+ // Stability: stable
+ TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
+ // webjs
+ // Stability: stable
+ TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs")
+)
+
+// Namespace: test
+const (
+ // TestCaseNameKey is the attribute Key conforming to the "test.case.name"
+ // semantic conventions. It represents the fully qualified human readable name
+ // of the [test case].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "org.example.TestCase1.test1", "example/tests/TestCase1.test1",
+ // "ExampleTestCase1_test1"
+ //
+ // [test case]: https://wikipedia.org/wiki/Test_case
+ TestCaseNameKey = attribute.Key("test.case.name")
+
+ // TestCaseResultStatusKey is the attribute Key conforming to the
+ // "test.case.result.status" semantic conventions. It represents the status of
+ // the actual test case result from test execution.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "pass", "fail"
+ TestCaseResultStatusKey = attribute.Key("test.case.result.status")
+
+ // TestSuiteNameKey is the attribute Key conforming to the "test.suite.name"
+ // semantic conventions. It represents the human readable name of a [test suite]
+ // .
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TestSuite1"
+ //
+ // [test suite]: https://wikipedia.org/wiki/Test_suite
+ TestSuiteNameKey = attribute.Key("test.suite.name")
+
+ // TestSuiteRunStatusKey is the attribute Key conforming to the
+ // "test.suite.run.status" semantic conventions. It represents the status of the
+ // test suite run.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "success", "failure", "skipped", "aborted", "timed_out",
+ // "in_progress"
+ TestSuiteRunStatusKey = attribute.Key("test.suite.run.status")
+)
+
+// TestCaseName returns an attribute KeyValue conforming to the "test.case.name"
+// semantic conventions. It represents the fully qualified human readable name of
+// the [test case].
+//
+// [test case]: https://wikipedia.org/wiki/Test_case
+func TestCaseName(val string) attribute.KeyValue {
+ return TestCaseNameKey.String(val)
+}
+
+// TestSuiteName returns an attribute KeyValue conforming to the
+// "test.suite.name" semantic conventions. It represents the human readable name
+// of a [test suite].
+//
+// [test suite]: https://wikipedia.org/wiki/Test_suite
+func TestSuiteName(val string) attribute.KeyValue {
+ return TestSuiteNameKey.String(val)
+}
+
+// Enum values for test.case.result.status
+var (
+ // pass
+ // Stability: development
+ TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass")
+ // fail
+ // Stability: development
+ TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail")
+)
+
+// Enum values for test.suite.run.status
+var (
+ // success
+ // Stability: development
+ TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success")
+ // failure
+ // Stability: development
+ TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure")
+ // skipped
+ // Stability: development
+ TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped")
+ // aborted
+ // Stability: development
+ TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted")
+ // timed_out
+ // Stability: development
+ TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out")
+ // in_progress
+ // Stability: development
+ TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress")
+)
+
+// Namespace: thread
+const (
+ // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
+ // conventions. It represents the current "managed" thread ID (as opposed to OS
+ // thread ID).
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Note:
+ // Examples of where the value can be extracted from:
+ //
+ // | Language or platform | Source |
+ // | --- | --- |
+ // | JVM | `Thread.currentThread().threadId()` |
+ // | .NET | `Thread.CurrentThread.ManagedThreadId` |
+ // | Python | `threading.current_thread().ident` |
+ // | Ruby | `Thread.current.object_id` |
+ // | C++ | `std::this_thread::get_id()` |
+ // | Erlang | `erlang:self()` |
+ ThreadIDKey = attribute.Key("thread.id")
+
+ // ThreadNameKey is the attribute Key conforming to the "thread.name" semantic
+ // conventions. It represents the current thread name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: main
+ // Note:
+ // Examples of where the value can be extracted from:
+ //
+ // | Language or platform | Source |
+ // | --- | --- |
+ // | JVM | `Thread.currentThread().getName()` |
+ // | .NET | `Thread.CurrentThread.Name` |
+ // | Python | `threading.current_thread().name` |
+ // | Ruby | `Thread.current.name` |
+ // | Erlang | `erlang:process_info(self(), registered_name)` |
+ ThreadNameKey = attribute.Key("thread.name")
+)
+
+// ThreadID returns an attribute KeyValue conforming to the "thread.id" semantic
+// conventions. It represents the current "managed" thread ID (as opposed to OS
+// thread ID).
+func ThreadID(val int) attribute.KeyValue {
+ return ThreadIDKey.Int(val)
+}
+
+// ThreadName returns an attribute KeyValue conforming to the "thread.name"
+// semantic conventions. It represents the current thread name.
+func ThreadName(val string) attribute.KeyValue {
+ return ThreadNameKey.String(val)
+}
+
+// Namespace: tls
+const (
+ // TLSCipherKey is the attribute Key conforming to the "tls.cipher" semantic
+ // conventions. It represents the string indicating the [cipher] used during the
+ // current connection.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
+ // "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
+ // Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions`
+ // of the [registered TLS Cipher Suits].
+ //
+ // [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
+ // [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4
+ TLSCipherKey = attribute.Key("tls.cipher")
+
+ // TLSClientCertificateKey is the attribute Key conforming to the
+ // "tls.client.certificate" semantic conventions. It represents the PEM-encoded
+ // stand-alone certificate offered by the client. This is usually
+ // mutually-exclusive of `client.certificate_chain` since this value also exists
+ // in that list.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII..."
+ TLSClientCertificateKey = attribute.Key("tls.client.certificate")
+
+ // TLSClientCertificateChainKey is the attribute Key conforming to the
+ // "tls.client.certificate_chain" semantic conventions. It represents the array
+ // of PEM-encoded certificates that make up the certificate chain offered by the
+ // client. This is usually mutually-exclusive of `client.certificate` since that
+ // value should be the first certificate in the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII...", "MI..."
+ TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
+
+ // TLSClientHashMd5Key is the attribute Key conforming to the
+ // "tls.client.hash.md5" semantic conventions. It represents the certificate
+ // fingerprint using the MD5 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
+ TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
+
+ // TLSClientHashSha1Key is the attribute Key conforming to the
+ // "tls.client.hash.sha1" semantic conventions. It represents the certificate
+ // fingerprint using the SHA1 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
+ TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
+
+ // TLSClientHashSha256Key is the attribute Key conforming to the
+ // "tls.client.hash.sha256" semantic conventions. It represents the certificate
+ // fingerprint using the SHA256 digest of DER-encoded version of certificate
+ // offered by the client. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
+ TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
+
+ // TLSClientIssuerKey is the attribute Key conforming to the "tls.client.issuer"
+ // semantic conventions. It represents the distinguished name of [subject] of
+ // the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
+ //
+ // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+ TLSClientIssuerKey = attribute.Key("tls.client.issuer")
+
+ // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
+ // semantic conventions. It represents a hash that identifies clients based on
+ // how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "d4e5b18d6b55c71272893221c96ba240"
+ TLSClientJa3Key = attribute.Key("tls.client.ja3")
+
+ // TLSClientNotAfterKey is the attribute Key conforming to the
+ // "tls.client.not_after" semantic conventions. It represents the date/Time
+ // indicating when client certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T00:00:00.000Z"
+ TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
+
+ // TLSClientNotBeforeKey is the attribute Key conforming to the
+ // "tls.client.not_before" semantic conventions. It represents the date/Time
+ // indicating when client certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1970-01-01T00:00:00.000Z"
+ TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
+
+ // TLSClientSubjectKey is the attribute Key conforming to the
+ // "tls.client.subject" semantic conventions. It represents the distinguished
+ // name of subject of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=myclient, OU=Documentation Team, DC=example, DC=com"
+ TLSClientSubjectKey = attribute.Key("tls.client.subject")
+
+ // TLSClientSupportedCiphersKey is the attribute Key conforming to the
+ // "tls.client.supported_ciphers" semantic conventions. It represents the array
+ // of ciphers offered by the client during the client hello.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
+ TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
+
+ // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
+ // conventions. It represents the string indicating the curve used for the given
+ // cipher, when applicable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "secp256r1"
+ TLSCurveKey = attribute.Key("tls.curve")
+
+ // TLSEstablishedKey is the attribute Key conforming to the "tls.established"
+ // semantic conventions. It represents the boolean flag indicating if the TLS
+ // negotiation was successful and transitioned to an encrypted tunnel.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: true
+ TLSEstablishedKey = attribute.Key("tls.established")
+
+ // TLSNextProtocolKey is the attribute Key conforming to the "tls.next_protocol"
+ // semantic conventions. It represents the string indicating the protocol being
+ // tunneled. Per the values in the [IANA registry], this string should be lower
+ // case.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "http/1.1"
+ //
+ // [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+ TLSNextProtocolKey = attribute.Key("tls.next_protocol")
+
+ // TLSProtocolNameKey is the attribute Key conforming to the "tls.protocol.name"
+ // semantic conventions. It represents the normalized lowercase protocol name
+ // parsed from original string of the negotiated [SSL/TLS protocol version].
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ //
+ // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+ TLSProtocolNameKey = attribute.Key("tls.protocol.name")
+
+ // TLSProtocolVersionKey is the attribute Key conforming to the
+ // "tls.protocol.version" semantic conventions. It represents the numeric part
+ // of the version parsed from the original string of the negotiated
+ // [SSL/TLS protocol version].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1.2", "3"
+ //
+ // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+ TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
+
+ // TLSResumedKey is the attribute Key conforming to the "tls.resumed" semantic
+ // conventions. It represents the boolean flag indicating if this TLS connection
+ // was resumed from an existing TLS negotiation.
+ //
+ // Type: boolean
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: true
+ TLSResumedKey = attribute.Key("tls.resumed")
+
+ // TLSServerCertificateKey is the attribute Key conforming to the
+ // "tls.server.certificate" semantic conventions. It represents the PEM-encoded
+ // stand-alone certificate offered by the server. This is usually
+ // mutually-exclusive of `server.certificate_chain` since this value also exists
+ // in that list.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII..."
+ TLSServerCertificateKey = attribute.Key("tls.server.certificate")
+
+ // TLSServerCertificateChainKey is the attribute Key conforming to the
+ // "tls.server.certificate_chain" semantic conventions. It represents the array
+ // of PEM-encoded certificates that make up the certificate chain offered by the
+ // server. This is usually mutually-exclusive of `server.certificate` since that
+ // value should be the first certificate in the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "MII...", "MI..."
+ TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
+
+ // TLSServerHashMd5Key is the attribute Key conforming to the
+ // "tls.server.hash.md5" semantic conventions. It represents the certificate
+ // fingerprint using the MD5 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC"
+ TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
+
+ // TLSServerHashSha1Key is the attribute Key conforming to the
+ // "tls.server.hash.sha1" semantic conventions. It represents the certificate
+ // fingerprint using the SHA1 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A"
+ TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
+
+ // TLSServerHashSha256Key is the attribute Key conforming to the
+ // "tls.server.hash.sha256" semantic conventions. It represents the certificate
+ // fingerprint using the SHA256 digest of DER-encoded version of certificate
+ // offered by the server. For consistency with other hash values, this value
+ // should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0"
+ TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
+
+ // TLSServerIssuerKey is the attribute Key conforming to the "tls.server.issuer"
+ // semantic conventions. It represents the distinguished name of [subject] of
+ // the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com"
+ //
+ // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+ TLSServerIssuerKey = attribute.Key("tls.server.issuer")
+
+ // TLSServerJa3sKey is the attribute Key conforming to the "tls.server.ja3s"
+ // semantic conventions. It represents a hash that identifies servers based on
+ // how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "d4e5b18d6b55c71272893221c96ba240"
+ TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
+
+ // TLSServerNotAfterKey is the attribute Key conforming to the
+ // "tls.server.not_after" semantic conventions. It represents the date/Time
+ // indicating when server certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "2021-01-01T00:00:00.000Z"
+ TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
+
+ // TLSServerNotBeforeKey is the attribute Key conforming to the
+ // "tls.server.not_before" semantic conventions. It represents the date/Time
+ // indicating when server certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "1970-01-01T00:00:00.000Z"
+ TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
+
+ // TLSServerSubjectKey is the attribute Key conforming to the
+ // "tls.server.subject" semantic conventions. It represents the distinguished
+ // name of subject of the x.509 certificate presented by the server.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "CN=myserver, OU=Documentation Team, DC=example, DC=com"
+ TLSServerSubjectKey = attribute.Key("tls.server.subject")
+)
+
+// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
+// semantic conventions. It represents the string indicating the [cipher] used
+// during the current connection.
+//
+// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5
+func TLSCipher(val string) attribute.KeyValue {
+ return TLSCipherKey.String(val)
+}
+
+// TLSClientCertificate returns an attribute KeyValue conforming to the
+// "tls.client.certificate" semantic conventions. It represents the PEM-encoded
+// stand-alone certificate offered by the client. This is usually
+// mutually-exclusive of `client.certificate_chain` since this value also exists
+// in that list.
+func TLSClientCertificate(val string) attribute.KeyValue {
+ return TLSClientCertificateKey.String(val)
+}
+
+// TLSClientCertificateChain returns an attribute KeyValue conforming to the
+// "tls.client.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by the
+// client. This is usually mutually-exclusive of `client.certificate` since that
+// value should be the first certificate in the chain.
+func TLSClientCertificateChain(val ...string) attribute.KeyValue {
+ return TLSClientCertificateChainKey.StringSlice(val)
+}
+
+// TLSClientHashMd5 returns an attribute KeyValue conforming to the
+// "tls.client.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate offered
+// by the client. For consistency with other hash values, this value should be
+// formatted as an uppercase hash.
+func TLSClientHashMd5(val string) attribute.KeyValue {
+ return TLSClientHashMd5Key.String(val)
+}
+
+// TLSClientHashSha1 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha1(val string) attribute.KeyValue {
+ return TLSClientHashSha1Key.String(val)
+}
+
+// TLSClientHashSha256 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha256(val string) attribute.KeyValue {
+ return TLSClientHashSha256Key.String(val)
+}
+
+// TLSClientIssuer returns an attribute KeyValue conforming to the
+// "tls.client.issuer" semantic conventions. It represents the distinguished name
+// of [subject] of the issuer of the x.509 certificate presented by the client.
+//
+// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+func TLSClientIssuer(val string) attribute.KeyValue {
+ return TLSClientIssuerKey.String(val)
+}
+
+// TLSClientJa3 returns an attribute KeyValue conforming to the "tls.client.ja3"
+// semantic conventions. It represents a hash that identifies clients based on
+// how they perform an SSL/TLS handshake.
+func TLSClientJa3(val string) attribute.KeyValue {
+ return TLSClientJa3Key.String(val)
+}
+
+// TLSClientNotAfter returns an attribute KeyValue conforming to the
+// "tls.client.not_after" semantic conventions. It represents the date/Time
+// indicating when client certificate is no longer considered valid.
+func TLSClientNotAfter(val string) attribute.KeyValue {
+ return TLSClientNotAfterKey.String(val)
+}
+
+// TLSClientNotBefore returns an attribute KeyValue conforming to the
+// "tls.client.not_before" semantic conventions. It represents the date/Time
+// indicating when client certificate is first considered valid.
+func TLSClientNotBefore(val string) attribute.KeyValue {
+ return TLSClientNotBeforeKey.String(val)
+}
+
+// TLSClientSubject returns an attribute KeyValue conforming to the
+// "tls.client.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the client.
+func TLSClientSubject(val string) attribute.KeyValue {
+ return TLSClientSubjectKey.String(val)
+}
+
+// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
+// "tls.client.supported_ciphers" semantic conventions. It represents the array
+// of ciphers offered by the client during the client hello.
+func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
+ return TLSClientSupportedCiphersKey.StringSlice(val)
+}
+
+// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" semantic
+// conventions. It represents the string indicating the curve used for the given
+// cipher, when applicable.
+func TLSCurve(val string) attribute.KeyValue {
+ return TLSCurveKey.String(val)
+}
+
+// TLSEstablished returns an attribute KeyValue conforming to the
+// "tls.established" semantic conventions. It represents the boolean flag
+// indicating if the TLS negotiation was successful and transitioned to an
+// encrypted tunnel.
+func TLSEstablished(val bool) attribute.KeyValue {
+ return TLSEstablishedKey.Bool(val)
+}
+
+// TLSNextProtocol returns an attribute KeyValue conforming to the
+// "tls.next_protocol" semantic conventions. It represents the string indicating
+// the protocol being tunneled. Per the values in the [IANA registry], this
+// string should be lower case.
+//
+// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+func TLSNextProtocol(val string) attribute.KeyValue {
+ return TLSNextProtocolKey.String(val)
+}
+
+// TLSProtocolVersion returns an attribute KeyValue conforming to the
+// "tls.protocol.version" semantic conventions. It represents the numeric part of
+// the version parsed from the original string of the negotiated
+// [SSL/TLS protocol version].
+//
+// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values
+func TLSProtocolVersion(val string) attribute.KeyValue {
+ return TLSProtocolVersionKey.String(val)
+}
+
+// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
+// semantic conventions. It represents the boolean flag indicating if this TLS
+// connection was resumed from an existing TLS negotiation.
+func TLSResumed(val bool) attribute.KeyValue {
+ return TLSResumedKey.Bool(val)
+}
+
+// TLSServerCertificate returns an attribute KeyValue conforming to the
+// "tls.server.certificate" semantic conventions. It represents the PEM-encoded
+// stand-alone certificate offered by the server. This is usually
+// mutually-exclusive of `server.certificate_chain` since this value also exists
+// in that list.
+func TLSServerCertificate(val string) attribute.KeyValue {
+ return TLSServerCertificateKey.String(val)
+}
+
+// TLSServerCertificateChain returns an attribute KeyValue conforming to the
+// "tls.server.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by the
+// server. This is usually mutually-exclusive of `server.certificate` since that
+// value should be the first certificate in the chain.
+func TLSServerCertificateChain(val ...string) attribute.KeyValue {
+ return TLSServerCertificateChainKey.StringSlice(val)
+}
+
+// TLSServerHashMd5 returns an attribute KeyValue conforming to the
+// "tls.server.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate offered
+// by the server. For consistency with other hash values, this value should be
+// formatted as an uppercase hash.
+func TLSServerHashMd5(val string) attribute.KeyValue {
+ return TLSServerHashMd5Key.String(val)
+}
+
+// TLSServerHashSha1 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha1(val string) attribute.KeyValue {
+ return TLSServerHashSha1Key.String(val)
+}
+
+// TLSServerHashSha256 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha256(val string) attribute.KeyValue {
+ return TLSServerHashSha256Key.String(val)
+}
+
+// TLSServerIssuer returns an attribute KeyValue conforming to the
+// "tls.server.issuer" semantic conventions. It represents the distinguished name
+// of [subject] of the issuer of the x.509 certificate presented by the client.
+//
+// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
+func TLSServerIssuer(val string) attribute.KeyValue {
+ return TLSServerIssuerKey.String(val)
+}
+
+// TLSServerJa3s returns an attribute KeyValue conforming to the
+// "tls.server.ja3s" semantic conventions. It represents a hash that identifies
+// servers based on how they perform an SSL/TLS handshake.
+func TLSServerJa3s(val string) attribute.KeyValue {
+ return TLSServerJa3sKey.String(val)
+}
+
+// TLSServerNotAfter returns an attribute KeyValue conforming to the
+// "tls.server.not_after" semantic conventions. It represents the date/Time
+// indicating when server certificate is no longer considered valid.
+func TLSServerNotAfter(val string) attribute.KeyValue {
+ return TLSServerNotAfterKey.String(val)
+}
+
+// TLSServerNotBefore returns an attribute KeyValue conforming to the
+// "tls.server.not_before" semantic conventions. It represents the date/Time
+// indicating when server certificate is first considered valid.
+func TLSServerNotBefore(val string) attribute.KeyValue {
+ return TLSServerNotBeforeKey.String(val)
+}
+
+// TLSServerSubject returns an attribute KeyValue conforming to the
+// "tls.server.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the server.
+func TLSServerSubject(val string) attribute.KeyValue {
+ return TLSServerSubjectKey.String(val)
+}
+
+// Enum values for tls.protocol.name
+var (
+ // ssl
+ // Stability: development
+ TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
+ // tls
+ // Stability: development
+ TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
+)
+
+// Namespace: url
+const (
+ // URLDomainKey is the attribute Key conforming to the "url.domain" semantic
+ // conventions. It represents the domain extracted from the `url.full`, such as
+ // "opentelemetry.io".
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "www.foo.bar", "opentelemetry.io", "3.12.167.2",
+ // "[1080:0:0:0:8:800:200C:417A]"
+ // Note: In some cases a URL may refer to an IP and/or port directly, without a
+ // domain name. In this case, the IP address would go to the domain field. If
+ // the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[`
+ // and `]` characters should also be captured in the domain field.
+ //
+ // [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2
+ URLDomainKey = attribute.Key("url.domain")
+
+ // URLExtensionKey is the attribute Key conforming to the "url.extension"
+ // semantic conventions. It represents the file extension extracted from the
+ // `url.full`, excluding the leading dot.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "png", "gz"
+ // Note: The file extension is only set if it exists, as not every url has a
+ // file extension. When the file name has multiple extensions `example.tar.gz`,
+ // only the last one should be captured `gz`, not `tar.gz`.
+ URLExtensionKey = attribute.Key("url.extension")
+
+ // URLFragmentKey is the attribute Key conforming to the "url.fragment" semantic
+ // conventions. It represents the [URI fragment] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "SemConv"
+ //
+ // [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
+ URLFragmentKey = attribute.Key("url.fragment")
+
+ // URLFullKey is the attribute Key conforming to the "url.full" semantic
+ // conventions. It represents the absolute URL describing a network resource
+ // according to [RFC3986].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost"
+ // Note: For network calls, URL usually has
+ // `scheme://host[:port][path][?query][#fragment]` format, where the fragment
+ // is not transmitted over HTTP, but if it is known, it SHOULD be included
+ // nevertheless.
+ //
+ // `url.full` MUST NOT contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`.
+ // In such case username and password SHOULD be redacted and attribute's value
+ // SHOULD be `https://REDACTED:REDACTED@www.example.com/`.
+ //
+ // `url.full` SHOULD capture the absolute URL when it is available (or can be
+ // reconstructed).
+ //
+ // Sensitive content provided in `url.full` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ //
+ // Query string values for the following keys SHOULD be redacted by default and
+ // replaced by the
+ // value `REDACTED`:
+ //
+ // - [`X-Amz-Signature`]
+ // - [`X-Amz-Credential`]
+ // - [`X-Amz-Security-Token`]
+ // - [`sig`]
+ // - [`X-Goog-Signature`]
+ //
+ // This list is subject to change over time.
+ //
+ // Matching of query parameter keys against the sensitive list SHOULD be
+ // case-sensitive.
+ //
+ //
+ // Instrumentation MAY provide a way to override this list via declarative
+ // configuration.
+ // If so, it SHOULD use the `sensitive_query_parameters` property
+ // (an array of case-sensitive strings with minimum items 0) under
+ // `.instrumentation/development.general.sanitization.url`.
+ // This list is a full override of the default sensitive query parameter keys,
+ // it is not a list of keys in addition to the defaults.
+ //
+ // When a query string value is redacted, the query string key SHOULD still be
+ // preserved, e.g.
+ // `https://www.example.com/path?color=blue&sig=REDACTED`.
+ //
+ // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+ // [`X-Amz-Signature`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`X-Amz-Credential`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`X-Amz-Security-Token`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
+ // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
+ URLFullKey = attribute.Key("url.full")
+
+ // URLOriginalKey is the attribute Key conforming to the "url.original" semantic
+ // conventions. It represents the unmodified original URL as seen in the event
+ // source.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv",
+ // "search?q=OpenTelemetry"
+ // Note: In network monitoring, the observed URL may be a full URL, whereas in
+ // access logs, the URL is often just represented as a path. This field is meant
+ // to represent the URL as it was observed, complete or not.
+ // `url.original` might contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`. In such case password and
+ // username SHOULD NOT be redacted and attribute's value SHOULD remain the same.
+ URLOriginalKey = attribute.Key("url.original")
+
+ // URLPathKey is the attribute Key conforming to the "url.path" semantic
+ // conventions. It represents the [URI path] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "/search"
+ // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ // [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
+ URLPathKey = attribute.Key("url.path")
+
+ // URLPortKey is the attribute Key conforming to the "url.port" semantic
+ // conventions. It represents the port extracted from the `url.full`.
+ //
+ // Type: int
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: 443
+ URLPortKey = attribute.Key("url.port")
+
+ // URLQueryKey is the attribute Key conforming to the "url.query" semantic
+ // conventions. It represents the [URI query] component.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "q=OpenTelemetry"
+ // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ //
+ //
+ // Query string values for the following keys SHOULD be redacted by default and
+ // replaced by the value `REDACTED`:
+ //
+ // - [`X-Amz-Signature`]
+ // - [`X-Amz-Credential`]
+ // - [`X-Amz-Security-Token`]
+ // - [`sig`]
+ // - [`X-Goog-Signature`]
+ //
+ // This list is subject to change over time.
+ //
+ // Matching of query parameter keys against the sensitive list SHOULD be
+ // case-sensitive.
+ //
+ // Instrumentation MAY provide a way to override this list via declarative
+ // configuration.
+ // If so, it SHOULD use the `sensitive_query_parameters` property
+ // (an array of case-sensitive strings with minimum items 0) under
+ // `.instrumentation/development.general.sanitization.url`.
+ // This list is a full override of the default sensitive query parameter keys,
+ // it is not a list of keys in addition to the defaults.
+ //
+ // When a query string value is redacted, the query string key SHOULD still be
+ // preserved, e.g.
+ // `q=OpenTelemetry&sig=REDACTED`.
+ //
+ // [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
+ // [`X-Amz-Signature`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`X-Amz-Credential`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`X-Amz-Security-Token`]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-authentication-methods.html
+ // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token
+ // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls
+ URLQueryKey = attribute.Key("url.query")
+
+ // URLRegisteredDomainKey is the attribute Key conforming to the
+ // "url.registered_domain" semantic conventions. It represents the highest
+ // registered url domain, stripped of the subdomain.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "example.com", "foo.co.uk"
+ // Note: This value can be determined precisely with the [public suffix list].
+ // For example, the registered domain for `foo.example.com` is `example.com`.
+ // Trying to approximate this by simply taking the last two labels will not work
+ // well for TLDs such as `co.uk`.
+ //
+ // [public suffix list]: https://publicsuffix.org/
+ URLRegisteredDomainKey = attribute.Key("url.registered_domain")
+
+ // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic
+ // conventions. It represents the [URI scheme] component identifying the used
+ // protocol.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "https", "ftp", "telnet"
+ //
+ // [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+ URLSchemeKey = attribute.Key("url.scheme")
+
+ // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
+ // semantic conventions. It represents the subdomain portion of a fully
+ // qualified domain name includes all of the names except the host name under
+ // the registered_domain. In a partially qualified domain, or if the
+ // qualification level of the full name cannot be determined, subdomain contains
+ // all of the names below the registered domain.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "east", "sub2.sub1"
+ // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the
+ // domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the
+ // subdomain field should contain `sub2.sub1`, with no trailing period.
+ URLSubdomainKey = attribute.Key("url.subdomain")
+
+ // URLTemplateKey is the attribute Key conforming to the "url.template" semantic
+ // conventions. It represents the low-cardinality template of an
+ // [absolute path reference].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "/users/{id}", "/users/:id", "/users?id={id}"
+ //
+ // [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
+ URLTemplateKey = attribute.Key("url.template")
+
+ // URLTopLevelDomainKey is the attribute Key conforming to the
+ // "url.top_level_domain" semantic conventions. It represents the effective top
+ // level domain (eTLD), also known as the domain suffix, is the last part of the
+ // domain name. For example, the top level domain for example.com is `com`.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "com", "co.uk"
+ // Note: This value can be determined precisely with the [public suffix list].
+ //
+ // [public suffix list]: https://publicsuffix.org/
+ URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
+)
+
+// URLDomain returns an attribute KeyValue conforming to the "url.domain"
+// semantic conventions. It represents the domain extracted from the `url.full`,
+// such as "opentelemetry.io".
+func URLDomain(val string) attribute.KeyValue {
+ return URLDomainKey.String(val)
+}
+
+// URLExtension returns an attribute KeyValue conforming to the "url.extension"
+// semantic conventions. It represents the file extension extracted from the
+// `url.full`, excluding the leading dot.
+func URLExtension(val string) attribute.KeyValue {
+ return URLExtensionKey.String(val)
+}
+
+// URLFragment returns an attribute KeyValue conforming to the "url.fragment"
+// semantic conventions. It represents the [URI fragment] component.
+//
+// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
+func URLFragment(val string) attribute.KeyValue {
+ return URLFragmentKey.String(val)
+}
+
+// URLFull returns an attribute KeyValue conforming to the "url.full" semantic
+// conventions. It represents the absolute URL describing a network resource
+// according to [RFC3986].
+//
+// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986
+func URLFull(val string) attribute.KeyValue {
+ return URLFullKey.String(val)
+}
+
+// URLOriginal returns an attribute KeyValue conforming to the "url.original"
+// semantic conventions. It represents the unmodified original URL as seen in the
+// event source.
+func URLOriginal(val string) attribute.KeyValue {
+ return URLOriginalKey.String(val)
+}
+
+// URLPath returns an attribute KeyValue conforming to the "url.path" semantic
+// conventions. It represents the [URI path] component.
+//
+// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3
+func URLPath(val string) attribute.KeyValue {
+ return URLPathKey.String(val)
+}
+
+// URLPort returns an attribute KeyValue conforming to the "url.port" semantic
+// conventions. It represents the port extracted from the `url.full`.
+func URLPort(val int) attribute.KeyValue {
+ return URLPortKey.Int(val)
+}
+
+// URLQuery returns an attribute KeyValue conforming to the "url.query" semantic
+// conventions. It represents the [URI query] component.
+//
+// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4
+func URLQuery(val string) attribute.KeyValue {
+ return URLQueryKey.String(val)
+}
+
+// URLRegisteredDomain returns an attribute KeyValue conforming to the
+// "url.registered_domain" semantic conventions. It represents the highest
+// registered url domain, stripped of the subdomain.
+func URLRegisteredDomain(val string) attribute.KeyValue {
+ return URLRegisteredDomainKey.String(val)
+}
+
+// URLScheme returns an attribute KeyValue conforming to the "url.scheme"
+// semantic conventions. It represents the [URI scheme] component identifying the
+// used protocol.
+//
+// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1
+func URLScheme(val string) attribute.KeyValue {
+ return URLSchemeKey.String(val)
+}
+
+// URLSubdomain returns an attribute KeyValue conforming to the "url.subdomain"
+// semantic conventions. It represents the subdomain portion of a fully qualified
+// domain name includes all of the names except the host name under the
+// registered_domain. In a partially qualified domain, or if the qualification
+// level of the full name cannot be determined, subdomain contains all of the
+// names below the registered domain.
+func URLSubdomain(val string) attribute.KeyValue {
+ return URLSubdomainKey.String(val)
+}
+
+// URLTemplate returns an attribute KeyValue conforming to the "url.template"
+// semantic conventions. It represents the low-cardinality template of an
+// [absolute path reference].
+//
+// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2
+func URLTemplate(val string) attribute.KeyValue {
+ return URLTemplateKey.String(val)
+}
+
+// URLTopLevelDomain returns an attribute KeyValue conforming to the
+// "url.top_level_domain" semantic conventions. It represents the effective top
+// level domain (eTLD), also known as the domain suffix, is the last part of the
+// domain name. For example, the top level domain for example.com is `com`.
+func URLTopLevelDomain(val string) attribute.KeyValue {
+ return URLTopLevelDomainKey.String(val)
+}
+
+// Namespace: user
+const (
+ // UserEmailKey is the attribute Key conforming to the "user.email" semantic
+ // conventions. It represents the user email address.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "a.einstein@example.com"
+ UserEmailKey = attribute.Key("user.email")
+
+ // UserFullNameKey is the attribute Key conforming to the "user.full_name"
+ // semantic conventions. It represents the user's full name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Albert Einstein"
+ UserFullNameKey = attribute.Key("user.full_name")
+
+ // UserHashKey is the attribute Key conforming to the "user.hash" semantic
+ // conventions. It represents the unique user hash to correlate information for
+ // a user in anonymized form.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "364fc68eaf4c8acec74a4e52d7d1feaa"
+ // Note: Useful if `user.id` or `user.name` contain confidential information and
+ // cannot be used.
+ UserHashKey = attribute.Key("user.hash")
+
+ // UserIDKey is the attribute Key conforming to the "user.id" semantic
+ // conventions. It represents the unique identifier of the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "S-1-5-21-202424912787-2692429404-2351956786-1000"
+ UserIDKey = attribute.Key("user.id")
+
+ // UserNameKey is the attribute Key conforming to the "user.name" semantic
+ // conventions. It represents the short name or login/username of the user.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "a.einstein"
+ UserNameKey = attribute.Key("user.name")
+
+ // UserRolesKey is the attribute Key conforming to the "user.roles" semantic
+ // conventions. It represents the array of user roles at the time of the event.
+ //
+ // Type: string[]
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "admin", "reporting_user"
+ UserRolesKey = attribute.Key("user.roles")
+)
+
+// UserEmail returns an attribute KeyValue conforming to the "user.email"
+// semantic conventions. It represents the user email address.
+func UserEmail(val string) attribute.KeyValue {
+ return UserEmailKey.String(val)
+}
+
+// UserFullName returns an attribute KeyValue conforming to the "user.full_name"
+// semantic conventions. It represents the user's full name.
+func UserFullName(val string) attribute.KeyValue {
+ return UserFullNameKey.String(val)
+}
+
+// UserHash returns an attribute KeyValue conforming to the "user.hash" semantic
+// conventions. It represents the unique user hash to correlate information for a
+// user in anonymized form.
+func UserHash(val string) attribute.KeyValue {
+ return UserHashKey.String(val)
+}
+
+// UserID returns an attribute KeyValue conforming to the "user.id" semantic
+// conventions. It represents the unique identifier of the user.
+func UserID(val string) attribute.KeyValue {
+ return UserIDKey.String(val)
+}
+
+// UserName returns an attribute KeyValue conforming to the "user.name" semantic
+// conventions. It represents the short name or login/username of the user.
+func UserName(val string) attribute.KeyValue {
+ return UserNameKey.String(val)
+}
+
+// UserRoles returns an attribute KeyValue conforming to the "user.roles"
+// semantic conventions. It represents the array of user roles at the time of the
+// event.
+func UserRoles(val ...string) attribute.KeyValue {
+ return UserRolesKey.StringSlice(val)
+}
+
+// Namespace: user_agent
+const (
+ // UserAgentNameKey is the attribute Key conforming to the "user_agent.name"
+ // semantic conventions. It represents the name of the user-agent extracted from
+ // original. Usually refers to the browser's name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "Safari", "YourApp"
+ // Note: [Example] of extracting browser's name from original string. In the
+ // case of using a user-agent for non-browser products, such as microservices
+ // with multiple names/versions inside the `user_agent.original`, the most
+ // significant name SHOULD be selected. In such a scenario it should align with
+ // `user_agent.version`
+ //
+ // [Example]: https://uaparser.dev/#demo
+ UserAgentNameKey = attribute.Key("user_agent.name")
+
+ // UserAgentOriginalKey is the attribute Key conforming to the
+ // "user_agent.original" semantic conventions. It represents the value of the
+ // [HTTP User-Agent] header sent by the client.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Stable
+ //
+ // Examples: "CERN-LineMode/2.15 libwww/2.17b3", "Mozilla/5.0 (iPhone; CPU
+ // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
+ // Version/14.1.2 Mobile/15E148 Safari/604.1", "YourApp/1.0.0
+ // grpc-java-okhttp/1.27.2"
+ //
+ // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
+ UserAgentOriginalKey = attribute.Key("user_agent.original")
+
+ // UserAgentOSNameKey is the attribute Key conforming to the
+ // "user_agent.os.name" semantic conventions. It represents the human readable
+ // operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "iOS", "Android", "Ubuntu"
+ // Note: For mapping user agent strings to OS names, libraries such as
+ // [ua-parser] can be utilized.
+ //
+ // [ua-parser]: https://github.com/ua-parser
+ UserAgentOSNameKey = attribute.Key("user_agent.os.name")
+
+ // UserAgentOSVersionKey is the attribute Key conforming to the
+ // "user_agent.os.version" semantic conventions. It represents the version
+ // string of the operating system as defined in [Version Attributes].
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.2.1", "18.04.1"
+ // Note: For mapping user agent strings to OS versions, libraries such as
+ // [ua-parser] can be utilized.
+ //
+ // [Version Attributes]: /docs/resource/README.md#version-attributes
+ // [ua-parser]: https://github.com/ua-parser
+ UserAgentOSVersionKey = attribute.Key("user_agent.os.version")
+
+ // UserAgentSyntheticTypeKey is the attribute Key conforming to the
+ // "user_agent.synthetic.type" semantic conventions. It represents the specifies
+ // the category of synthetic traffic, such as tests or bots.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples:
+ // Note: This attribute MAY be derived from the contents of the
+ // `user_agent.original` attribute. Components that populate the attribute are
+ // responsible for determining what they consider to be synthetic bot or test
+ // traffic. This attribute can either be set for self-identification purposes,
+ // or on telemetry detected to be generated as a result of a synthetic request.
+ // This attribute is useful for distinguishing between genuine client traffic
+ // and synthetic traffic generated by bots or tests.
+ UserAgentSyntheticTypeKey = attribute.Key("user_agent.synthetic.type")
+
+ // UserAgentVersionKey is the attribute Key conforming to the
+ // "user_agent.version" semantic conventions. It represents the version of the
+ // user-agent extracted from original. Usually refers to the browser's version.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "14.1.2", "1.0.0"
+ // Note: [Example] of extracting browser's version from original string. In the
+ // case of using a user-agent for non-browser products, such as microservices
+ // with multiple names/versions inside the `user_agent.original`, the most
+ // significant version SHOULD be selected. In such a scenario it should align
+ // with `user_agent.name`
+ //
+ // [Example]: https://uaparser.dev/#demo
+ UserAgentVersionKey = attribute.Key("user_agent.version")
+)
+
+// UserAgentName returns an attribute KeyValue conforming to the
+// "user_agent.name" semantic conventions. It represents the name of the
+// user-agent extracted from original. Usually refers to the browser's name.
+func UserAgentName(val string) attribute.KeyValue {
+ return UserAgentNameKey.String(val)
+}
+
+// UserAgentOriginal returns an attribute KeyValue conforming to the
+// "user_agent.original" semantic conventions. It represents the value of the
+// [HTTP User-Agent] header sent by the client.
+//
+// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent
+func UserAgentOriginal(val string) attribute.KeyValue {
+ return UserAgentOriginalKey.String(val)
+}
+
+// UserAgentOSName returns an attribute KeyValue conforming to the
+// "user_agent.os.name" semantic conventions. It represents the human readable
+// operating system name.
+func UserAgentOSName(val string) attribute.KeyValue {
+ return UserAgentOSNameKey.String(val)
+}
+
+// UserAgentOSVersion returns an attribute KeyValue conforming to the
+// "user_agent.os.version" semantic conventions. It represents the version string
+// of the operating system as defined in [Version Attributes].
+//
+// [Version Attributes]: /docs/resource/README.md#version-attributes
+func UserAgentOSVersion(val string) attribute.KeyValue {
+ return UserAgentOSVersionKey.String(val)
+}
+
+// UserAgentVersion returns an attribute KeyValue conforming to the
+// "user_agent.version" semantic conventions. It represents the version of the
+// user-agent extracted from original. Usually refers to the browser's version.
+func UserAgentVersion(val string) attribute.KeyValue {
+ return UserAgentVersionKey.String(val)
+}
+
+// Enum values for user_agent.synthetic.type
+var (
+ // Bot source.
+ // Stability: development
+ UserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String("bot")
+ // Synthetic test source.
+ // Stability: development
+ UserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String("test")
+)
+
+// Namespace: vcs
+const (
+ // VCSChangeIDKey is the attribute Key conforming to the "vcs.change.id"
+ // semantic conventions. It represents the ID of the change (pull request/merge
+ // request/changelist) if applicable. This is usually a unique (within
+ // repository) identifier generated by the VCS system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "123"
+ VCSChangeIDKey = attribute.Key("vcs.change.id")
+
+ // VCSChangeStateKey is the attribute Key conforming to the "vcs.change.state"
+ // semantic conventions. It represents the state of the change (pull
+ // request/merge request/changelist).
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "open", "closed", "merged"
+ VCSChangeStateKey = attribute.Key("vcs.change.state")
+
+ // VCSChangeTitleKey is the attribute Key conforming to the "vcs.change.title"
+ // semantic conventions. It represents the human readable title of the change
+ // (pull request/merge request/changelist). This title is often a brief summary
+ // of the change and may get merged in to a ref as the commit summary.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "Fixes broken thing", "feat: add my new feature", "[chore] update
+ // dependency"
+ VCSChangeTitleKey = attribute.Key("vcs.change.title")
+
+ // VCSLineChangeTypeKey is the attribute Key conforming to the
+ // "vcs.line_change.type" semantic conventions. It represents the type of line
+ // change being measured on a branch or change.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "added", "removed"
+ VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type")
+
+ // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name"
+ // semantic conventions. It represents the group owner within the version
+ // control system.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "my-org", "myteam", "business-unit"
+ VCSOwnerNameKey = attribute.Key("vcs.owner.name")
+
+ // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name"
+ // semantic conventions. It represents the name of the version control system
+ // provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "github", "gitlab", "gitea", "bitbucket"
+ VCSProviderNameKey = attribute.Key("vcs.provider.name")
+
+ // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name"
+ // semantic conventions. It represents the name of the [reference] such as
+ // **branch** or **tag** in the repository.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "my-feature-branch", "tag-1-test"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefBaseNameKey = attribute.Key("vcs.ref.base.name")
+
+ // VCSRefBaseRevisionKey is the attribute Key conforming to the
+ // "vcs.ref.base.revision" semantic conventions. It represents the revision,
+ // literally [revised version], The revision most often refers to a commit
+ // object in Git, or a revision number in SVN.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
+ // "main", "123", "HEAD"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits. The
+ // revision can be a full [hash value (see
+ // glossary)],
+ // of the recorded change to a ref within a repository pointing to a
+ // commit [commit] object. It does
+ // not necessarily have to be a hash; it can simply define a [revision
+ // number]
+ // which is an integer that is monotonically increasing. In cases where
+ // it is identical to the `ref.base.name`, it SHOULD still be included.
+ // It is up to the implementer to decide which value to set as the
+ // revision based on the VCS system and situational context.
+ //
+ // [revised version]: https://www.merriam-webster.com/dictionary/revision
+ // [hash value (see
+ // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [commit]: https://git-scm.com/docs/git-commit
+ // [revision
+ // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
+ VCSRefBaseRevisionKey = attribute.Key("vcs.ref.base.revision")
+
+ // VCSRefBaseTypeKey is the attribute Key conforming to the "vcs.ref.base.type"
+ // semantic conventions. It represents the type of the [reference] in the
+ // repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "branch", "tag"
+ // Note: `base` refers to the starting point of a change. For example, `main`
+ // would be the base reference of type branch if you've created a new
+ // reference of type branch from it and created new commits.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefBaseTypeKey = attribute.Key("vcs.ref.base.type")
+
+ // VCSRefHeadNameKey is the attribute Key conforming to the "vcs.ref.head.name"
+ // semantic conventions. It represents the name of the [reference] such as
+ // **branch** or **tag** in the repository.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "my-feature-branch", "tag-1-test"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefHeadNameKey = attribute.Key("vcs.ref.head.name")
+
+ // VCSRefHeadRevisionKey is the attribute Key conforming to the
+ // "vcs.ref.head.revision" semantic conventions. It represents the revision,
+ // literally [revised version], The revision most often refers to a commit
+ // object in Git, or a revision number in SVN.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc",
+ // "main", "123", "HEAD"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.The revision can be a full [hash value (see
+ // glossary)],
+ // of the recorded change to a ref within a repository pointing to a
+ // commit [commit] object. It does
+ // not necessarily have to be a hash; it can simply define a [revision
+ // number]
+ // which is an integer that is monotonically increasing. In cases where
+ // it is identical to the `ref.head.name`, it SHOULD still be included.
+ // It is up to the implementer to decide which value to set as the
+ // revision based on the VCS system and situational context.
+ //
+ // [revised version]: https://www.merriam-webster.com/dictionary/revision
+ // [hash value (see
+ // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf
+ // [commit]: https://git-scm.com/docs/git-commit
+ // [revision
+ // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html
+ VCSRefHeadRevisionKey = attribute.Key("vcs.ref.head.revision")
+
+ // VCSRefHeadTypeKey is the attribute Key conforming to the "vcs.ref.head.type"
+ // semantic conventions. It represents the type of the [reference] in the
+ // repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "branch", "tag"
+ // Note: `head` refers to where you are right now; the current reference at a
+ // given time.
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefHeadTypeKey = attribute.Key("vcs.ref.head.type")
+
+ // VCSRefTypeKey is the attribute Key conforming to the "vcs.ref.type" semantic
+ // conventions. It represents the type of the [reference] in the repository.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "branch", "tag"
+ //
+ // [reference]: https://git-scm.com/docs/gitglossary#def_ref
+ VCSRefTypeKey = attribute.Key("vcs.ref.type")
+
+ // VCSRepositoryNameKey is the attribute Key conforming to the
+ // "vcs.repository.name" semantic conventions. It represents the human readable
+ // name of the repository. It SHOULD NOT include any additional identifier like
+ // Group/SubGroup in GitLab or organization in GitHub.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "semantic-conventions", "my-cool-repo"
+ // Note: Due to it only being the name, it can clash with forks of the same
+ // repository if collecting telemetry across multiple orgs or groups in
+ // the same backends.
+ VCSRepositoryNameKey = attribute.Key("vcs.repository.name")
+
+ // VCSRepositoryURLFullKey is the attribute Key conforming to the
+ // "vcs.repository.url.full" semantic conventions. It represents the
+ // [canonical URL] of the repository providing the complete HTTP(S) address in
+ // order to locate and identify the repository through a browser.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples:
+ // "https://github.com/opentelemetry/open-telemetry-collector-contrib",
+ // "https://gitlab.com/my-org/my-project/my-projects-project/repo"
+ // Note: In Git Version Control Systems, the canonical URL SHOULD NOT include
+ // the `.git` extension.
+ //
+ // [canonical URL]: https://support.google.com/webmasters/answer/10347851
+ VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full")
+
+ // VCSRevisionDeltaDirectionKey is the attribute Key conforming to the
+ // "vcs.revision_delta.direction" semantic conventions. It represents the type
+ // of revision comparison.
+ //
+ // Type: Enum
+ // RequirementLevel: Recommended
+ // Stability: Release_Candidate
+ //
+ // Examples: "ahead", "behind"
+ VCSRevisionDeltaDirectionKey = attribute.Key("vcs.revision_delta.direction")
+)
+
+// VCSChangeID returns an attribute KeyValue conforming to the "vcs.change.id"
+// semantic conventions. It represents the ID of the change (pull request/merge
+// request/changelist) if applicable. This is usually a unique (within
+// repository) identifier generated by the VCS system.
+func VCSChangeID(val string) attribute.KeyValue {
+ return VCSChangeIDKey.String(val)
+}
+
+// VCSChangeTitle returns an attribute KeyValue conforming to the
+// "vcs.change.title" semantic conventions. It represents the human readable
+// title of the change (pull request/merge request/changelist). This title is
+// often a brief summary of the change and may get merged in to a ref as the
+// commit summary.
+func VCSChangeTitle(val string) attribute.KeyValue {
+ return VCSChangeTitleKey.String(val)
+}
+
+// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name"
+// semantic conventions. It represents the group owner within the version control
+// system.
+func VCSOwnerName(val string) attribute.KeyValue {
+ return VCSOwnerNameKey.String(val)
+}
+
+// VCSRefBaseName returns an attribute KeyValue conforming to the
+// "vcs.ref.base.name" semantic conventions. It represents the name of the
+// [reference] such as **branch** or **tag** in the repository.
+//
+// [reference]: https://git-scm.com/docs/gitglossary#def_ref
+func VCSRefBaseName(val string) attribute.KeyValue {
+ return VCSRefBaseNameKey.String(val)
+}
+
+// VCSRefBaseRevision returns an attribute KeyValue conforming to the
+// "vcs.ref.base.revision" semantic conventions. It represents the revision,
+// literally [revised version], The revision most often refers to a commit object
+// in Git, or a revision number in SVN.
+//
+// [revised version]: https://www.merriam-webster.com/dictionary/revision
+func VCSRefBaseRevision(val string) attribute.KeyValue {
+ return VCSRefBaseRevisionKey.String(val)
+}
+
+// VCSRefHeadName returns an attribute KeyValue conforming to the
+// "vcs.ref.head.name" semantic conventions. It represents the name of the
+// [reference] such as **branch** or **tag** in the repository.
+//
+// [reference]: https://git-scm.com/docs/gitglossary#def_ref
+func VCSRefHeadName(val string) attribute.KeyValue {
+ return VCSRefHeadNameKey.String(val)
+}
+
+// VCSRefHeadRevision returns an attribute KeyValue conforming to the
+// "vcs.ref.head.revision" semantic conventions. It represents the revision,
+// literally [revised version], The revision most often refers to a commit object
+// in Git, or a revision number in SVN.
+//
+// [revised version]: https://www.merriam-webster.com/dictionary/revision
+func VCSRefHeadRevision(val string) attribute.KeyValue {
+ return VCSRefHeadRevisionKey.String(val)
+}
+
+// VCSRepositoryName returns an attribute KeyValue conforming to the
+// "vcs.repository.name" semantic conventions. It represents the human readable
+// name of the repository. It SHOULD NOT include any additional identifier like
+// Group/SubGroup in GitLab or organization in GitHub.
+func VCSRepositoryName(val string) attribute.KeyValue {
+ return VCSRepositoryNameKey.String(val)
+}
+
+// VCSRepositoryURLFull returns an attribute KeyValue conforming to the
+// "vcs.repository.url.full" semantic conventions. It represents the
+// [canonical URL] of the repository providing the complete HTTP(S) address in
+// order to locate and identify the repository through a browser.
+//
+// [canonical URL]: https://support.google.com/webmasters/answer/10347851
+func VCSRepositoryURLFull(val string) attribute.KeyValue {
+ return VCSRepositoryURLFullKey.String(val)
+}
+
+// Enum values for vcs.change.state
+var (
+ // Open means the change is currently active and under review. It hasn't been
+ // merged into the target branch yet, and it's still possible to make changes or
+ // add comments.
+ // Stability: release_candidate
+ VCSChangeStateOpen = VCSChangeStateKey.String("open")
+ // WIP (work-in-progress, draft) means the change is still in progress and not
+ // yet ready for a full review. It might still undergo significant changes.
+ // Stability: release_candidate
+ VCSChangeStateWip = VCSChangeStateKey.String("wip")
+ // Closed means the merge request has been closed without merging. This can
+ // happen for various reasons, such as the changes being deemed unnecessary, the
+ // issue being resolved in another way, or the author deciding to withdraw the
+ // request.
+ // Stability: release_candidate
+ VCSChangeStateClosed = VCSChangeStateKey.String("closed")
+ // Merged indicates that the change has been successfully integrated into the
+ // target codebase.
+ // Stability: release_candidate
+ VCSChangeStateMerged = VCSChangeStateKey.String("merged")
+)
+
+// Enum values for vcs.line_change.type
+var (
+ // How many lines were added.
+ // Stability: release_candidate
+ VCSLineChangeTypeAdded = VCSLineChangeTypeKey.String("added")
+ // How many lines were removed.
+ // Stability: release_candidate
+ VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed")
+)
+
+// Enum values for vcs.provider.name
+var (
+ // [GitHub]
+ // Stability: release_candidate
+ //
+ // [GitHub]: https://github.com
+ VCSProviderNameGithub = VCSProviderNameKey.String("github")
+ // [GitLab]
+ // Stability: release_candidate
+ //
+ // [GitLab]: https://gitlab.com
+ VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab")
+ // [Gitea]
+ // Stability: release_candidate
+ //
+ // [Gitea]: https://gitea.io
+ VCSProviderNameGitea = VCSProviderNameKey.String("gitea")
+ // [Bitbucket]
+ // Stability: release_candidate
+ //
+ // [Bitbucket]: https://bitbucket.org
+ VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket")
+)
+
+// Enum values for vcs.ref.base.type
+var (
+ // [branch]
+ // Stability: release_candidate
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefBaseTypeBranch = VCSRefBaseTypeKey.String("branch")
+ // [tag]
+ // Stability: release_candidate
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefBaseTypeTag = VCSRefBaseTypeKey.String("tag")
+)
+
+// Enum values for vcs.ref.head.type
+var (
+ // [branch]
+ // Stability: release_candidate
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefHeadTypeBranch = VCSRefHeadTypeKey.String("branch")
+ // [tag]
+ // Stability: release_candidate
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefHeadTypeTag = VCSRefHeadTypeKey.String("tag")
+)
+
+// Enum values for vcs.ref.type
+var (
+ // [branch]
+ // Stability: release_candidate
+ //
+ // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch
+ VCSRefTypeBranch = VCSRefTypeKey.String("branch")
+ // [tag]
+ // Stability: release_candidate
+ //
+ // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag
+ VCSRefTypeTag = VCSRefTypeKey.String("tag")
+)
+
+// Enum values for vcs.revision_delta.direction
+var (
+ // How many revisions the change is behind the target ref.
+ // Stability: release_candidate
+ VCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String("behind")
+ // How many revisions the change is ahead of the target ref.
+ // Stability: release_candidate
+ VCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String("ahead")
+)
+
+// Namespace: webengine
+const (
+ // WebEngineDescriptionKey is the attribute Key conforming to the
+ // "webengine.description" semantic conventions. It represents the additional
+ // description of the web engine (e.g. detailed version and edition
+ // information).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
+ // 2.2.2.Final"
+ WebEngineDescriptionKey = attribute.Key("webengine.description")
+
+ // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
+ // semantic conventions. It represents the name of the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "WildFly"
+ WebEngineNameKey = attribute.Key("webengine.name")
+
+ // WebEngineVersionKey is the attribute Key conforming to the
+ // "webengine.version" semantic conventions. It represents the version of the
+ // web engine.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "21.0.0"
+ WebEngineVersionKey = attribute.Key("webengine.version")
+)
+
+// WebEngineDescription returns an attribute KeyValue conforming to the
+// "webengine.description" semantic conventions. It represents the additional
+// description of the web engine (e.g. detailed version and edition information).
+func WebEngineDescription(val string) attribute.KeyValue {
+ return WebEngineDescriptionKey.String(val)
+}
+
+// WebEngineName returns an attribute KeyValue conforming to the "webengine.name"
+// semantic conventions. It represents the name of the web engine.
+func WebEngineName(val string) attribute.KeyValue {
+ return WebEngineNameKey.String(val)
+}
+
+// WebEngineVersion returns an attribute KeyValue conforming to the
+// "webengine.version" semantic conventions. It represents the version of the web
+// engine.
+func WebEngineVersion(val string) attribute.KeyValue {
+ return WebEngineVersionKey.String(val)
+}
+
+// Namespace: zos
+const (
+ // ZOSSmfIDKey is the attribute Key conforming to the "zos.smf.id" semantic
+ // conventions. It represents the System Management Facility (SMF) Identifier
+ // uniquely identified a z/OS system within a SYSPLEX or mainframe environment
+ // and is used for system and performance analysis.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "SYS1"
+ ZOSSmfIDKey = attribute.Key("zos.smf.id")
+
+ // ZOSSysplexNameKey is the attribute Key conforming to the "zos.sysplex.name"
+ // semantic conventions. It represents the name of the SYSPLEX to which the z/OS
+ // system belongs too.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: Development
+ //
+ // Examples: "SYSPLEX1"
+ ZOSSysplexNameKey = attribute.Key("zos.sysplex.name")
+)
+
+// ZOSSmfID returns an attribute KeyValue conforming to the "zos.smf.id" semantic
+// conventions. It represents the System Management Facility (SMF) Identifier
+// uniquely identified a z/OS system within a SYSPLEX or mainframe environment
+// and is used for system and performance analysis.
+func ZOSSmfID(val string) attribute.KeyValue {
+ return ZOSSmfIDKey.String(val)
+}
+
+// ZOSSysplexName returns an attribute KeyValue conforming to the
+// "zos.sysplex.name" semantic conventions. It represents the name of the SYSPLEX
+// to which the z/OS system belongs too.
+func ZOSSysplexName(val string) attribute.KeyValue {
+ return ZOSSysplexNameKey.String(val)
+}
\ No newline at end of file
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/doc.go
new file mode 100644
index 000000000000..aadce15c02b5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/doc.go
@@ -0,0 +1,11 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package semconv implements OpenTelemetry semantic conventions.
+//
+// OpenTelemetry semantic conventions are agreed standardized naming
+// patterns for OpenTelemetry things. This package represents the v1.43.0
+// version of the OpenTelemetry semantic conventions.
+package semconv
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/error_type.go
new file mode 100644
index 000000000000..5d8eff2229ab
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/error_type.go
@@ -0,0 +1,83 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv
+
+import (
+ "errors"
+ "fmt"
+ "reflect"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+// ErrorType returns an [attribute.KeyValue] identifying the error type of err.
+//
+// If err is nil, the returned attribute has the default value
+// [ErrorTypeOther].
+//
+// If err or one of the errors in its chain has the method
+//
+// ErrorType() string
+//
+// the returned attribute has that method's return value. If multiple errors in
+// the chain implement this method, the value from the first match found by
+// [errors.As] is used. Otherwise, the returned attribute has a value derived
+// from the concrete type of err after unwrapping any wrappers created with
+// [fmt.Errorf].
+//
+// The key of the returned attribute is [ErrorTypeKey].
+func ErrorType(err error) attribute.KeyValue {
+ if err == nil {
+ return ErrorTypeOther
+ }
+
+ return ErrorTypeKey.String(errorType(err))
+}
+
+func errorType(err error) string {
+ var s string
+ if et, ok := err.(interface{ ErrorType() string }); ok {
+ // Fast path: check the top-level error first.
+ s = et.ErrorType()
+ } else {
+ // Fallback: search the error chain for an ErrorType method.
+ var et interface{ ErrorType() string }
+ if errors.As(err, &et) {
+ // Prioritize the ErrorType method if available.
+ s = et.ErrorType()
+ }
+ }
+ if s == "" {
+ // Fallback to reflection if the ErrorType method is not supported or
+ // returns an empty value.
+
+ t := reflect.TypeOf(unwrapFmtWrapped(err))
+ pkg, name := t.PkgPath(), t.Name()
+ if pkg != "" && name != "" {
+ s = pkg + "." + name
+ } else {
+ // The type has no package path or name (predeclared, not-defined,
+ // or alias for a not-defined type).
+ //
+ // This is not guaranteed to be unique, but is a best effort.
+ s = t.String()
+ }
+ }
+ return s
+}
+
+var fmtWrapErrorType = reflect.TypeOf(fmt.Errorf("wrapped: %w", errors.New("err")))
+
+func unwrapFmtWrapped(err error) error {
+ for reflect.TypeOf(err) == fmtWrapErrorType {
+ u := errors.Unwrap(err)
+ if u == nil {
+ return err // When the wrapped error is nil, use the concrete type of the wrapper.
+ }
+ err = u
+ }
+ return err
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/exception.go
new file mode 100644
index 000000000000..6c9b05adbcce
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/exception.go
@@ -0,0 +1,11 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv
+
+const (
+ // ExceptionEventName is the name of the Span event representing an exception.
+ ExceptionEventName = "exception"
+)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/httpconv/metric.go
similarity index 96%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.43.0/httpconv/metric.go
index 1b811e2d72d9..1eb8c9e2a9db 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/httpconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/httpconv/metric.go
@@ -9,16 +9,11 @@ package httpconv
import (
"context"
- "sync"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
-)
-
-var (
- addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}
- recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}
+ "go.opentelemetry.io/otel/semconv/internal/metricpool"
)
// ErrorTypeAttr is an attribute conforming to the error.type semantic
@@ -170,12 +165,8 @@ func (m ClientActiveRequests) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -201,12 +192,8 @@ func (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attrib
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -417,12 +404,8 @@ func (m ClientConnectionDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -448,24 +431,13 @@ func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, se
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
}
-// AttrNetworkPeerAddress returns an optional attribute for the
-// "network.peer.address" semantic convention. It represents the peer address of
-// the network connection - IP address or Unix domain socket name.
-func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue {
- return attribute.String("network.peer.address", val)
-}
-
// AttrNetworkProtocolVersion returns an optional attribute for the
// "network.protocol.version" semantic convention. It represents the actual
// version of the protocol used for network communication.
@@ -473,6 +445,13 @@ func (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute
return attribute.String("network.protocol.version", val)
}
+// AttrNetworkPeerAddress returns an optional attribute for the
+// "network.peer.address" semantic convention. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue {
+ return attribute.String("network.peer.address", val)
+}
+
// AttrURLScheme returns an optional attribute for the "url.scheme" semantic
// convention. It represents the [URI scheme] component identifying the used
// protocol.
@@ -572,12 +551,8 @@ func (m ClientOpenConnections) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -604,24 +579,13 @@ func (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attri
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
}
-// AttrNetworkPeerAddress returns an optional attribute for the
-// "network.peer.address" semantic convention. It represents the peer address of
-// the network connection - IP address or Unix domain socket name.
-func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue {
- return attribute.String("network.peer.address", val)
-}
-
// AttrNetworkProtocolVersion returns an optional attribute for the
// "network.protocol.version" semantic convention. It represents the actual
// version of the protocol used for network communication.
@@ -629,6 +593,13 @@ func (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.Ke
return attribute.String("network.protocol.version", val)
}
+// AttrNetworkPeerAddress returns an optional attribute for the
+// "network.peer.address" semantic convention. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue {
+ return attribute.String("network.peer.address", val)
+}
+
// AttrURLScheme returns an optional attribute for the "url.scheme" semantic
// convention. It represents the [URI scheme] component identifying the used
// protocol.
@@ -718,13 +689,6 @@ func (ClientOpenConnectionsObservable) AttrServerPort(val int) attribute.KeyValu
return attribute.Int("server.port", val)
}
-// AttrNetworkPeerAddress returns an optional attribute for the
-// "network.peer.address" semantic convention. It represents the peer address of
-// the network connection - IP address or Unix domain socket name.
-func (ClientOpenConnectionsObservable) AttrNetworkPeerAddress(val string) attribute.KeyValue {
- return attribute.String("network.peer.address", val)
-}
-
// AttrNetworkProtocolVersion returns an optional attribute for the
// "network.protocol.version" semantic convention. It represents the actual
// version of the protocol used for network communication.
@@ -732,6 +696,13 @@ func (ClientOpenConnectionsObservable) AttrNetworkProtocolVersion(val string) at
return attribute.String("network.protocol.version", val)
}
+// AttrNetworkPeerAddress returns an optional attribute for the
+// "network.peer.address" semantic convention. It represents the peer address of
+// the network connection - IP address or Unix domain socket name.
+func (ClientOpenConnectionsObservable) AttrNetworkPeerAddress(val string) attribute.KeyValue {
+ return attribute.String("network.peer.address", val)
+}
+
// AttrURLScheme returns an optional attribute for the "url.scheme" semantic
// convention. It represents the [URI scheme] component identifying the used
// protocol.
@@ -836,12 +807,8 @@ func (m ClientRequestBodySize) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -875,12 +842,8 @@ func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set att
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Histogram.Record(ctx, val, *o...)
@@ -1025,12 +988,8 @@ func (m ClientRequestDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -1057,12 +1016,8 @@ func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set a
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
@@ -1213,12 +1168,8 @@ func (m ClientResponseBodySize) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -1252,12 +1203,8 @@ func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set at
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Histogram.Record(ctx, val, *o...)
@@ -1398,12 +1345,8 @@ func (m ServerActiveRequests) Add(
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(
*o,
@@ -1429,12 +1372,8 @@ func (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attrib
return
}
- o := addOptPool.Get().(*[]metric.AddOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- addOptPool.Put(o)
- }()
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64UpDownCounter.Add(ctx, incr, *o...)
@@ -1634,12 +1573,8 @@ func (m ServerRequestBodySize) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -1672,12 +1607,8 @@ func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set att
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Histogram.Record(ctx, val, *o...)
@@ -1830,12 +1761,8 @@ func (m ServerRequestDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -1861,12 +1788,8 @@ func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set a
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
@@ -2025,12 +1948,8 @@ func (m ServerResponseBodySize) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -2063,12 +1982,8 @@ func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set at
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Int64Histogram.Record(ctx, val, *o...)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/otelconv/metric.go
new file mode 100644
index 000000000000..9eaf0fd9a2d1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/otelconv/metric.go
@@ -0,0 +1,3197 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package otelconv provides types and functionality for OpenTelemetry semantic
+// conventions in the "otel" namespace.
+package otelconv
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/noop"
+ "go.opentelemetry.io/otel/semconv/internal/metricpool"
+)
+
+// ErrorTypeAttr is an attribute conforming to the error.type semantic
+// conventions. It represents the describes a class of error the operation ended
+// with.
+type ErrorTypeAttr string
+
+var (
+ // ErrorTypeOther is a fallback error value to be used when the instrumentation
+ // doesn't define a custom value.
+ ErrorTypeOther ErrorTypeAttr = "_OTHER"
+)
+
+// ComponentTypeAttr is an attribute conforming to the otel.component.type
+// semantic conventions. It represents a name identifying the type of the
+// OpenTelemetry component.
+type ComponentTypeAttr string
+
+var (
+ // ComponentTypeBatchingSpanProcessor is the builtin SDK batching span
+ // processor.
+ ComponentTypeBatchingSpanProcessor ComponentTypeAttr = "batching_span_processor"
+ // ComponentTypeSimpleSpanProcessor is the builtin SDK simple span processor.
+ ComponentTypeSimpleSpanProcessor ComponentTypeAttr = "simple_span_processor"
+ // ComponentTypeBatchingLogProcessor is the builtin SDK batching log record
+ // processor.
+ ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor"
+ // ComponentTypeSimpleLogProcessor is the builtin SDK simple log record
+ // processor.
+ ComponentTypeSimpleLogProcessor ComponentTypeAttr = "simple_log_processor"
+ // ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with
+ // protobuf serialization.
+ ComponentTypeOtlpGRPCSpanExporter ComponentTypeAttr = "otlp_grpc_span_exporter"
+ // ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with
+ // protobuf serialization.
+ ComponentTypeOtlpHTTPSpanExporter ComponentTypeAttr = "otlp_http_span_exporter"
+ // ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP
+ // with JSON serialization.
+ ComponentTypeOtlpHTTPJSONSpanExporter ComponentTypeAttr = "otlp_http_json_span_exporter"
+ // ComponentTypeZipkinHTTPSpanExporter is the zipkin span exporter over HTTP.
+ ComponentTypeZipkinHTTPSpanExporter ComponentTypeAttr = "zipkin_http_span_exporter"
+ // ComponentTypeOtlpGRPCLogExporter is the OTLP log record exporter over gRPC
+ // with protobuf serialization.
+ ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter"
+ // ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP
+ // with protobuf serialization.
+ ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter"
+ // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over
+ // HTTP with JSON serialization.
+ ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter"
+ // ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting
+ // metric reader.
+ ComponentTypePeriodicMetricReader ComponentTypeAttr = "periodic_metric_reader"
+ // ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC
+ // with protobuf serialization.
+ ComponentTypeOtlpGRPCMetricExporter ComponentTypeAttr = "otlp_grpc_metric_exporter"
+ // ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP
+ // with protobuf serialization.
+ ComponentTypeOtlpHTTPMetricExporter ComponentTypeAttr = "otlp_http_metric_exporter"
+ // ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP
+ // with JSON serialization.
+ ComponentTypeOtlpHTTPJSONMetricExporter ComponentTypeAttr = "otlp_http_json_metric_exporter"
+ // ComponentTypePrometheusHTTPTextMetricExporter is the prometheus metric
+ // exporter over HTTP with the default text-based format.
+ ComponentTypePrometheusHTTPTextMetricExporter ComponentTypeAttr = "prometheus_http_text_metric_exporter"
+)
+
+// SpanParentOriginAttr is an attribute conforming to the otel.span.parent.origin
+// semantic conventions. It represents the determines whether the span has a
+// parent span, and if so, [whether it is a remote parent].
+//
+// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+type SpanParentOriginAttr string
+
+var (
+ // SpanParentOriginNone is the span does not have a parent, it is a root span.
+ SpanParentOriginNone SpanParentOriginAttr = "none"
+ // SpanParentOriginLocal is the span has a parent and the parent's span context
+ // [isRemote()] is false.
+ //
+ // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+ SpanParentOriginLocal SpanParentOriginAttr = "local"
+ // SpanParentOriginRemote is the span has a parent and the parent's span context
+ // [isRemote()] is true.
+ //
+ // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+ SpanParentOriginRemote SpanParentOriginAttr = "remote"
+)
+
+// SpanSamplingResultAttr is an attribute conforming to the
+// otel.span.sampling_result semantic conventions. It represents the result value
+// of the sampler for this span.
+type SpanSamplingResultAttr string
+
+var (
+ // SpanSamplingResultDrop is the span is not sampled and not recording.
+ SpanSamplingResultDrop SpanSamplingResultAttr = "DROP"
+ // SpanSamplingResultRecordOnly is the span is not sampled, but recording.
+ SpanSamplingResultRecordOnly SpanSamplingResultAttr = "RECORD_ONLY"
+ // SpanSamplingResultRecordAndSample is the span is sampled and recording.
+ SpanSamplingResultRecordAndSample SpanSamplingResultAttr = "RECORD_AND_SAMPLE"
+)
+
+// SDKExporterLogExported is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It
+// represents the number of log records for which the export has finished, either
+// successful or failed.
+type SDKExporterLogExported struct {
+ metric.Int64Counter
+}
+
+var newSDKExporterLogExportedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of log records for which the export has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogExported returns a new SDKExporterLogExported instrument.
+func NewSDKExporterLogExported(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKExporterLogExported, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogExported{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogExportedOpts
+ } else {
+ opt = append(opt, newSDKExporterLogExportedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.exporter.log.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogExported{noop.Int64Counter{}}, err
+ }
+ return SDKExporterLogExported{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogExported) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogExported) Name() string {
+ return "otel.sdk.exporter.log.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogExported) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogExported) Description() string {
+ return "The number of log records for which the export has finished, either successful or failed."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with
+// `rejected_log_records`), rejected log records MUST count as failed and only
+// non-rejected log records count as success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each log record MUST be counted exactly once per export operation:
+// intermediate failed attempts that are followed by a retry MUST NOT increment
+// the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterLogExported) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with
+// `rejected_log_records`), rejected log records MUST count as failed and only
+// non-rejected log records count as success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each log record MUST be counted exactly once per export operation:
+// intermediate failed attempts that are followed by a retry MUST NOT increment
+// the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterLogExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterLogExportedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It
+// represents the number of log records for which the export has finished, either
+// successful or failed.
+type SDKExporterLogExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterLogExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of log records for which the export has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogExportedObservable returns a new
+// SDKExporterLogExportedObservable instrument.
+func NewSDKExporterLogExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterLogExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterLogExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.log.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterLogExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogExportedObservable) Name() string {
+ return "otel.sdk.exporter.log.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogExportedObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogExportedObservable) Description() string {
+ return "The number of log records for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterLogExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterLogInflight is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It
+// represents the number of log records which were passed to the exporter, but
+// that have not been exported yet (neither successful, nor failed).
+type SDKExporterLogInflight struct {
+ metric.Int64UpDownCounter
+}
+
+var newSDKExporterLogInflightOpts = []metric.Int64UpDownCounterOption{
+ metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument.
+func NewSDKExporterLogInflight(
+ m metric.Meter,
+ opt ...metric.Int64UpDownCounterOption,
+) (SDKExporterLogInflight, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogInflightOpts
+ } else {
+ opt = append(opt, newSDKExporterLogInflightOpts...)
+ }
+
+ i, err := m.Int64UpDownCounter(
+ "otel.sdk.exporter.log.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err
+ }
+ return SDKExporterLogInflight{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter {
+ return m.Int64UpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogInflight) Name() string {
+ return "otel.sdk.exporter.log.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogInflight) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogInflight) Description() string {
+ return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// Log records are counted as inflight from when they are passed to the exporter
+// until the export operation has concluded.
+// If the exporter retries failed export attempts, log records remain inflight
+// across all retry attempts and any backoff between them.
+func (m SDKExporterLogInflight) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// Log records are counted as inflight from when they are passed to the exporter
+// until the export operation has concluded.
+// If the exporter retries failed export attempts, log records remain inflight
+// across all retry attempts and any backoff between them.
+func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterLogInflightObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It
+// represents the number of log records which were passed to the exporter, but
+// that have not been exported yet (neither successful, nor failed).
+type SDKExporterLogInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterLogInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKExporterLogInflightObservable returns a new
+// SDKExporterLogInflightObservable instrument.
+func NewSDKExporterLogInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterLogInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterLogInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterLogInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterLogInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.log.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterLogInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterLogInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterLogInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterLogInflightObservable) Name() string {
+ return "otel.sdk.exporter.log.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterLogInflightObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterLogInflightObservable) Description() string {
+ return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterLogInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterLogInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterLogInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterLogInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterMetricDataPointExported is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.metric_data_point.exported"
+// semantic conventions. It represents the number of metric data points for which
+// the export has finished, either successful or failed.
+type SDKExporterMetricDataPointExported struct {
+ metric.Int64Counter
+}
+
+var newSDKExporterMetricDataPointExportedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointExported returns a new
+// SDKExporterMetricDataPointExported instrument.
+func NewSDKExporterMetricDataPointExported(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKExporterMetricDataPointExported, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointExportedOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointExportedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.exporter.metric_data_point.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err
+ }
+ return SDKExporterMetricDataPointExported{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointExported) Name() string {
+ return "otel.sdk.exporter.metric_data_point.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointExported) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointExported) Description() string {
+ return "The number of metric data points for which the export has finished, either successful or failed."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with
+// `rejected_data_points`), rejected data points MUST count as failed and only
+// non-rejected data points count as success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each metric data point MUST be counted exactly once per export operation:
+// intermediate failed attempts that are followed by a retry MUST NOT increment
+// the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterMetricDataPointExported) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with
+// `rejected_data_points`), rejected data points MUST count as failed and only
+// non-rejected data points count as success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each metric data point MUST be counted exactly once per export operation:
+// intermediate failed attempts that are followed by a retry MUST NOT increment
+// the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterMetricDataPointExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointExported) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointExported) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterMetricDataPointExportedObservable is an instrument used to record
+// metric values conforming to the "otel.sdk.exporter.metric_data_point.exported"
+// semantic conventions. It represents the number of metric data points for which
+// the export has finished, either successful or failed.
+type SDKExporterMetricDataPointExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterMetricDataPointExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointExportedObservable returns a new
+// SDKExporterMetricDataPointExportedObservable instrument.
+func NewSDKExporterMetricDataPointExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterMetricDataPointExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.metric_data_point.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterMetricDataPointExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointExportedObservable) Name() string {
+ return "otel.sdk.exporter.metric_data_point.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointExportedObservable) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointExportedObservable) Description() string {
+ return "The number of metric data points for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterMetricDataPointExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterMetricDataPointInflight is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.metric_data_point.inflight"
+// semantic conventions. It represents the number of metric data points which
+// were passed to the exporter, but that have not been exported yet (neither
+// successful, nor failed).
+type SDKExporterMetricDataPointInflight struct {
+ metric.Int64UpDownCounter
+}
+
+var newSDKExporterMetricDataPointInflightOpts = []metric.Int64UpDownCounterOption{
+ metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointInflight returns a new
+// SDKExporterMetricDataPointInflight instrument.
+func NewSDKExporterMetricDataPointInflight(
+ m metric.Meter,
+ opt ...metric.Int64UpDownCounterOption,
+) (SDKExporterMetricDataPointInflight, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointInflightOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointInflightOpts...)
+ }
+
+ i, err := m.Int64UpDownCounter(
+ "otel.sdk.exporter.metric_data_point.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err
+ }
+ return SDKExporterMetricDataPointInflight{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter {
+ return m.Int64UpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointInflight) Name() string {
+ return "otel.sdk.exporter.metric_data_point.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointInflight) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointInflight) Description() string {
+ return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// Metric data points are counted as inflight from when they are passed to the
+// exporter until the export operation has concluded.
+// If the exporter retries failed export attempts, metric data points remain
+// inflight across all retry attempts and any backoff between them.
+func (m SDKExporterMetricDataPointInflight) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// Metric data points are counted as inflight from when they are passed to the
+// exporter until the export operation has concluded.
+// If the exporter retries failed export attempts, metric data points remain
+// inflight across all retry attempts and any backoff between them.
+func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointInflight) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointInflight) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterMetricDataPointInflightObservable is an instrument used to record
+// metric values conforming to the "otel.sdk.exporter.metric_data_point.inflight"
+// semantic conventions. It represents the number of metric data points which
+// were passed to the exporter, but that have not been exported yet (neither
+// successful, nor failed).
+type SDKExporterMetricDataPointInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterMetricDataPointInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{data_point}"),
+}
+
+// NewSDKExporterMetricDataPointInflightObservable returns a new
+// SDKExporterMetricDataPointInflightObservable instrument.
+func NewSDKExporterMetricDataPointInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterMetricDataPointInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterMetricDataPointInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterMetricDataPointInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterMetricDataPointInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.metric_data_point.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterMetricDataPointInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterMetricDataPointInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterMetricDataPointInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterMetricDataPointInflightObservable) Name() string {
+ return "otel.sdk.exporter.metric_data_point.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterMetricDataPointInflightObservable) Unit() string {
+ return "{data_point}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterMetricDataPointInflightObservable) Description() string {
+ return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterMetricDataPointInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterMetricDataPointInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterMetricDataPointInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterMetricDataPointInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterOperationDuration is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.operation.duration" semantic conventions.
+// It represents the duration of exporting a batch of telemetry records.
+type SDKExporterOperationDuration struct {
+ metric.Float64Histogram
+}
+
+var newSDKExporterOperationDurationOpts = []metric.Float64HistogramOption{
+ metric.WithDescription("The duration of exporting a batch of telemetry records."),
+ metric.WithUnit("s"),
+}
+
+// NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration
+// instrument.
+func NewSDKExporterOperationDuration(
+ m metric.Meter,
+ opt ...metric.Float64HistogramOption,
+) (SDKExporterOperationDuration, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterOperationDuration{noop.Float64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterOperationDurationOpts
+ } else {
+ opt = append(opt, newSDKExporterOperationDurationOpts...)
+ }
+
+ i, err := m.Float64Histogram(
+ "otel.sdk.exporter.operation.duration",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterOperationDuration{noop.Float64Histogram{}}, err
+ }
+ return SDKExporterOperationDuration{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram {
+ return m.Float64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterOperationDuration) Name() string {
+ return "otel.sdk.exporter.operation.duration"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterOperationDuration) Unit() string {
+ return "s"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterOperationDuration) Description() string {
+ return "The duration of exporting a batch of telemetry records."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// This metric defines successful operations using the full success definitions
+// for [http]
+// and [grpc]. Anything else is defined as an unsuccessful operation. For
+// successful
+// operations, `error.type` MUST NOT be set. For unsuccessful export operations,
+// `error.type` MUST contain a relevant failure cause.
+// If the exporter retries failed export attempts, exactly one observation MUST
+// be recorded per export operation,
+// covering the wall-clock duration from the start of the first attempt through
+// the conclusion of the final attempt (including any backoff between attempts).
+// `error.type` reflects the cause of the final attempt.
+//
+// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1
+// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success
+func (m SDKExporterOperationDuration) Record(
+ ctx context.Context,
+ val float64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// This metric defines successful operations using the full success definitions
+// for [http]
+// and [grpc]. Anything else is defined as an unsuccessful operation. For
+// successful
+// operations, `error.type` MUST NOT be set. For unsuccessful export operations,
+// `error.type` MUST contain a relevant failure cause.
+// If the exporter retries failed export attempts, exactly one observation MUST
+// be recorded per export operation,
+// covering the wall-clock duration from the start of the first attempt through
+// the conclusion of the final attempt (including any backoff between attempts).
+// `error.type` reflects the cause of the final attempt.
+//
+// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1
+// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success
+func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrHTTPResponseStatusCode returns an optional attribute for the
+// "http.response.status_code" semantic convention. It represents the HTTP status
+// code of the last HTTP request performed in scope of this export call.
+func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue {
+ return attribute.Int("http.response.status_code", val)
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterOperationDuration) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterOperationDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrRPCResponseStatusCode returns an optional attribute for the
+// "rpc.response.status_code" semantic convention. It represents the gRPC status
+// code of the last gRPC request performed in scope of this export call.
+func (SDKExporterOperationDuration) AttrRPCResponseStatusCode(val string) attribute.KeyValue {
+ return attribute.String("rpc.response.status_code", val)
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterOperationDuration) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterSpanExported is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.span.exported" semantic conventions. It
+// represents the number of spans for which the export has finished, either
+// successful or failed.
+type SDKExporterSpanExported struct {
+ metric.Int64Counter
+}
+
+var newSDKExporterSpanExportedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of spans for which the export has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument.
+func NewSDKExporterSpanExported(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKExporterSpanExported, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanExported{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanExportedOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanExportedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.exporter.span.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanExported{noop.Int64Counter{}}, err
+ }
+ return SDKExporterSpanExported{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanExported) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanExported) Name() string {
+ return "otel.sdk.exporter.span.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanExported) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanExported) Description() string {
+ return "The number of spans for which the export has finished, either successful or failed."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with `rejected_spans`
+// ), rejected spans MUST count as failed and only non-rejected spans count as
+// success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each span MUST be counted exactly once per export operation: intermediate
+// failed attempts that are followed by a retry MUST NOT increment the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterSpanExported) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// For successful exports, `error.type` MUST NOT be set. For failed exports,
+// `error.type` MUST contain the failure cause.
+// For exporters with partial success semantics (e.g. OTLP with `rejected_spans`
+// ), rejected spans MUST count as failed and only non-rejected spans count as
+// success.
+// If no rejection reason is available, `rejected` SHOULD be used as value for
+// `error.type`.
+// If the exporter retries failed export attempts, the export operation is
+// considered finished only after the final attempt has concluded.
+// Each span MUST be counted exactly once per export operation: intermediate
+// failed attempts that are followed by a retry MUST NOT increment the counter,
+// and `error.type` reflects the cause of the final attempt.
+func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterSpanExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanExported) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanExported) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterSpanExportedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.span.exported" semantic
+// conventions. It represents the number of spans for which the export has
+// finished, either successful or failed.
+type SDKExporterSpanExportedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKExporterSpanExportedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of spans for which the export has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanExportedObservable returns a new
+// SDKExporterSpanExportedObservable instrument.
+func NewSDKExporterSpanExportedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKExporterSpanExportedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanExportedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanExportedObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanExportedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.exporter.span.exported",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanExportedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKExporterSpanExportedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanExportedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanExportedObservable) Name() string {
+ return "otel.sdk.exporter.span.exported"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanExportedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanExportedObservable) Description() string {
+ return "The number of spans for which the export has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKExporterSpanExportedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanExportedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanExportedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanExportedObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanExportedObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterSpanInflight is an instrument used to record metric values
+// conforming to the "otel.sdk.exporter.span.inflight" semantic conventions. It
+// represents the number of spans which were passed to the exporter, but that
+// have not been exported yet (neither successful, nor failed).
+type SDKExporterSpanInflight struct {
+ metric.Int64UpDownCounter
+}
+
+var newSDKExporterSpanInflightOpts = []metric.Int64UpDownCounterOption{
+ metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument.
+func NewSDKExporterSpanInflight(
+ m metric.Meter,
+ opt ...metric.Int64UpDownCounterOption,
+) (SDKExporterSpanInflight, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanInflightOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanInflightOpts...)
+ }
+
+ i, err := m.Int64UpDownCounter(
+ "otel.sdk.exporter.span.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err
+ }
+ return SDKExporterSpanInflight{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter {
+ return m.Int64UpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanInflight) Name() string {
+ return "otel.sdk.exporter.span.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanInflight) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanInflight) Description() string {
+ return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// Spans are counted as inflight from when they are passed to the exporter until
+// the export operation has concluded.
+// If the exporter retries failed export attempts, spans remain inflight across
+// all retry attempts and any backoff between them.
+func (m SDKExporterSpanInflight) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// Spans are counted as inflight from when they are passed to the exporter until
+// the export operation has concluded.
+// If the exporter retries failed export attempts, spans remain inflight across
+// all retry attempts and any backoff between them.
+func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanInflight) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanInflight) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKExporterSpanInflightObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.exporter.span.inflight" semantic
+// conventions. It represents the number of spans which were passed to the
+// exporter, but that have not been exported yet (neither successful, nor
+// failed).
+type SDKExporterSpanInflightObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKExporterSpanInflightObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKExporterSpanInflightObservable returns a new
+// SDKExporterSpanInflightObservable instrument.
+func NewSDKExporterSpanInflightObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKExporterSpanInflightObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKExporterSpanInflightObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKExporterSpanInflightObservableOpts
+ } else {
+ opt = append(opt, newSDKExporterSpanInflightObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.exporter.span.inflight",
+ opt...,
+ )
+ if err != nil {
+ return SDKExporterSpanInflightObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKExporterSpanInflightObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKExporterSpanInflightObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKExporterSpanInflightObservable) Name() string {
+ return "otel.sdk.exporter.span.inflight"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKExporterSpanInflightObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKExporterSpanInflightObservable) Description() string {
+ return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKExporterSpanInflightObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKExporterSpanInflightObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// AttrServerAddress returns an optional attribute for the "server.address"
+// semantic convention. It represents the server domain name if available without
+// reverse DNS lookup; otherwise, IP address or Unix domain socket name.
+func (SDKExporterSpanInflightObservable) AttrServerAddress(val string) attribute.KeyValue {
+ return attribute.String("server.address", val)
+}
+
+// AttrServerPort returns an optional attribute for the "server.port" semantic
+// convention. It represents the server port number.
+func (SDKExporterSpanInflightObservable) AttrServerPort(val int) attribute.KeyValue {
+ return attribute.Int("server.port", val)
+}
+
+// SDKLogCreated is an instrument used to record metric values conforming to the
+// "otel.sdk.log.created" semantic conventions. It represents the number of logs
+// submitted to enabled SDK Loggers.
+type SDKLogCreated struct {
+ metric.Int64Counter
+}
+
+var newSDKLogCreatedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of logs submitted to enabled SDK Loggers."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKLogCreated returns a new SDKLogCreated instrument.
+func NewSDKLogCreated(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKLogCreated, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKLogCreated{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKLogCreatedOpts
+ } else {
+ opt = append(opt, newSDKLogCreatedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.log.created",
+ opt...,
+ )
+ if err != nil {
+ return SDKLogCreated{noop.Int64Counter{}}, err
+ }
+ return SDKLogCreated{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKLogCreated) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKLogCreated) Name() string {
+ return "otel.sdk.log.created"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKLogCreated) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKLogCreated) Description() string {
+ return "The number of logs submitted to enabled SDK Loggers."
+}
+
+// Add adds incr to the existing count for attrs.
+func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributes(attrs...))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// SDKLogCreatedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.log.created" semantic conventions. It represents
+// the number of logs submitted to enabled SDK Loggers.
+type SDKLogCreatedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKLogCreatedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of logs submitted to enabled SDK Loggers."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKLogCreatedObservable returns a new SDKLogCreatedObservable instrument.
+func NewSDKLogCreatedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKLogCreatedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKLogCreatedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKLogCreatedObservableOpts
+ } else {
+ opt = append(opt, newSDKLogCreatedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.log.created",
+ opt...,
+ )
+ if err != nil {
+ return SDKLogCreatedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKLogCreatedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKLogCreatedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKLogCreatedObservable) Name() string {
+ return "otel.sdk.log.created"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKLogCreatedObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKLogCreatedObservable) Description() string {
+ return "The number of logs submitted to enabled SDK Loggers."
+}
+
+// SDKMetricReaderCollectionDuration is an instrument used to record metric
+// values conforming to the "otel.sdk.metric_reader.collection.duration" semantic
+// conventions. It represents the duration of the collect operation of the metric
+// reader.
+type SDKMetricReaderCollectionDuration struct {
+ metric.Float64Histogram
+}
+
+var newSDKMetricReaderCollectionDurationOpts = []metric.Float64HistogramOption{
+ metric.WithDescription("The duration of the collect operation of the metric reader."),
+ metric.WithUnit("s"),
+}
+
+// NewSDKMetricReaderCollectionDuration returns a new
+// SDKMetricReaderCollectionDuration instrument.
+func NewSDKMetricReaderCollectionDuration(
+ m metric.Meter,
+ opt ...metric.Float64HistogramOption,
+) (SDKMetricReaderCollectionDuration, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKMetricReaderCollectionDurationOpts
+ } else {
+ opt = append(opt, newSDKMetricReaderCollectionDurationOpts...)
+ }
+
+ i, err := m.Float64Histogram(
+ "otel.sdk.metric_reader.collection.duration",
+ opt...,
+ )
+ if err != nil {
+ return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err
+ }
+ return SDKMetricReaderCollectionDuration{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram {
+ return m.Float64Histogram
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKMetricReaderCollectionDuration) Name() string {
+ return "otel.sdk.metric_reader.collection.duration"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKMetricReaderCollectionDuration) Unit() string {
+ return "s"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKMetricReaderCollectionDuration) Description() string {
+ return "The duration of the collect operation of the metric reader."
+}
+
+// Record records val to the current distribution for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful collections, `error.type` MUST NOT be set. For failed
+// collections, `error.type` SHOULD contain the failure cause.
+// It can happen that metrics collection is successful for some MetricProducers,
+// while others fail. In that case `error.type` SHOULD be set to any of the
+// failure causes.
+func (m SDKMetricReaderCollectionDuration) Record(
+ ctx context.Context,
+ val float64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// RecordSet records val to the current distribution for set.
+//
+// For successful collections, `error.type` MUST NOT be set. For failed
+// collections, `error.type` SHOULD contain the failure cause.
+// It can happen that metrics collection is successful for some MetricProducers,
+// while others fail. In that case `error.type` SHOULD be set to any of the
+// failure causes.
+func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) {
+ if !m.Float64Histogram.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Float64Histogram.Record(ctx, val)
+ return
+ }
+
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Float64Histogram.Record(ctx, val, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents the describes a class of error the operation ended
+// with.
+func (SDKMetricReaderCollectionDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKMetricReaderCollectionDuration) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKMetricReaderCollectionDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorLogProcessed is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.log.processed" semantic conventions. It
+// represents the number of log records for which the processing has finished,
+// either successful or failed.
+type SDKProcessorLogProcessed struct {
+ metric.Int64Counter
+}
+
+var newSDKProcessorLogProcessedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument.
+func NewSDKProcessorLogProcessed(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKProcessorLogProcessed, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorLogProcessed{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorLogProcessedOpts
+ } else {
+ opt = append(opt, newSDKProcessorLogProcessedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.processor.log.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorLogProcessed{noop.Int64Counter{}}, err
+ }
+ return SDKProcessorLogProcessed{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorLogProcessed) Name() string {
+ return "otel.sdk.processor.log.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorLogProcessed) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorLogProcessed) Description() string {
+ return "The number of log records for which the processing has finished, either successful or failed."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful processing, `error.type` MUST NOT be set. For failed
+// processing, `error.type` MUST contain the failure cause.
+// SDK Batching Log Record Processors MUST use `queue_full` as the value of
+// `error.type` for log records dropped due to a full queue.
+// SDK Log Record Processors MUST use `already_shutdown` as the value of
+// `error.type` for log records dropped because the processor has already been
+// shut down.
+// For the SDK Simple and Batching Log Record Processor a log record is
+// considered to be processed already when it has been submitted to the exporter,
+// not when the corresponding export call has finished.
+func (m SDKProcessorLogProcessed) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// For successful processing, `error.type` MUST NOT be set. For failed
+// processing, `error.type` MUST contain the failure cause.
+// SDK Batching Log Record Processors MUST use `queue_full` as the value of
+// `error.type` for log records dropped due to a full queue.
+// SDK Log Record Processors MUST use `already_shutdown` as the value of
+// `error.type` for log records dropped because the processor has already been
+// shut down.
+// For the SDK Simple and Batching Log Record Processor a log record is
+// considered to be processed already when it has been submitted to the exporter,
+// not when the corresponding export call has finished.
+func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorLogProcessedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.processor.log.processed" semantic
+// conventions. It represents the number of log records for which the processing
+// has finished, either successful or failed.
+type SDKProcessorLogProcessedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKProcessorLogProcessedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKProcessorLogProcessedObservable returns a new
+// SDKProcessorLogProcessedObservable instrument.
+func NewSDKProcessorLogProcessedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKProcessorLogProcessedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorLogProcessedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorLogProcessedObservableOpts
+ } else {
+ opt = append(opt, newSDKProcessorLogProcessedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.processor.log.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorLogProcessedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKProcessorLogProcessedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorLogProcessedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorLogProcessedObservable) Name() string {
+ return "otel.sdk.processor.log.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorLogProcessedObservable) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorLogProcessedObservable) Description() string {
+ return "The number of log records for which the processing has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+func (SDKProcessorLogProcessedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorLogProcessedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorLogProcessedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorLogQueueCapacity is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.log.queue.capacity" semantic
+// conventions. It represents the maximum number of log records the queue of a
+// given instance of an SDK Log Record processor can hold.
+type SDKProcessorLogQueueCapacity struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKProcessorLogQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity
+// instrument.
+func NewSDKProcessorLogQueueCapacity(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKProcessorLogQueueCapacity, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorLogQueueCapacityOpts
+ } else {
+ opt = append(opt, newSDKProcessorLogQueueCapacityOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.processor.log.queue.capacity",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKProcessorLogQueueCapacity{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorLogQueueCapacity) Name() string {
+ return "otel.sdk.processor.log.queue.capacity"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorLogQueueCapacity) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorLogQueueCapacity) Description() string {
+ return "The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorLogQueueSize is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.log.queue.size" semantic conventions. It
+// represents the number of log records in the queue of a given instance of an
+// SDK log processor.
+type SDKProcessorLogQueueSize struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKProcessorLogQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."),
+ metric.WithUnit("{log_record}"),
+}
+
+// NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument.
+func NewSDKProcessorLogQueueSize(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKProcessorLogQueueSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorLogQueueSizeOpts
+ } else {
+ opt = append(opt, newSDKProcessorLogQueueSizeOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.processor.log.queue.size",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKProcessorLogQueueSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorLogQueueSize) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorLogQueueSize) Name() string {
+ return "otel.sdk.processor.log.queue.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorLogQueueSize) Unit() string {
+ return "{log_record}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorLogQueueSize) Description() string {
+ return "The number of log records in the queue of a given instance of an SDK log processor."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorSpanProcessed is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.span.processed" semantic conventions. It
+// represents the number of spans for which the processing has finished, either
+// successful or failed.
+type SDKProcessorSpanProcessed struct {
+ metric.Int64Counter
+}
+
+var newSDKProcessorSpanProcessedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed
+// instrument.
+func NewSDKProcessorSpanProcessed(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKProcessorSpanProcessed, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorSpanProcessed{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorSpanProcessedOpts
+ } else {
+ opt = append(opt, newSDKProcessorSpanProcessedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.processor.span.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err
+ }
+ return SDKProcessorSpanProcessed{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorSpanProcessed) Name() string {
+ return "otel.sdk.processor.span.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorSpanProcessed) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorSpanProcessed) Description() string {
+ return "The number of spans for which the processing has finished, either successful or failed."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// For successful processing, `error.type` MUST NOT be set. For failed
+// processing, `error.type` MUST contain the failure cause.
+// SDK Batching Span Processors MUST use `queue_full` as the value of
+// `error.type` for spans dropped due to a full queue.
+// SDK Span Processors MUST use `already_shutdown` as the value of `error.type`
+// for spans dropped because the processor has already been shut down.
+// For the SDK Simple and Batching Span Processor a span is considered to be
+// processed already when it has been submitted to the exporter, not when the
+// corresponding export call has finished.
+func (m SDKProcessorSpanProcessed) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// For successful processing, `error.type` MUST NOT be set. For failed
+// processing, `error.type` MUST contain the failure cause.
+// SDK Batching Span Processors MUST use `queue_full` as the value of
+// `error.type` for spans dropped due to a full queue.
+// SDK Span Processors MUST use `already_shutdown` as the value of `error.type`
+// for spans dropped because the processor has already been shut down.
+// For the SDK Simple and Batching Span Processor a span is considered to be
+// processed already when it has been submitted to the exporter, not when the
+// corresponding export call has finished.
+func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+func (SDKProcessorSpanProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorSpanProcessed) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorSpanProcessedObservable is an instrument used to record metric
+// values conforming to the "otel.sdk.processor.span.processed" semantic
+// conventions. It represents the number of spans for which the processing has
+// finished, either successful or failed.
+type SDKProcessorSpanProcessedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKProcessorSpanProcessedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKProcessorSpanProcessedObservable returns a new
+// SDKProcessorSpanProcessedObservable instrument.
+func NewSDKProcessorSpanProcessedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKProcessorSpanProcessedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorSpanProcessedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorSpanProcessedObservableOpts
+ } else {
+ opt = append(opt, newSDKProcessorSpanProcessedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.processor.span.processed",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorSpanProcessedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKProcessorSpanProcessedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorSpanProcessedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorSpanProcessedObservable) Name() string {
+ return "otel.sdk.processor.span.processed"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorSpanProcessedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorSpanProcessedObservable) Description() string {
+ return "The number of spans for which the processing has finished, either successful or failed."
+}
+
+// AttrErrorType returns an optional attribute for the "error.type" semantic
+// convention. It represents a low-cardinality description of the failure reason.
+func (SDKProcessorSpanProcessedObservable) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue {
+ return attribute.String("error.type", string(val))
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorSpanProcessedObservable) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorSpanProcessedObservable) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorSpanQueueCapacity is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.span.queue.capacity" semantic
+// conventions. It represents the maximum number of spans the queue of a given
+// instance of an SDK span processor can hold.
+type SDKProcessorSpanQueueCapacity struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKProcessorSpanQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity
+// instrument.
+func NewSDKProcessorSpanQueueCapacity(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKProcessorSpanQueueCapacity, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorSpanQueueCapacityOpts
+ } else {
+ opt = append(opt, newSDKProcessorSpanQueueCapacityOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.processor.span.queue.capacity",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKProcessorSpanQueueCapacity{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorSpanQueueCapacity) Name() string {
+ return "otel.sdk.processor.span.queue.capacity"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorSpanQueueCapacity) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorSpanQueueCapacity) Description() string {
+ return "The maximum number of spans the queue of a given instance of an SDK span processor can hold."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKProcessorSpanQueueSize is an instrument used to record metric values
+// conforming to the "otel.sdk.processor.span.queue.size" semantic conventions.
+// It represents the number of spans in the queue of a given instance of an SDK
+// span processor.
+type SDKProcessorSpanQueueSize struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKProcessorSpanQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize
+// instrument.
+func NewSDKProcessorSpanQueueSize(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKProcessorSpanQueueSize, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKProcessorSpanQueueSizeOpts
+ } else {
+ opt = append(opt, newSDKProcessorSpanQueueSizeOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.processor.span.queue.size",
+ opt...,
+ )
+ if err != nil {
+ return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKProcessorSpanQueueSize{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKProcessorSpanQueueSize) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKProcessorSpanQueueSize) Name() string {
+ return "otel.sdk.processor.span.queue.size"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKProcessorSpanQueueSize) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKProcessorSpanQueueSize) Description() string {
+ return "The number of spans in the queue of a given instance of an SDK span processor."
+}
+
+// AttrComponentName returns an optional attribute for the "otel.component.name"
+// semantic convention. It represents a name uniquely identifying the instance of
+// the OpenTelemetry component within its containing SDK instance.
+func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue {
+ return attribute.String("otel.component.name", val)
+}
+
+// AttrComponentType returns an optional attribute for the "otel.component.type"
+// semantic convention. It represents a name identifying the type of the
+// OpenTelemetry component.
+func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue {
+ return attribute.String("otel.component.type", string(val))
+}
+
+// SDKSpanLive is an instrument used to record metric values conforming to the
+// "otel.sdk.span.live" semantic conventions. It represents the number of created
+// spans with `recording=true` for which the end operation has not been called
+// yet.
+type SDKSpanLive struct {
+ metric.Int64UpDownCounter
+}
+
+var newSDKSpanLiveOpts = []metric.Int64UpDownCounterOption{
+ metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanLive returns a new SDKSpanLive instrument.
+func NewSDKSpanLive(
+ m metric.Meter,
+ opt ...metric.Int64UpDownCounterOption,
+) (SDKSpanLive, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanLive{noop.Int64UpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanLiveOpts
+ } else {
+ opt = append(opt, newSDKSpanLiveOpts...)
+ }
+
+ i, err := m.Int64UpDownCounter(
+ "otel.sdk.span.live",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanLive{noop.Int64UpDownCounter{}}, err
+ }
+ return SDKSpanLive{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanLive) Inst() metric.Int64UpDownCounter {
+ return m.Int64UpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanLive) Name() string {
+ return "otel.sdk.span.live"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanLive) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanLive) Description() string {
+ return "The number of created spans with `recording=true` for which the end operation has not been called yet."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// Non-recording spans are not counted, hence `otel.span.sampling_result` can
+// only take values `RECORD_ONLY` and `RECORD_AND_SAMPLE`, not `DROP`.
+func (m SDKSpanLive) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// Non-recording spans are not counted, hence `otel.span.sampling_result` can
+// only take values `RECORD_ONLY` and `RECORD_AND_SAMPLE`, not `DROP`.
+func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64UpDownCounter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64UpDownCounter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64UpDownCounter.Add(ctx, incr, *o...)
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
+
+// SDKSpanLiveObservable is an instrument used to record metric values conforming
+// to the "otel.sdk.span.live" semantic conventions. It represents the number of
+// created spans with `recording=true` for which the end operation has not been
+// called yet.
+type SDKSpanLiveObservable struct {
+ metric.Int64ObservableUpDownCounter
+}
+
+var newSDKSpanLiveObservableOpts = []metric.Int64ObservableUpDownCounterOption{
+ metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanLiveObservable returns a new SDKSpanLiveObservable instrument.
+func NewSDKSpanLiveObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableUpDownCounterOption,
+) (SDKSpanLiveObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanLiveObservable{noop.Int64ObservableUpDownCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanLiveObservableOpts
+ } else {
+ opt = append(opt, newSDKSpanLiveObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableUpDownCounter(
+ "otel.sdk.span.live",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanLiveObservable{noop.Int64ObservableUpDownCounter{}}, err
+ }
+ return SDKSpanLiveObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanLiveObservable) Inst() metric.Int64ObservableUpDownCounter {
+ return m.Int64ObservableUpDownCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanLiveObservable) Name() string {
+ return "otel.sdk.span.live"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanLiveObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanLiveObservable) Description() string {
+ return "The number of created spans with `recording=true` for which the end operation has not been called yet."
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanLiveObservable) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
+
+// SDKSpanStarted is an instrument used to record metric values conforming to the
+// "otel.sdk.span.started" semantic conventions. It represents the number of
+// created spans.
+type SDKSpanStarted struct {
+ metric.Int64Counter
+}
+
+var newSDKSpanStartedOpts = []metric.Int64CounterOption{
+ metric.WithDescription("The number of created spans."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanStarted returns a new SDKSpanStarted instrument.
+func NewSDKSpanStarted(
+ m metric.Meter,
+ opt ...metric.Int64CounterOption,
+) (SDKSpanStarted, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanStarted{noop.Int64Counter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanStartedOpts
+ } else {
+ opt = append(opt, newSDKSpanStartedOpts...)
+ }
+
+ i, err := m.Int64Counter(
+ "otel.sdk.span.started",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanStarted{noop.Int64Counter{}}, err
+ }
+ return SDKSpanStarted{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanStarted) Inst() metric.Int64Counter {
+ return m.Int64Counter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanStarted) Name() string {
+ return "otel.sdk.span.started"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanStarted) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanStarted) Description() string {
+ return "The number of created spans."
+}
+
+// Add adds incr to the existing count for attrs.
+//
+// All additional attrs passed are included in the recorded value.
+//
+// Implementations MUST record this metric for all spans, even for non-recording
+// ones.
+func (m SDKSpanStarted) Add(
+ ctx context.Context,
+ incr int64,
+ attrs ...attribute.KeyValue,
+) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if len(attrs) == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(
+ *o,
+ metric.WithAttributes(
+ attrs...,
+ ),
+ )
+
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AddSet adds incr to the existing count for set.
+//
+// Implementations MUST record this metric for all spans, even for non-recording
+// ones.
+func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Set) {
+ if !m.Int64Counter.Enabled(ctx) {
+ return
+ }
+ if set.Len() == 0 {
+ m.Int64Counter.Add(ctx, incr)
+ return
+ }
+
+ o := metricpool.AddOptions()
+ defer metricpool.PutAddOptions(o)
+
+ *o = append(*o, metric.WithAttributeSet(set))
+ m.Int64Counter.Add(ctx, incr, *o...)
+}
+
+// AttrSpanParentOrigin returns an optional attribute for the
+// "otel.span.parent.origin" semantic convention. It represents the determines
+// whether the span has a parent span, and if so, [whether it is a remote parent]
+// .
+//
+// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue {
+ return attribute.String("otel.span.parent.origin", string(val))
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
+
+// SDKSpanStartedObservable is an instrument used to record metric values
+// conforming to the "otel.sdk.span.started" semantic conventions. It represents
+// the number of created spans.
+type SDKSpanStartedObservable struct {
+ metric.Int64ObservableCounter
+}
+
+var newSDKSpanStartedObservableOpts = []metric.Int64ObservableCounterOption{
+ metric.WithDescription("The number of created spans."),
+ metric.WithUnit("{span}"),
+}
+
+// NewSDKSpanStartedObservable returns a new SDKSpanStartedObservable instrument.
+func NewSDKSpanStartedObservable(
+ m metric.Meter,
+ opt ...metric.Int64ObservableCounterOption,
+) (SDKSpanStartedObservable, error) {
+ // Check if the meter is nil.
+ if m == nil {
+ return SDKSpanStartedObservable{noop.Int64ObservableCounter{}}, nil
+ }
+
+ if len(opt) == 0 {
+ opt = newSDKSpanStartedObservableOpts
+ } else {
+ opt = append(opt, newSDKSpanStartedObservableOpts...)
+ }
+
+ i, err := m.Int64ObservableCounter(
+ "otel.sdk.span.started",
+ opt...,
+ )
+ if err != nil {
+ return SDKSpanStartedObservable{noop.Int64ObservableCounter{}}, err
+ }
+ return SDKSpanStartedObservable{i}, nil
+}
+
+// Inst returns the underlying metric instrument.
+func (m SDKSpanStartedObservable) Inst() metric.Int64ObservableCounter {
+ return m.Int64ObservableCounter
+}
+
+// Name returns the semantic convention name of the instrument.
+func (SDKSpanStartedObservable) Name() string {
+ return "otel.sdk.span.started"
+}
+
+// Unit returns the semantic convention unit of the instrument
+func (SDKSpanStartedObservable) Unit() string {
+ return "{span}"
+}
+
+// Description returns the semantic convention description of the instrument
+func (SDKSpanStartedObservable) Description() string {
+ return "The number of created spans."
+}
+
+// AttrSpanParentOrigin returns an optional attribute for the
+// "otel.span.parent.origin" semantic convention. It represents the determines
+// whether the span has a parent span, and if so, [whether it is a remote parent]
+// .
+//
+// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote
+func (SDKSpanStartedObservable) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue {
+ return attribute.String("otel.span.parent.origin", string(val))
+}
+
+// AttrSpanSamplingResult returns an optional attribute for the
+// "otel.span.sampling_result" semantic convention. It represents the result
+// value of the sampler for this span.
+func (SDKSpanStartedObservable) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue {
+ return attribute.String("otel.span.sampling_result", string(val))
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/rpcconv/metric.go
similarity index 94%
rename from vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go
rename to vendor/go.opentelemetry.io/otel/semconv/v1.43.0/rpcconv/metric.go
index 7b4acec91132..c766d4b9e8a2 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv/metric.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/rpcconv/metric.go
@@ -9,16 +9,11 @@ package rpcconv
import (
"context"
- "sync"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/noop"
-)
-
-var (
- addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }}
- recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }}
+ "go.opentelemetry.io/otel/semconv/internal/metricpool"
)
// ErrorTypeAttr is an attribute conforming to the error.type semantic
@@ -138,12 +133,8 @@ func (m ClientCallDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -171,12 +162,8 @@ func (m ClientCallDuration) RecordSet(ctx context.Context, val float64, set attr
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
@@ -299,12 +286,8 @@ func (m ServerCallDuration) Record(
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(
*o,
@@ -332,12 +315,8 @@ func (m ServerCallDuration) RecordSet(ctx context.Context, val float64, set attr
return
}
- o := recOptPool.Get().(*[]metric.RecordOption)
- defer func() {
- clear(*o)
- *o = (*o)[:0]
- recOptPool.Put(o)
- }()
+ o := metricpool.RecordOptions()
+ defer metricpool.PutRecordOptions(o)
*o = append(*o, metric.WithAttributeSet(set))
m.Float64Histogram.Record(ctx, val, *o...)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/schema.go
new file mode 100644
index 000000000000..ce5f5f5c5bd9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.43.0/schema.go
@@ -0,0 +1,11 @@
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv
+
+// SchemaURL is the schema URL that matches the version of the semantic conventions
+// that this package defines. Semconv packages starting from v1.4.0 must declare
+// non-empty schema URL in the form https://opentelemetry.io/schemas/
+const SchemaURL = "https://opentelemetry.io/schemas/1.43.0"
diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go
index 6836c65478b4..9c1567a2e632 100644
--- a/vendor/go.opentelemetry.io/otel/trace.go
+++ b/vendor/go.opentelemetry.io/otel/trace.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
import (
"go.opentelemetry.io/otel/internal/global"
diff --git a/vendor/go.opentelemetry.io/otel/trace/auto.go b/vendor/go.opentelemetry.io/otel/trace/auto.go
index a75cf047d5bc..17cf898cd9a8 100644
--- a/vendor/go.opentelemetry.io/otel/trace/auto.go
+++ b/vendor/go.opentelemetry.io/otel/trace/auto.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"context"
@@ -20,7 +20,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
- semconv "go.opentelemetry.io/otel/semconv/v1.41.0"
+ semconv "go.opentelemetry.io/otel/semconv/v1.43.0"
"go.opentelemetry.io/otel/trace/embedded"
"go.opentelemetry.io/otel/trace/internal/telemetry"
)
@@ -358,6 +358,16 @@ func convAttrValue(value attribute.Value) telemetry.Value {
out = append(out, convAttrValue(v))
}
return telemetry.SliceValue(out...)
+ case attribute.MAP:
+ kvs := value.AsMap()
+ out := make([]telemetry.Attr, 0, len(kvs))
+ for _, kv := range kvs {
+ out = append(out, telemetry.Attr{
+ Key: string(kv.Key),
+ Value: convAttrValue(kv.Value),
+ })
+ }
+ return telemetry.MapValue(out...)
}
return telemetry.Value{}
}
diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go
index 4cedba5ac734..862ecc89885d 100644
--- a/vendor/go.opentelemetry.io/otel/trace/config.go
+++ b/vendor/go.opentelemetry.io/otel/trace/config.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"slices"
diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go
index 8c45a7107ff9..89927eda6ff1 100644
--- a/vendor/go.opentelemetry.io/otel/trace/context.go
+++ b/vendor/go.opentelemetry.io/otel/trace/context.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import "context"
diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go
index cdbf41d6d7f2..57de8f348a7f 100644
--- a/vendor/go.opentelemetry.io/otel/trace/doc.go
+++ b/vendor/go.opentelemetry.io/otel/trace/doc.go
@@ -116,4 +116,4 @@ It is strongly recommended that authors only embed
That implementation is the only one OpenTelemetry authors can guarantee will
fully implement all the API interfaces when a user updates their API.
*/
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
index 3e359a00bf47..59d8a510b38c 100644
--- a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
+++ b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
@@ -11,7 +11,7 @@
// the API package).
//
// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace
-package embedded // import "go.opentelemetry.io/otel/trace/embedded"
+package embedded
// TracerProvider is embedded in
// [go.opentelemetry.io/otel/trace.TracerProvider].
diff --git a/vendor/go.opentelemetry.io/otel/trace/hex.go b/vendor/go.opentelemetry.io/otel/trace/hex.go
index 1cbef1d4b946..5f156b0dcb3d 100644
--- a/vendor/go.opentelemetry.io/otel/trace/hex.go
+++ b/vendor/go.opentelemetry.io/otel/trace/hex.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
const (
// hexLU is a hex lookup table of the 16 lowercase hex digits.
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go
index ff0f6eac62ed..9503318eb53d 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
// Attr is a key-value pair.
type Attr struct {
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go
index 5debe90bbb1b..949e2165c057 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go
@@ -5,4 +5,4 @@
Package telemetry provides a lightweight representations of OpenTelemetry
telemetry that is compatible with the OTLP JSON protobuf encoding.
*/
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go
index bea56f2e7d3b..3a6d6b87a425 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"encoding/hex"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go
index f5e3a8cec9d7..29e629d6674d 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"encoding/json"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go
index 1798a702d4bf..cecad8bae3c9 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go
index c2b4c635b7ae..b6f2e28d408c 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
index 61c7819a2336..0da6e5fd6aaf 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go
index 1039bf40cdae..5dac1b2cb84a 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
// StatusCode is the status of a Span.
//
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go
index e5f10767ca33..44197b80849c 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go
index cb7927b81671..9d2d680634f7 100644
--- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go
+++ b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"
+package telemetry
import (
"bytes"
diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
index c00221e7be9f..d672f03c2ab5 100644
--- a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
+++ b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
// nonRecordingSpan is a minimal implementation of a Span that wraps a
// SpanContext. It performs no operations other than to return the wrapped
diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go
index 400fab123872..b954251b2d14 100644
--- a/vendor/go.opentelemetry.io/otel/trace/noop.go
+++ b/vendor/go.opentelemetry.io/otel/trace/noop.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go
index 689d220df7dd..4f8190e4179c 100644
--- a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go
+++ b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go
@@ -10,7 +10,7 @@
// This implementation can be embedded in other implementations of the
// OpenTelemetry trace API. Doing so will mean the implementation defaults to
// no operation for methods it does not implement.
-package noop // import "go.opentelemetry.io/otel/trace/noop"
+package noop
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/trace/provider.go b/vendor/go.opentelemetry.io/otel/trace/provider.go
index ef85cb70c6d8..891cc0b8cae4 100644
--- a/vendor/go.opentelemetry.io/otel/trace/provider.go
+++ b/vendor/go.opentelemetry.io/otel/trace/provider.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import "go.opentelemetry.io/otel/trace/embedded"
diff --git a/vendor/go.opentelemetry.io/otel/trace/span.go b/vendor/go.opentelemetry.io/otel/trace/span.go
index d01e79366494..603b2c146f20 100644
--- a/vendor/go.opentelemetry.io/otel/trace/span.go
+++ b/vendor/go.opentelemetry.io/otel/trace/span.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go
index e3d103c4b61d..c4c383819f79 100644
--- a/vendor/go.opentelemetry.io/otel/trace/trace.go
+++ b/vendor/go.opentelemetry.io/otel/trace/trace.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"encoding/json"
diff --git a/vendor/go.opentelemetry.io/otel/trace/tracer.go b/vendor/go.opentelemetry.io/otel/trace/tracer.go
index 77952d2a0b31..7e6e5ee9372c 100644
--- a/vendor/go.opentelemetry.io/otel/trace/tracer.go
+++ b/vendor/go.opentelemetry.io/otel/trace/tracer.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"context"
diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go
index e9cb3fd4d1f3..9ac78fa04ced 100644
--- a/vendor/go.opentelemetry.io/otel/trace/tracestate.go
+++ b/vendor/go.opentelemetry.io/otel/trace/tracestate.go
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package trace // import "go.opentelemetry.io/otel/trace"
+package trace
import (
"encoding/json"
diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go
index 72746acfdb4f..ea7903096902 100644
--- a/vendor/go.opentelemetry.io/otel/version.go
+++ b/vendor/go.opentelemetry.io/otel/version.go
@@ -1,9 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
-package otel // import "go.opentelemetry.io/otel"
+package otel
// Version is the current release version of OpenTelemetry in use.
func Version() string {
- return "1.44.0"
+ return "1.45.0"
}
diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml
index d6dbf803ef94..3b1ad7301a2c 100644
--- a/vendor/go.opentelemetry.io/otel/versions.yaml
+++ b/vendor/go.opentelemetry.io/otel/versions.yaml
@@ -3,7 +3,7 @@
module-sets:
stable-v1:
- version: v1.44.0
+ version: v1.45.0
modules:
- go.opentelemetry.io/otel
- go.opentelemetry.io/otel/bridge/opencensus
@@ -22,12 +22,12 @@ module-sets:
- go.opentelemetry.io/otel/sdk/metric
- go.opentelemetry.io/otel/trace
experimental-metrics:
- version: v0.66.0
+ version: v0.67.0
modules:
- go.opentelemetry.io/otel/exporters/prometheus
- go.opentelemetry.io/otel/metric/x
experimental-logs:
- version: v0.20.0
+ version: v0.21.0
modules:
- go.opentelemetry.io/otel/log
- go.opentelemetry.io/otel/log/logtest
@@ -37,7 +37,7 @@ module-sets:
- go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp
- go.opentelemetry.io/otel/exporters/stdout/stdoutlog
experimental-schema:
- version: v0.0.17
+ version: v0.0.18
modules:
- go.opentelemetry.io/otel/schema
excluded-modules:
diff --git a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
index 304f64763740..cef3580008e7 100644
--- a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
+++ b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
@@ -194,7 +194,7 @@ type AnyValue_StringValueStrindex struct {
// Profiling signal and process the data as if this value were absent or
// empty, ignoring its semantic content for the non-Profiling signal.
//
- // Status: [Development]
+ // Status: [Alpha]
StringValueStrindex int32 `protobuf:"varint,8,opt,name=string_value_strindex,json=stringValueStrindex,proto3,oneof"`
}
@@ -330,7 +330,7 @@ type KeyValue struct {
unknownFields protoimpl.UnknownFields
// The key name of the pair.
- // key_ref MUST NOT be set if key is used.
+ // key_strindex MUST NOT be set if key is used.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// The value of the pair.
Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
@@ -344,7 +344,7 @@ type KeyValue struct {
// Profiling signal and process the data as if this value were absent or
// empty, ignoring its semantic content for the non-Profiling signal.
//
- // Status: [Development]
+ // Status: [Alpha]
KeyStrindex int32 `protobuf:"varint,3,opt,name=key_strindex,json=keyStrindex,proto3" json:"key_strindex,omitempty"`
}
diff --git a/vendor/go.opentelemetry.io/proto/otlp/metrics/v1/metrics.pb.go b/vendor/go.opentelemetry.io/proto/otlp/metrics/v1/metrics.pb.go
index 748c9fb1c528..e148ddd13469 100644
--- a/vendor/go.opentelemetry.io/proto/otlp/metrics/v1/metrics.pb.go
+++ b/vendor/go.opentelemetry.io/proto/otlp/metrics/v1/metrics.pb.go
@@ -527,7 +527,7 @@ type Metric struct {
// A description of the metric, which can be used in documentation.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// The unit in which the metric value is reported. Follows the format
- // described by https://unitsofmeasure.org/ucum.html.
+ // described by https://ucum.org/ucum and https://units-of-measurement.org/
Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
// Data determines the aggregation type (if any) of the metric, what is the
// reported value type for the data points, as well as the relatationship to
diff --git a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
index 8d99551feecb..b1da45687cc5 100644
--- a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (!amd64 && !loong64 && !ppc64le && !ppc64 && !s390x) || !gc || purego
+//go:build (!amd64 && !loong64 && !ppc64le && !ppc64 && !riscv64 && !s390x) || !gc || purego
package poly1305
diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_asm.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_asm.go
index 315b84ac39bf..55041bf51d50 100644
--- a/vendor/golang.org/x/crypto/internal/poly1305/sum_asm.go
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_asm.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build gc && !purego && (amd64 || loong64 || ppc64 || ppc64le)
+//go:build gc && !purego && (amd64 || loong64 || ppc64 || ppc64le || riscv64)
package poly1305
diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_riscv64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_riscv64.s
new file mode 100644
index 000000000000..ce5eb3d43d94
--- /dev/null
+++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_riscv64.s
@@ -0,0 +1,158 @@
+// Copyright 2026 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build gc && !purego
+
+#define LOAD64U(base, offset, t0, t1, t2, t3, dst) \
+ MOVBU (offset+0*1)(base), t0; \
+ MOVBU (offset+1*1)(base), t1; \
+ MOVBU (offset+2*1)(base), t2; \
+ MOVBU (offset+3*1)(base), t3; \
+ SLL $8, t1; \
+ SLL $16, t2; \
+ SLL $24, t3; \
+ OR t1, t0; \
+ OR t3, t2; \
+ OR t2, t0, dst; \
+ MOVBU (offset+4*1)(base), t0; \
+ MOVBU (offset+5*1)(base), t1; \
+ MOVBU (offset+6*1)(base), t2; \
+ MOVBU (offset+7*1)(base), t3; \
+ SLL $32, t0; \
+ SLL $40, t1; \
+ SLL $48, t2; \
+ SLL $56, t3; \
+ OR t1, t0; \
+ OR t3, t2; \
+ OR t2, t0; \
+ OR t0, dst
+
+// func update(state *macState, msg []byte)
+TEXT ·update(SB), $0-32
+ MOV state+0(FP), X5
+ MOV msg_base+8(FP), X6
+ MOV msg_len+16(FP), X7
+
+ MOV $16, X8
+
+ AND $7, X6, X28
+
+ MOV (0*8)(X5), X9 // h0
+ MOV (1*8)(X5), X10 // h1
+ MOV (2*8)(X5), X11 // h2
+ MOV (3*8)(X5), X12 // r0
+ MOV (4*8)(X5), X13 // r1
+
+ BLT X7, X8, tail
+
+loop:
+ BEQZ X28, aligned_load
+
+ LOAD64U(X6, 0*8, X16, X18, X19, X20, X15) // msg[0:8]
+ LOAD64U(X6, 1*8, X16, X18, X19, X20, X17) // msg[8:16]
+ JMP block
+
+aligned_load:
+ MOV (0*8)(X6), X15 // msg[0:8]
+ MOV (1*8)(X6), X17 // msg[8:16]
+
+block:
+ ADD X15, X9 // h0 (x1 + y1 = z1', if z1' < x1 then z1' overflow)
+ SLTU X15, X9, X19 // h0.carry
+ ADD X17, X10, X22
+ SLTU X17, X22, X23
+ ADD X22, X19, X10 // h1
+ SLTU X22, X10, X19
+ OR X23, X19 // h1.carry
+ ADD $1, X19
+ ADD X19, X11 // h2
+
+ ADD $16, X6 // msg = msg[16:]
+
+multiply:
+ MULHU X9, X12, X16 // h0r0.hi
+ MUL X9, X12, X15 // h0r0.lo
+ MULHU X10, X12, X17 // h1r0.hi
+ MUL X10, X12, X14 // h1r0.lo
+ ADD X14, X16
+ SLTU X14, X16, X19
+ ADD X19, X17
+ MUL X11, X12, X20
+ ADD X17, X20
+ MULHU X9, X13, X17 // h0r1.hi
+ MUL X9, X13, X14 // h0r1.lo
+ ADD X14, X16
+ SLTU X14, X16, X19
+ ADD X19, X17
+ MOV X17, X9
+ MUL X11, X13, X21 // h2r1
+ MULHU X10, X13, X17 // h1r1.hi
+ MUL X10, X13, X14 // h1r1.lo
+ ADD X14, X20
+ ADD X17, X21, X22
+ SLTU X14, X20, X19
+ ADD X22, X19, X21
+ ADD X9, X20
+ SLTU X9, X20, X19
+ ADD X19, X21
+ AND $3, X20, X11
+ AND $-4, X20, X18
+ ADD X18, X15, X9
+ ADD X21, X16, X22
+ SLTU X18, X9, X19
+ SLTU X21, X22, X23
+ ADD X22, X19, X10
+ SLTU X22, X10, X19
+ OR X19, X23, X19
+ ADD X19, X11
+ SLL $62, X21, X22
+ SRL $2, X20, X23
+ SRL $2, X21, X21
+ OR X22, X23, X20
+ ADD X20, X9, X9
+ ADD X21, X10, X22
+ SLTU X20, X9, X19
+ SLTU X21, X22, X23
+ ADD X22, X19, X10
+ SLTU X22, X10, X19
+ OR X19, X23, X19
+ ADD X19, X11, X11
+
+ SUB $16, X7, X7
+ BGE X7, X8, loop
+
+tail:
+ BEQ X7, X0, done
+ MOV $1, X15
+ MOV $0, X16
+ ADD X7, X6, X6
+
+flush_buffer:
+ MOVBU -1(X6), X20
+ SRL $56, X15, X19
+ SLL $8, X16, X23
+ SLL $8, X15, X15
+ OR X19, X23, X16
+ XOR X20, X15
+ SUB $1, X7, X7
+ SUB $1, X6, X6
+ BNE X7, X0, flush_buffer
+
+ ADD X15, X9
+ SLTU X15, X9, X19
+ ADD X16, X10, X22
+ SLTU X16, X22, X23
+ ADD X22, X19, X10
+ SLTU X22, X10, X19
+ OR X23, X19
+ ADD X19, X11
+
+ MOV $16, X7
+ JMP multiply
+
+done:
+ MOV X9, (0*8)(X5) // h0
+ MOV X10, (1*8)(X5)
+ MOV X11, (2*8)(X5)
+ RET
diff --git a/vendor/golang.org/x/crypto/ssh/agent/keyring.go b/vendor/golang.org/x/crypto/ssh/agent/keyring.go
index a9e29b6f8470..a4f4c11e4dc1 100644
--- a/vendor/golang.org/x/crypto/ssh/agent/keyring.go
+++ b/vendor/golang.org/x/crypto/ssh/agent/keyring.go
@@ -104,7 +104,7 @@ func (r *keyring) Unlock(passphrase []byte) error {
if !r.locked {
return errors.New("agent: not locked")
}
- if 1 != subtle.ConstantTimeCompare(passphrase, r.passphrase) {
+ if subtle.ConstantTimeCompare(passphrase, r.passphrase) != 1 {
return fmt.Errorf("agent: incorrect passphrase")
}
diff --git a/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/golang.org/x/crypto/ssh/agent/server.go
index 782c54eb7c94..27394125de52 100644
--- a/vendor/golang.org/x/crypto/ssh/agent/server.go
+++ b/vendor/golang.org/x/crypto/ssh/agent/server.go
@@ -246,10 +246,10 @@ func setConstraints(key *AddedKey, constraintBytes []byte) error {
// on arbitrary inputs; the CRT coefficient recomputation is cubic in
// |p| and can consume excessive CPU on oversized keys.
func checkRSAKeyParams(N, E, P, Q *big.Int) error {
- if N.BitLen() > 8192 {
+ if N.BitLen() > 16384 {
return errors.New("agent: RSA modulus too large")
}
- if P.BitLen() > 4096 || Q.BitLen() > 4096 {
+ if P.BitLen() > 8192 || Q.BitLen() > 8192 {
return errors.New("agent: RSA prime too large")
}
if E.BitLen() > 24 {
diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go
index 6f75d77ec1a5..fa848f51a5f9 100644
--- a/vendor/golang.org/x/crypto/ssh/certs.go
+++ b/vendor/golang.org/x/crypto/ssh/certs.go
@@ -229,15 +229,20 @@ func parseCert(in []byte, privAlgo string) (*Certificate, error) {
return nil, err
}
c.Reserved = g.Reserved
+ // Reject a certificate whose signature key is itself a certificate before
+ // parsing it. Certificates signed by certificates are not supported (see
+ // PROTOCOL.certkeys), and rejecting after ParsePublicKey returns would allow
+ // a chain of nested certificates to recurse once per level, exhausting the
+ // goroutine stack.
+ if sigAlgo, _, ok := parseString(g.SignatureKey); !ok {
+ return nil, errShortRead
+ } else if _, ok := certKeyAlgoNames[string(sigAlgo)]; ok {
+ return nil, fmt.Errorf("ssh: the signature key type %q is invalid for certificates", sigAlgo)
+ }
k, err := ParsePublicKey(g.SignatureKey)
if err != nil {
return nil, err
}
- // The Type() function is intended to return only certificate key types, but
- // we use certKeyAlgoNames anyway for safety, to match [Certificate.Type].
- if _, ok := certKeyAlgoNames[k.Type()]; ok {
- return nil, fmt.Errorf("ssh: the signature key type %q is invalid for certificates", k.Type())
- }
c.SignatureKey = k
c.Signature, rest, ok = parseSignatureBody(g.Signature)
if !ok || len(rest) > 0 {
diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go
index afc9aef1853a..ba3279e91d68 100644
--- a/vendor/golang.org/x/crypto/ssh/channel.go
+++ b/vendor/golang.org/x/crypto/ssh/channel.go
@@ -216,6 +216,10 @@ type channel struct {
// packetPool has a buffer for each extended channel ID to
// save allocations during writes.
packetPool map[uint32][]byte
+
+ // closeOnce guards close so it is idempotent: closing the internal Go
+ // channels (msg, incomingRequests) more than once would panic.
+ closeOnce sync.Once
}
// writePacket sends a packet. If the packet is a channel close, it updates
@@ -340,7 +344,18 @@ func (ch *channel) handleData(packet []byte) error {
if extended == 1 {
ch.extPending.write(data)
} else if extended > 0 {
- // discard other extended data.
+ // RFC 4254, Section 5.2 defines no extended data types other
+ // than stderr (type 1, handled above) and this package provides
+ // no API to read them, so the data is discarded. Credit its
+ // window back immediately: it can never be read, so the
+ // deduction above would otherwise shrink the window permanently.
+ // adjustWindow returns io.EOF if the local side has already
+ // sent a channel close; ignore it like ReadExtended does, since
+ // an error returned here would terminate the mux read loop and
+ // tear down the whole connection.
+ if err := ch.adjustWindow(length); err != nil && err != io.EOF {
+ return err
+ }
} else {
ch.pending.write(data)
}
@@ -393,17 +408,19 @@ func (c *channel) ReadExtended(data []byte, extended uint32) (n int, err error)
}
func (c *channel) close() {
- c.pending.eof()
- c.extPending.eof()
- close(c.msg)
- close(c.incomingRequests)
- c.writeMu.Lock()
- // This is not necessary for a normal channel teardown, but if
- // there was another error, it is.
- c.sentClose = true
- c.writeMu.Unlock()
- // Unblock writers.
- c.remoteWin.close()
+ c.closeOnce.Do(func() {
+ c.pending.eof()
+ c.extPending.eof()
+ close(c.msg)
+ close(c.incomingRequests)
+ c.writeMu.Lock()
+ // This is not necessary for a normal channel teardown, but if
+ // there was another error, it is.
+ c.sentClose = true
+ c.writeMu.Unlock()
+ // Unblock writers.
+ c.remoteWin.close()
+ })
}
// responseMessageReceived is called when a success or failure message is
@@ -493,19 +510,20 @@ func (ch *channel) handlePacket(packet []byte) error {
func (m *mux) newChannel(chanType string, direction channelDirection, extraData []byte) *channel {
ch := &channel{
- remoteWin: window{Cond: newCond()},
- myWindow: channelWindowSize,
- pending: newBuffer(),
- extPending: newBuffer(),
- direction: direction,
- incomingRequests: make(chan *Request, chanSize),
- msg: make(chan interface{}, chanSize),
- chanType: chanType,
- extraData: extraData,
- mux: m,
- packetPool: make(map[uint32][]byte),
- }
- ch.localId = m.chanList.add(ch)
+ remoteWin: window{Cond: newCond()},
+ myWindow: channelWindowSize,
+ maxIncomingPayload: channelMaxPacket,
+ pending: newBuffer(),
+ extPending: newBuffer(),
+ direction: direction,
+ incomingRequests: make(chan *Request, chanSize),
+ msg: make(chan interface{}, chanSize),
+ chanType: chanType,
+ extraData: extraData,
+ mux: m,
+ packetPool: make(map[uint32][]byte),
+ }
+ m.chanList.add(ch)
return ch
}
@@ -529,7 +547,6 @@ func (ch *channel) Accept() (Channel, <-chan *Request, error) {
if ch.decided {
return nil, nil, errDecidedAlready
}
- ch.maxIncomingPayload = channelMaxPacket
confirm := channelOpenConfirmMsg{
PeersID: ch.remoteId,
MyID: ch.localId,
diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go
index 60af2fc4dd4f..138cc9003ab3 100644
--- a/vendor/golang.org/x/crypto/ssh/client_auth.go
+++ b/vendor/golang.org/x/crypto/ssh/client_auth.go
@@ -798,7 +798,7 @@ func (g *gssAPIWithMICCallback) auth(session []byte, user string, c packetConn,
return authFailure, nil, fmt.Errorf("GSS-API Error:\n"+
"Major Status: %d\n"+
"Minor Status: %d\n"+
- "Error Message: %s\n", userAuthGSSAPIErrorResp.MajorStatus, userAuthGSSAPIErrorResp.MinorStatus,
+ "Error Message: %q\n", userAuthGSSAPIErrorResp.MajorStatus, userAuthGSSAPIErrorResp.MinorStatus,
userAuthGSSAPIErrorResp.Message)
case msgUserAuthGSSAPIToken:
userAuthGSSAPITokenReq := &userAuthGSSAPIToken{}
diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go
index 2e44e9c9ec62..aed0fd926a58 100644
--- a/vendor/golang.org/x/crypto/ssh/common.go
+++ b/vendor/golang.org/x/crypto/ssh/common.go
@@ -419,7 +419,7 @@ type AlgorithmNegotiationError struct {
}
func (a *AlgorithmNegotiationError) Error() string {
- return fmt.Sprintf("ssh: no common algorithm for %s; we offered: %v, peer offered: %v",
+ return fmt.Sprintf("ssh: no common algorithm for %s; we offered: %q, peer offered: %q",
a.What, a.SupportedAlgorithms, a.RequestedAlgorithms)
}
@@ -544,7 +544,7 @@ func (c *Config) SetDefaults() {
if c.Rand == nil {
c.Rand = rand.Reader
}
- if c.Ciphers == nil {
+ if len(c.Ciphers) == 0 {
c.Ciphers = defaultCiphers
}
var ciphers []string
@@ -556,7 +556,7 @@ func (c *Config) SetDefaults() {
}
c.Ciphers = ciphers
- if c.KeyExchanges == nil {
+ if len(c.KeyExchanges) == 0 {
c.KeyExchanges = defaultKexAlgos
}
var kexs []string
@@ -571,7 +571,7 @@ func (c *Config) SetDefaults() {
}
c.KeyExchanges = kexs
- if c.MACs == nil {
+ if len(c.MACs) == 0 {
c.MACs = defaultMACs
}
var macs []string
diff --git a/vendor/golang.org/x/crypto/ssh/connection.go b/vendor/golang.org/x/crypto/ssh/connection.go
index 378f6407b534..9e0ed089c45f 100644
--- a/vendor/golang.org/x/crypto/ssh/connection.go
+++ b/vendor/golang.org/x/crypto/ssh/connection.go
@@ -17,7 +17,7 @@ type OpenChannelError struct {
}
func (e *OpenChannelError) Error() string {
- return fmt.Sprintf("ssh: rejected: %s (%s)", e.Reason, e.Message)
+ return fmt.Sprintf("ssh: rejected: %s (%q)", e.Reason, e.Message)
}
// ConnMetadata holds metadata for the connection.
diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go
index 4be3cbb6de31..711a7f7c476a 100644
--- a/vendor/golang.org/x/crypto/ssh/handshake.go
+++ b/vendor/golang.org/x/crypto/ssh/handshake.go
@@ -162,7 +162,7 @@ func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byt
t.remoteAddr = addr
t.hostKeyCallback = config.HostKeyCallback
t.bannerCallback = config.BannerCallback
- if config.HostKeyAlgorithms != nil {
+ if len(config.HostKeyAlgorithms) > 0 {
t.hostKeyAlgorithms = config.HostKeyAlgorithms
} else {
t.hostKeyAlgorithms = defaultHostKeyAlgos
diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go
index 64377715e1c2..fbbfb6cf42d3 100644
--- a/vendor/golang.org/x/crypto/ssh/keys.go
+++ b/vendor/golang.org/x/crypto/ssh/keys.go
@@ -485,10 +485,11 @@ func parseRSA(in []byte) (out PublicKey, rest []byte, err error) {
return nil, nil, err
}
- // 8192 bits is also the maximum RSA key size accepted by crypto/tls for
- // signature verification:
- // https://github.com/golang/go/blob/69801b25/src/crypto/tls/handshake_client.go#L1096
- if w.N.BitLen() > 8192 {
+ // 16384 bits is the largest RSA key OpenSSH will generate (ssh-keygen
+ // caps -b at 16384), so it is the practical upper bound for keys seen on
+ // the wire. Rejecting anything larger bounds the CPU spent verifying an
+ // attacker-supplied key and signature, mitigating a denial of service.
+ if w.N.BitLen() > 16384 {
return nil, nil, errors.New("ssh: rsa modulus too large")
}
if w.E.BitLen() > 24 {
@@ -1669,13 +1670,13 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv
}
// Mirror the validation done in parseRSA for public keys: cap the
- // modulus at the same limit enforced by crypto/tls, reject oversized
- // or invalid exponents, and additionally bound the prime factors to
+ // modulus at the OpenSSH-generated maximum, reject oversized or
+ // invalid exponents, and additionally bound the prime factors to
// avoid the expensive CRT coefficient recomputation in pk.Precompute.
- if key.N.BitLen() > 8192 {
+ if key.N.BitLen() > 16384 {
return nil, errors.New("ssh: rsa modulus too large")
}
- if key.P.BitLen() > 4096 || key.Q.BitLen() > 4096 {
+ if key.P.BitLen() > 8192 || key.Q.BitLen() > 8192 {
return nil, errors.New("ssh: rsa prime too large")
}
if key.E.BitLen() > 24 {
diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go
index de86f71cf441..1d23dde259e0 100644
--- a/vendor/golang.org/x/crypto/ssh/messages.go
+++ b/vendor/golang.org/x/crypto/ssh/messages.go
@@ -44,16 +44,7 @@ type disconnectMsg struct {
}
func (d *disconnectMsg) Error() string {
- return fmt.Sprintf("ssh: disconnect, reason %d: %q", d.Reason, sanitizeString(d.Message))
-}
-
-func sanitizeString(s string) string {
- return strings.Map(func(r rune) rune {
- if r == '\t' || (r >= ' ' && r < 0x7f) {
- return r
- }
- return -1
- }, s)
+ return fmt.Sprintf("ssh: disconnect, reason %d: %q", d.Reason, d.Message)
}
// See RFC 4253, section 7.1.
diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go
index 5775881c6a2e..955560bdae12 100644
--- a/vendor/golang.org/x/crypto/ssh/mux.go
+++ b/vendor/golang.org/x/crypto/ssh/mux.go
@@ -32,18 +32,21 @@ type chanList struct {
offset uint32
}
-// Assigns a channel ID to the given channel.
-func (c *chanList) add(ch *channel) uint32 {
+// add stores the given channel and assigns its localId while holding the
+// lock, so that getChan can never return a channel whose localId is not yet
+// initialized.
+func (c *chanList) add(ch *channel) {
c.Lock()
defer c.Unlock()
for i := range c.chans {
if c.chans[i] == nil {
c.chans[i] = ch
- return uint32(i) + c.offset
+ ch.localId = uint32(i) + c.offset
+ return
}
}
c.chans = append(c.chans, ch)
- return uint32(len(c.chans)-1) + c.offset
+ ch.localId = uint32(len(c.chans)-1) + c.offset
}
// getChan returns the channel for the given ID.
@@ -343,8 +346,6 @@ func (m *mux) OpenChannel(chanType string, extra []byte) (Channel, <-chan *Reque
func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) {
ch := m.newChannel(chanType, channelOutbound, extra)
- ch.maxIncomingPayload = channelMaxPacket
-
open := channelOpenMsg{
ChanType: chanType,
PeersWindow: ch.myWindow,
diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go
index 3c0fcc953eaa..e09026268264 100644
--- a/vendor/golang.org/x/crypto/ssh/server.go
+++ b/vendor/golang.org/x/crypto/ssh/server.go
@@ -26,10 +26,16 @@ type Permissions struct {
// defines "force-command" (only allow the given command to
// execute) and "source-address" (only allow connections from
// the given address). The SSH package currently only enforces
- // the "source-address" critical option. It is up to server
- // implementations to enforce other critical options, such as
- // "force-command", by checking them after the SSH handshake
- // is successful. In general, SSH servers should reject
+ // the "source-address" critical option: it is validated against
+ // the client's remote address whenever it is present in the
+ // Permissions returned by any authentication callback. Its value
+ // is a comma-separated list of IP addresses and CIDR blocks;
+ // consistently with OpenSSH, a connection whose remote address is
+ // not an IP address, such as a Unix domain socket, never matches
+ // the list and is rejected when the option is present. It is up
+ // to server implementations to enforce other critical options,
+ // such as "force-command", by checking them after the SSH
+ // handshake is successful. In general, SSH servers should reject
// connections that specify critical options that are unknown
// or not supported.
CriticalOptions map[string]string
@@ -223,7 +229,9 @@ type ServerConfig struct {
// Permissions object can be the same object, optionally modified, or a
// completely new object. If VerifiedPublicKeyCallback is non-nil,
// PublicKeyCallback is not allowed to return a PartialSuccessError, which
- // can instead be returned by VerifiedPublicKeyCallback.
+ // can instead be returned by VerifiedPublicKeyCallback. The
+ // signatureAlgorithm argument is the format of the signature that was
+ // successfully verified.
//
// VerifiedPublicKeyCallback does not affect which authentication methods
// are included in the list of methods that can be attempted by the client.
@@ -442,6 +450,10 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error)
return perms, err
}
+// checkSourceAddress matches addr against sourceAddrs, a comma-separated list
+// of IP addresses and CIDR blocks. Consistently with OpenSSH, a remote address
+// that is not IP-based, such as a Unix domain socket, never matches the list
+// and is rejected.
func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
if addr == nil {
return errors.New("ssh: no address known for client, but source-address match required")
@@ -449,7 +461,7 @@ func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
tcpAddr, ok := addr.(*net.TCPAddr)
if !ok {
- return fmt.Errorf("ssh: remote address %v is not an TCP address when checking source-address match", addr)
+ return fmt.Errorf("ssh: remote address %v is not a TCP address when checking source-address match", addr)
}
for _, sourceAddr := range strings.Split(sourceAddrs, ",") {
@@ -472,6 +484,21 @@ func checkSourceAddress(addr net.Addr, sourceAddrs string) error {
return fmt.Errorf("ssh: remote address %v is not allowed because of source-address restriction", addr)
}
+// checkSourceAddressCriticalOption enforces the source-address critical
+// option, if present in perms, as documented in Permissions.CriticalOptions.
+// A present but empty value matches no address, so it denies authentication,
+// consistently with OpenSSH, rather than being treated as absent.
+func checkSourceAddressCriticalOption(addr net.Addr, perms *Permissions) error {
+ if perms == nil {
+ return nil
+ }
+ saco, ok := perms.CriticalOptions[sourceAddressCriticalOption]
+ if !ok {
+ return nil
+ }
+ return checkSourceAddress(addr, saco)
+}
+
func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, token []byte, s *connection,
sessionID []byte, userAuthReq userAuthRequestMsg) (authErr error, perms *Permissions, err error) {
gssAPIServer := gssapiConfig.Server
@@ -685,7 +712,7 @@ userAuthLoop:
}
if userAuthReq.Service != serviceSSH {
- return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service)
+ return nil, fmt.Errorf("ssh: client attempted to negotiate for unknown service: %q", userAuthReq.Service)
}
if s.user != userAuthReq.User && partialSuccessReturned {
@@ -771,7 +798,8 @@ userAuthLoop:
pubKey, err := ParsePublicKey(pubKeyData)
if err != nil {
- return nil, err
+ authErr = err
+ break
}
candidate, ok := cache.get(s.user, pubKeyData)
@@ -784,13 +812,14 @@ userAuthLoop:
return nil, errors.New("ssh: invalid library usage: PublicKeyCallback must not return partial success when VerifiedPublicKeyCallback is defined")
}
- if (candidate.result == nil || isPartialSuccessError) &&
- candidate.perms != nil &&
- candidate.perms.CriticalOptions != nil &&
- candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" {
- if err := checkSourceAddress(
- s.RemoteAddr(),
- candidate.perms.CriticalOptions[sourceAddressCriticalOption]); err != nil {
+ // This check is authoritative for the Permissions returned by
+ // PublicKeyCallback: the check at the end of the auth loop sees
+ // the final Permissions, which VerifiedPublicKeyCallback may
+ // have replaced, and is skipped on partial success. It also
+ // makes public key queries fail before the client signs when
+ // PublicKeyCallback supplies the restriction.
+ if candidate.result == nil || isPartialSuccessError {
+ if err := checkSourceAddressCriticalOption(s.RemoteAddr(), candidate.perms); err != nil {
candidate.result = err
}
}
@@ -864,14 +893,7 @@ userAuthLoop:
// Only call VerifiedPublicKeyCallback after the key has been accepted
// and successfully verified. If authErr is non-nil, the key is not
// considered verified and the callback must not run.
- perms, authErr = config.VerifiedPublicKeyCallback(s, pubKey, perms, algo)
- }
- if authErr == nil && perms != nil && perms.CriticalOptions != nil {
- if saco := perms.CriticalOptions[sourceAddressCriticalOption]; saco != "" {
- if err := checkSourceAddress(s.RemoteAddr(), saco); err != nil {
- authErr = err
- }
- }
+ perms, authErr = config.VerifiedPublicKeyCallback(s, pubKey, perms, sig.Format)
}
}
case "gssapi-with-mic":
@@ -925,6 +947,17 @@ userAuthLoop:
authErr = fmt.Errorf("ssh: unknown method %q", userAuthReq.Method)
}
+ // The source-address critical option is enforced on the Permissions
+ // returned by any authentication callback. Permissions returned
+ // together with a PartialSuccessError skip this check: that is safe
+ // because they are required to be nil, as enforced in the partial
+ // success handling below.
+ if authErr == nil {
+ if err := checkSourceAddressCriticalOption(s.RemoteAddr(), perms); err != nil {
+ authErr = err
+ }
+ }
+
authErrs = append(authErrs, authErr)
if config.AuthLogCallback != nil {
diff --git a/vendor/golang.org/x/crypto/ssh/ssh_gss.go b/vendor/golang.org/x/crypto/ssh/ssh_gss.go
index a6249a1227b5..a7a099754f79 100644
--- a/vendor/golang.org/x/crypto/ssh/ssh_gss.go
+++ b/vendor/golang.org/x/crypto/ssh/ssh_gss.go
@@ -118,24 +118,28 @@ func parseGSSAPIPayload(payload []byte) (*userAuthRequestGSSAPI, error) {
OIDS: make([]asn1.ObjectIdentifier, n),
}
for i := 0; i < int(n); i++ {
- var (
- desiredMech []byte
- err error
- )
+ var desiredMech []byte
desiredMech, rest, ok = parseString(rest)
if !ok {
return nil, errors.New("parse string failed")
}
- if rest, err = asn1.Unmarshal(desiredMech, &s.OIDS[i]); err != nil {
+ trailing, err := asn1.Unmarshal(desiredMech, &s.OIDS[i])
+ if err != nil {
return nil, err
}
+ if len(trailing) != 0 {
+ return nil, errors.New("trailing bytes after OID")
+ }
+ }
+ if len(rest) != 0 {
+ return nil, errors.New("trailing bytes after mechanisms")
}
return s, nil
}
// See RFC 4462 section 3.6.
func buildMIC(sessionID string, username string, service string, authMethod string) []byte {
- out := make([]byte, 0, 0)
+ out := make([]byte, 0)
out = appendString(out, sessionID)
out = append(out, msgUserAuthRequest)
out = appendString(out, username)
diff --git a/vendor/golang.org/x/crypto/ssh/streamlocal.go b/vendor/golang.org/x/crypto/ssh/streamlocal.go
index 152470fcb796..8e997da3db66 100644
--- a/vendor/golang.org/x/crypto/ssh/streamlocal.go
+++ b/vendor/golang.org/x/crypto/ssh/streamlocal.go
@@ -58,6 +58,7 @@ func (c *Client) dialStreamLocal(socketPath string) (Channel, error) {
return nil, err
}
go DiscardRequests(in)
+ go io.Copy(io.Discard, ch.Stderr())
return ch, err
}
@@ -79,6 +80,7 @@ func (l *unixListener) Accept() (net.Conn, error) {
return nil, err
}
go DiscardRequests(incoming)
+ go io.Copy(io.Discard, ch.Stderr())
return &chanConn{
Channel: ch,
diff --git a/vendor/golang.org/x/crypto/ssh/tcpip.go b/vendor/golang.org/x/crypto/ssh/tcpip.go
index 78c41fe5a126..213d8a614a97 100644
--- a/vendor/golang.org/x/crypto/ssh/tcpip.go
+++ b/vendor/golang.org/x/crypto/ssh/tcpip.go
@@ -332,6 +332,7 @@ func (l *tcpListener) Accept() (net.Conn, error) {
return nil, err
}
go DiscardRequests(incoming)
+ go io.Copy(io.Discard, ch.Stderr())
return &chanConn{
Channel: ch,
@@ -495,6 +496,7 @@ func (c *Client) dial(laddr string, lport int, raddr string, rport int) (Channel
return nil, err
}
go DiscardRequests(in)
+ go io.Copy(io.Discard, ch.Stderr())
return ch, nil
}
diff --git a/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/golang.org/x/net/http2/hpack/encode.go
index 46219da2b01b..e6d0c265acf9 100644
--- a/vendor/golang.org/x/net/http2/hpack/encode.go
+++ b/vendor/golang.org/x/net/http2/hpack/encode.go
@@ -39,7 +39,6 @@ func NewEncoder(w io.Writer) *Encoder {
tableSizeUpdate: false,
w: w,
}
- e.dynTab.table.init()
e.dynTab.setMaxSize(initialHeaderTableSize)
return e
}
diff --git a/vendor/golang.org/x/net/http2/hpack/hpack.go b/vendor/golang.org/x/net/http2/hpack/hpack.go
index 7a1d976696a7..ecd3eeca99a8 100644
--- a/vendor/golang.org/x/net/http2/hpack/hpack.go
+++ b/vendor/golang.org/x/net/http2/hpack/hpack.go
@@ -105,7 +105,6 @@ func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decod
emitEnabled: true,
firstField: true,
}
- d.dynTab.table.init()
d.dynTab.allowedMaxSize = maxDynamicTableSize
d.dynTab.setMaxSize(maxDynamicTableSize)
return d
diff --git a/vendor/golang.org/x/net/http2/hpack/tables.go b/vendor/golang.org/x/net/http2/hpack/tables.go
index 8cbdf3f019cb..3bd7eb753322 100644
--- a/vendor/golang.org/x/net/http2/hpack/tables.go
+++ b/vendor/golang.org/x/net/http2/hpack/tables.go
@@ -31,10 +31,18 @@ type headerFieldTable struct {
// byName maps a HeaderField name to the unique id of the newest entry with
// the same name. See above for a definition of "unique id".
+ //
+ // byName and byNameValue are used only by search, which is only called
+ // for tables used by encoders. For tables used only by decoders, the
+ // maps are never built, as a memory optimization for servers with many
+ // mostly-idle connections, each pinning a dynamic table. The maps are
+ // built lazily by the first search call and are nil until then. The two
+ // maps are always both nil or both non-nil.
byName map[string]uint64
// byNameValue maps a HeaderField name/value pair to the unique id of the newest
// entry with the same name and value. See above for a definition of "unique id".
+ // See byName for when this map is non-nil.
byNameValue map[pairNameValue]uint64
}
@@ -42,9 +50,17 @@ type pairNameValue struct {
name, value string
}
-func (t *headerFieldTable) init() {
- t.byName = make(map[string]uint64)
- t.byNameValue = make(map[pairNameValue]uint64)
+// buildMaps initializes byName and byNameValue from ents.
+func (t *headerFieldTable) buildMaps() {
+ t.byName = make(map[string]uint64, len(t.ents))
+ t.byNameValue = make(map[pairNameValue]uint64, len(t.ents))
+ for k, f := range t.ents {
+ // Map to the newest matching entry: later (newer) entries
+ // overwrite earlier ones, matching addEntry's behavior.
+ id := t.evictCount + uint64(k) + 1
+ t.byName[f.Name] = id
+ t.byNameValue[pairNameValue{f.Name, f.Value}] = id
+ }
}
// len reports the number of entries in the table.
@@ -54,9 +70,11 @@ func (t *headerFieldTable) len() int {
// addEntry adds a new entry.
func (t *headerFieldTable) addEntry(f HeaderField) {
- id := uint64(t.len()) + t.evictCount + 1
- t.byName[f.Name] = id
- t.byNameValue[pairNameValue{f.Name, f.Value}] = id
+ if t.byName != nil {
+ id := uint64(t.len()) + t.evictCount + 1
+ t.byName[f.Name] = id
+ t.byNameValue[pairNameValue{f.Name, f.Value}] = id
+ }
t.ents = append(t.ents, f)
}
@@ -65,14 +83,16 @@ func (t *headerFieldTable) evictOldest(n int) {
if n > t.len() {
panic(fmt.Sprintf("evictOldest(%v) on table with %v entries", n, t.len()))
}
- for k := 0; k < n; k++ {
- f := t.ents[k]
- id := t.evictCount + uint64(k) + 1
- if t.byName[f.Name] == id {
- delete(t.byName, f.Name)
- }
- if p := (pairNameValue{f.Name, f.Value}); t.byNameValue[p] == id {
- delete(t.byNameValue, p)
+ if t.byName != nil {
+ for k := 0; k < n; k++ {
+ f := t.ents[k]
+ id := t.evictCount + uint64(k) + 1
+ if t.byName[f.Name] == id {
+ delete(t.byName, f.Name)
+ }
+ if p := (pairNameValue{f.Name, f.Value}); t.byNameValue[p] == id {
+ delete(t.byNameValue, p)
+ }
}
}
copy(t.ents, t.ents[n:])
@@ -100,6 +120,9 @@ func (t *headerFieldTable) evictOldest(n int) {
//
// See Section 2.3.3.
func (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) {
+ if t.byName == nil {
+ t.buildMaps()
+ }
if !f.Sensitive {
if id := t.byNameValue[pairNameValue{f.Name, f.Value}]; id != 0 {
return t.idToIndex(id), true
diff --git a/vendor/golang.org/x/net/http2/transport_wrap.go b/vendor/golang.org/x/net/http2/transport_wrap.go
index 534e77ab9635..741fb97062ee 100644
--- a/vendor/golang.org/x/net/http2/transport_wrap.go
+++ b/vendor/golang.org/x/net/http2/transport_wrap.go
@@ -237,32 +237,40 @@ type ClientConn struct {
}
func (cc *ClientConn) roundTrip(req *http.Request) (*http.Response, error) {
- err := func() error {
+ haveReservation, err := func() (bool, error) {
cc.mu.Lock()
defer cc.mu.Unlock()
if cc.doNotReuse {
- return errClientConnUnusable
- }
- cc.roundTrips++
- if cc.reserved > 0 {
- // We've already reserved a concurrency slot for this request.
- cc.reserved--
- } else if cc.cc.Reserve() != nil {
- // We don't seem to have an available concurrency slot,
- // so bump the pending count (requests waiting for a slot).
- cc.pending++
+ return false, errClientConnUnusable
}
+
// ClientConn.Shutdown will not shut down the conn while
// cc.starting > 0 or cc.cc.InFlight() > 0.
//
// The starting state covers the gap between us deciding to
// start sending the request, and actually sending it.
cc.starting++
- return nil
+
+ cc.roundTrips++
+ if cc.reserved == 0 {
+ // We do not have a concurrency slot reserved for this request.
+ return false, nil
+ }
+ cc.reserved--
+ return true, nil
}()
if err != nil {
return nil, err
}
+ // If we have no reservation, try to acquire one.
+ // (This must be done without cc.mu held, since Reserve may call back to the state hook.)
+ if !haveReservation && cc.cc.Reserve() != nil {
+ // We could not acquire a concurrency slot, so bump the pending count
+ // (requests waiting for a slot).
+ cc.mu.Lock()
+ cc.pending++
+ cc.mu.Unlock()
+ }
resp, err := cc.cc.RoundTrip(req)
cc.mu.Lock()
cc.starting--
@@ -293,16 +301,21 @@ func (cc *ClientConn) ping(ctx context.Context) error {
}
func (cc *ClientConn) reserveNewRequest() bool {
+ if err := cc.cc.Reserve(); err != nil {
+ return false
+ }
+ reserved := true
cc.mu.Lock()
- defer cc.mu.Unlock()
if cc.doNotReuse {
- return false
+ reserved = false
+ } else {
+ cc.reserved++
}
- if err := cc.cc.Reserve(); err != nil {
- return false
+ cc.mu.Unlock()
+ if !reserved {
+ cc.cc.Release()
}
- cc.reserved++
- return true
+ return reserved
}
func (cc *ClientConn) setDoNotReuse() {
diff --git a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go
index 239b10c4da03..1c482252da84 100644
--- a/vendor/golang.org/x/tools/go/ast/inspector/cursor.go
+++ b/vendor/golang.org/x/tools/go/ast/inspector/cursor.go
@@ -10,6 +10,7 @@ import (
"go/token"
"iter"
"reflect"
+ "strings"
"golang.org/x/tools/go/ast/edge"
)
@@ -110,6 +111,46 @@ func (c Cursor) String() string {
return reflect.TypeOf(c.Node()).String()
}
+// GoString returns a string describing the cursor's path from the
+// root, if any.
+func (c Cursor) GoString() string {
+ if !c.Valid() {
+ return "(invalid)"
+ }
+ if c.index < 0 {
+ return "(root)"
+ }
+ // e.g "File.Decls[1].(*ast.GenDecl).Specs[0].(*ast.TypeSpec)"
+ //
+ // In hindsight even the File node should have reported a
+ // virtual ParentEdge of (Root_Files, i) where i is the index
+ // among the files passed to NewInspector. Then the path would
+ // read "(root).Files[i]", etc; but we missed the boat.
+ var buf strings.Builder
+ buf.WriteString("File")
+ var visit func(Cursor)
+ visit = func(c Cursor) {
+ ek, idx := c.ParentEdge()
+ if ek == edge.Invalid {
+ return // File
+ }
+ visit(c.Parent())
+ fmt.Fprintf(&buf, ".%s", ek.FieldName())
+ if idx >= 0 {
+ fmt.Fprintf(&buf, "[%d]", idx)
+ }
+ ftype := ek.FieldType()
+ if idx >= 0 {
+ ftype = ftype.Elem() // []T -> T
+ }
+ if ftype.Kind() == reflect.Interface {
+ fmt.Fprintf(&buf, ".(%T)", c.Node())
+ }
+ }
+ visit(c)
+ return buf.String()
+}
+
// indices return the [start, end) half-open interval of event indices.
func (c Cursor) indices() (int32, int32) {
if c.index < 0 {
diff --git a/vendor/golang.org/x/tools/go/packages/visit.go b/vendor/golang.org/x/tools/go/packages/visit.go
index c546b1b63e36..06747a9df7fc 100644
--- a/vendor/golang.org/x/tools/go/packages/visit.go
+++ b/vendor/golang.org/x/tools/go/packages/visit.go
@@ -5,11 +5,11 @@
package packages
import (
- "cmp"
"fmt"
"iter"
"os"
- "slices"
+
+ "golang.org/x/tools/internal/moremaps"
)
// Visit visits all the packages in the import graph whose roots are
@@ -40,7 +40,7 @@ func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) {
seen[pkg] = true
if pre == nil || pre(pkg) {
- for _, imp := range sorted(pkg.Imports) { // for determinism
+ for _, imp := range moremaps.Sorted(pkg.Imports) { // for determinism
visit(imp)
}
}
@@ -88,7 +88,7 @@ func Postorder(pkgs []*Package) iter.Seq[*Package] {
visit = func(pkg *Package) bool {
if !seen[pkg] {
seen[pkg] = true
- for _, imp := range sorted(pkg.Imports) { // for determinism
+ for _, imp := range moremaps.Sorted(pkg.Imports) { // for determinism
if !visit(imp) {
return false
}
@@ -106,28 +106,3 @@ func Postorder(pkgs []*Package) iter.Seq[*Package] {
}
}
}
-
-// -- copied from golang.org.x/tools/gopls/internal/util/moremaps --
-
-// sorted returns an iterator over the entries of m in key order.
-func sorted[M ~map[K]V, K cmp.Ordered, V any](m M) iter.Seq2[K, V] {
- // TODO(adonovan): use maps.Sorted if proposal #68598 is accepted.
- return func(yield func(K, V) bool) {
- keys := keySlice(m)
- slices.Sort(keys)
- for _, k := range keys {
- if !yield(k, m[k]) {
- break
- }
- }
- }
-}
-
-// KeySlice returns the keys of the map M, like slices.Collect(maps.Keys(m)).
-func keySlice[M ~map[K]V, K comparable, V any](m M) []K {
- r := make([]K, 0, len(m))
- for k := range m {
- r = append(r, k)
- }
- return r
-}
diff --git a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
index 0d6d0bced0fa..9c7401c9ba51 100644
--- a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
+++ b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
@@ -30,6 +30,7 @@ import (
"slices"
"strconv"
"strings"
+ "sync"
"golang.org/x/tools/internal/typesinternal"
)
@@ -126,7 +127,8 @@ func For(obj types.Object) (Path, error) {
// An Encoder amortizes the cost of encoding the paths of multiple objects.
// The zero value of an Encoder is ready to use.
type Encoder struct {
- pkgIndex map[*types.Package]*pkgIndex
+ pkgIndexMu sync.Mutex
+ pkgIndex map[*types.Package]*pkgIndex
}
// A traversal encapsulates the state of a single traversal of the object/type graph.
@@ -191,6 +193,8 @@ type pkgIndex struct {
// For returns the path to an object relative to its package,
// or an error if the object is not accessible from the package's Scope.
//
+// For is safe for concurrent use.
+//
// The For function guarantees to return a path only for the following objects:
// - package-level types
// - exported package-level non-types
@@ -320,6 +324,9 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
panic(obj)
}
+ enc.pkgIndexMu.Lock()
+ defer enc.pkgIndexMu.Unlock()
+
// 4. Search the object/type graph for the path to
// the var (field/param/result) or method.
ix, ok := enc.pkgIndex[pkg]
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/callee.go b/vendor/golang.org/x/tools/go/types/typeutil/callee.go
deleted file mode 100644
index 3d24a8c63711..000000000000
--- a/vendor/golang.org/x/tools/go/types/typeutil/callee.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeutil
-
-import (
- "go/ast"
- "go/types"
- _ "unsafe" // for linkname
-)
-
-// Callee returns the named target of a function call, if any:
-// a function, method, builtin, or variable.
-// It returns nil for a T(x) conversion.
-//
-// Functions and methods may potentially have type parameters.
-//
-// Note: for calls of instantiated functions and methods, Callee returns
-// the corresponding generic function or method on the generic type.
-func Callee(info *types.Info, call *ast.CallExpr) types.Object {
- obj := info.Uses[usedIdent(info, call.Fun)]
- if obj == nil {
- return nil
- }
- if _, ok := obj.(*types.TypeName); ok {
- return nil
- }
- return obj
-}
-
-// StaticCallee returns the target (function or method) of a static function
-// call, if any. It returns nil for calls to builtins.
-//
-// Note: for calls of instantiated functions and methods, StaticCallee returns
-// the corresponding generic function or method on the generic type.
-func StaticCallee(info *types.Info, call *ast.CallExpr) *types.Func {
- obj := info.Uses[usedIdent(info, call.Fun)]
- fn, _ := obj.(*types.Func)
- if fn == nil || interfaceMethod(fn) {
- return nil
- }
- return fn
-}
-
-// usedIdent is the implementation of [internal/typesinternal.UsedIdent].
-// It returns the identifier associated with e.
-// See typesinternal.UsedIdent for a fuller description.
-// This function should live in typesinternal, but cannot because it would
-// create an import cycle.
-//
-//go:linkname usedIdent golang.org/x/tools/go/types/typeutil.usedIdent
-func usedIdent(info *types.Info, e ast.Expr) *ast.Ident {
- if info.Types == nil || info.Uses == nil {
- panic("one of info.Types or info.Uses is nil; both must be populated")
- }
- // Look through type instantiation if necessary.
- switch d := ast.Unparen(e).(type) {
- case *ast.IndexExpr:
- if info.Types[d.Index].IsType() {
- e = d.X
- }
- case *ast.IndexListExpr:
- e = d.X
- }
-
- switch e := ast.Unparen(e).(type) {
- // info.Uses always has the object we want, even for selector expressions.
- // We don't need info.Selections.
- // See go/types/recording.go:recordSelection.
- case *ast.Ident:
- return e
- case *ast.SelectorExpr:
- return e.Sel
- }
- return nil
-}
-
-// interfaceMethod reports whether its argument is a method of an interface.
-// This function should live in typesinternal, but cannot because it would create an import cycle.
-//
-//go:linkname interfaceMethod golang.org/x/tools/go/types/typeutil.interfaceMethod
-func interfaceMethod(f *types.Func) bool {
- recv := f.Signature().Recv()
- return recv != nil && types.IsInterface(recv.Type())
-}
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/imports.go b/vendor/golang.org/x/tools/go/types/typeutil/imports.go
deleted file mode 100644
index b81ce0c330f3..000000000000
--- a/vendor/golang.org/x/tools/go/types/typeutil/imports.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeutil
-
-import "go/types"
-
-// Dependencies returns all dependencies of the specified packages.
-//
-// Dependent packages appear in topological order: if package P imports
-// package Q, Q appears earlier than P in the result.
-// The algorithm follows import statements in the order they
-// appear in the source code, so the result is a total order.
-func Dependencies(pkgs ...*types.Package) []*types.Package {
- var result []*types.Package
- seen := make(map[*types.Package]bool)
- var visit func(pkgs []*types.Package)
- visit = func(pkgs []*types.Package) {
- for _, p := range pkgs {
- if !seen[p] {
- seen[p] = true
- visit(p.Imports())
- result = append(result, p)
- }
- }
- }
- visit(pkgs)
- return result
-}
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/map.go b/vendor/golang.org/x/tools/go/types/typeutil/map.go
deleted file mode 100644
index 36624572a663..000000000000
--- a/vendor/golang.org/x/tools/go/types/typeutil/map.go
+++ /dev/null
@@ -1,459 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package typeutil defines various utilities for types, such as [Map],
-// a hash table that maps [types.Type] to any value.
-package typeutil
-
-import (
- "bytes"
- "fmt"
- "go/types"
- "hash/maphash"
-
- "golang.org/x/tools/internal/typeparams"
-)
-
-// Map is a hash-table-based mapping from types (types.Type) to
-// arbitrary values. The concrete types that implement
-// the Type interface are pointers. Since they are not canonicalized,
-// == cannot be used to check for equivalence, and thus we cannot
-// simply use a Go map.
-//
-// Just as with map[K]V, a nil *Map is a valid empty map.
-//
-// Read-only map operations ([Map.At], [Map.Len], and so on) may
-// safely be called concurrently.
-//
-// TODO(adonovan): deprecate in favor of https://go.dev/issues/69420
-// and 69559, if the latter proposals for a generic hash-map type and
-// a types.Hash function are accepted.
-type Map struct {
- table map[uint32][]entry // maps hash to bucket; entry.key==nil means unused
- length int // number of map entries
-}
-
-// entry is an entry (key/value association) in a hash bucket.
-type entry struct {
- key types.Type
- value any
-}
-
-// SetHasher has no effect.
-//
-// It is a relic of an optimization that is no longer profitable. Do
-// not use [Hasher], [MakeHasher], or [SetHasher] in new code.
-func (m *Map) SetHasher(Hasher) {}
-
-// Delete removes the entry with the given key, if any.
-// It returns true if the entry was found.
-func (m *Map) Delete(key types.Type) bool {
- if m != nil && m.table != nil {
- hash := hash(key)
- bucket := m.table[hash]
- for i, e := range bucket {
- if e.key != nil && types.Identical(key, e.key) {
- // We can't compact the bucket as it
- // would disturb iterators.
- bucket[i] = entry{}
- m.length--
- return true
- }
- }
- }
- return false
-}
-
-// At returns the map entry for the given key.
-// The result is nil if the entry is not present.
-func (m *Map) At(key types.Type) any {
- if m != nil && m.table != nil {
- for _, e := range m.table[hash(key)] {
- if e.key != nil && types.Identical(key, e.key) {
- return e.value
- }
- }
- }
- return nil
-}
-
-// Set sets the map entry for key to val,
-// and returns the previous entry, if any.
-func (m *Map) Set(key types.Type, value any) (prev any) {
- if m.table != nil {
- hash := hash(key)
- bucket := m.table[hash]
- var hole *entry
- for i, e := range bucket {
- if e.key == nil {
- hole = &bucket[i]
- } else if types.Identical(key, e.key) {
- prev = e.value
- bucket[i].value = value
- return
- }
- }
-
- if hole != nil {
- *hole = entry{key, value} // overwrite deleted entry
- } else {
- m.table[hash] = append(bucket, entry{key, value})
- }
- } else {
- hash := hash(key)
- m.table = map[uint32][]entry{hash: {entry{key, value}}}
- }
-
- m.length++
- return
-}
-
-// Len returns the number of map entries.
-func (m *Map) Len() int {
- if m != nil {
- return m.length
- }
- return 0
-}
-
-// Iterate calls function f on each entry in the map in unspecified order.
-//
-// If f should mutate the map, Iterate provides the same guarantees as
-// Go maps: if f deletes a map entry that Iterate has not yet reached,
-// f will not be invoked for it, but if f inserts a map entry that
-// Iterate has not yet reached, whether or not f will be invoked for
-// it is unspecified.
-func (m *Map) Iterate(f func(key types.Type, value any)) {
- if m != nil {
- for _, bucket := range m.table {
- for _, e := range bucket {
- if e.key != nil {
- f(e.key, e.value)
- }
- }
- }
- }
-}
-
-// Keys returns a new slice containing the set of map keys.
-// The order is unspecified.
-func (m *Map) Keys() []types.Type {
- keys := make([]types.Type, 0, m.Len())
- m.Iterate(func(key types.Type, _ any) {
- keys = append(keys, key)
- })
- return keys
-}
-
-func (m *Map) toString(values bool) string {
- if m == nil {
- return "{}"
- }
- var buf bytes.Buffer
- fmt.Fprint(&buf, "{")
- sep := ""
- m.Iterate(func(key types.Type, value any) {
- fmt.Fprint(&buf, sep)
- sep = ", "
- fmt.Fprint(&buf, key)
- if values {
- fmt.Fprintf(&buf, ": %q", value)
- }
- })
- fmt.Fprint(&buf, "}")
- return buf.String()
-}
-
-// String returns a string representation of the map's entries.
-// Values are printed using fmt.Sprintf("%v", v).
-// Order is unspecified.
-func (m *Map) String() string {
- return m.toString(true)
-}
-
-// KeysString returns a string representation of the map's key set.
-// Order is unspecified.
-func (m *Map) KeysString() string {
- return m.toString(false)
-}
-
-// -- Hasher --
-
-// hash returns the hash of type t.
-// TODO(adonovan): replace by types.Hash when Go proposal #69420 is accepted.
-func hash(t types.Type) uint32 {
- return theHasher.Hash(t)
-}
-
-// A Hasher provides a [Hasher.Hash] method to map a type to its hash value.
-// Hashers are stateless, and all are equivalent.
-type Hasher struct{}
-
-var theHasher Hasher
-
-// MakeHasher returns Hasher{}.
-// Hashers are stateless; all are equivalent.
-func MakeHasher() Hasher { return theHasher }
-
-// Hash computes a hash value for the given type t such that
-// Identical(t, t') => Hash(t) == Hash(t').
-func (h Hasher) Hash(t types.Type) uint32 {
- return hasher{inGenericSig: false}.hash(t)
-}
-
-// hasher holds the state of a single Hash traversal: whether we are
-// inside the signature of a generic function; this is used to
-// optimize [hasher.hashTypeParam].
-type hasher struct{ inGenericSig bool }
-
-// hashString computes the Fowler–Noll–Vo hash of s.
-func hashString(s string) uint32 {
- var h uint32
- for i := 0; i < len(s); i++ {
- h ^= uint32(s[i])
- h *= 16777619
- }
- return h
-}
-
-// hash computes the hash of t.
-func (h hasher) hash(t types.Type) uint32 {
- // See Identical for rationale.
- switch t := t.(type) {
- case *types.Basic:
- return uint32(t.Kind())
-
- case *types.Alias:
- return h.hash(types.Unalias(t))
-
- case *types.Array:
- return 9043 + 2*uint32(t.Len()) + 3*h.hash(t.Elem())
-
- case *types.Slice:
- return 9049 + 2*h.hash(t.Elem())
-
- case *types.Struct:
- var hash uint32 = 9059
- for i, n := 0, t.NumFields(); i < n; i++ {
- f := t.Field(i)
- if f.Anonymous() {
- hash += 8861
- }
- hash += hashString(t.Tag(i))
- hash += hashString(f.Name()) // (ignore f.Pkg)
- hash += h.hash(f.Type())
- }
- return hash
-
- case *types.Pointer:
- return 9067 + 2*h.hash(t.Elem())
-
- case *types.Signature:
- var hash uint32 = 9091
- if t.Variadic() {
- hash *= 8863
- }
-
- tparams := t.TypeParams()
- if n := tparams.Len(); n > 0 {
- h.inGenericSig = true // affects constraints, params, and results
-
- for i := range n {
- tparam := tparams.At(i)
- hash += 7 * h.hash(tparam.Constraint())
- }
- }
-
- return hash + 3*h.hashTuple(t.Params()) + 5*h.hashTuple(t.Results())
-
- case *types.Union:
- return h.hashUnion(t)
-
- case *types.Interface:
- // Interfaces are identical if they have the same set of methods, with
- // identical names and types, and they have the same set of type
- // restrictions. See go/types.identical for more details.
- var hash uint32 = 9103
-
- // Hash methods.
- for i, n := 0, t.NumMethods(); i < n; i++ {
- // Method order is not significant.
- // Ignore m.Pkg().
- m := t.Method(i)
- // Use shallow hash on method signature to
- // avoid anonymous interface cycles.
- hash += 3*hashString(m.Name()) + 5*h.shallowHash(m.Type())
- }
-
- // Hash type restrictions.
- terms, err := typeparams.InterfaceTermSet(t)
- // if err != nil t has invalid type restrictions.
- if err == nil {
- hash += h.hashTermSet(terms)
- }
-
- return hash
-
- case *types.Map:
- return 9109 + 2*h.hash(t.Key()) + 3*h.hash(t.Elem())
-
- case *types.Chan:
- return 9127 + 2*uint32(t.Dir()) + 3*h.hash(t.Elem())
-
- case *types.Named:
- hash := h.hashTypeName(t.Obj())
- targs := t.TypeArgs()
- for targ := range targs.Types() {
- hash += 2 * h.hash(targ)
- }
- return hash
-
- case *types.TypeParam:
- return h.hashTypeParam(t)
-
- case *types.Tuple:
- return h.hashTuple(t)
- }
-
- panic(fmt.Sprintf("%T: %v", t, t))
-}
-
-func (h hasher) hashTuple(tuple *types.Tuple) uint32 {
- // See go/types.identicalTypes for rationale.
- n := tuple.Len()
- hash := 9137 + 2*uint32(n)
- for i := range n {
- hash += 3 * h.hash(tuple.At(i).Type())
- }
- return hash
-}
-
-func (h hasher) hashUnion(t *types.Union) uint32 {
- // Hash type restrictions.
- terms, err := typeparams.UnionTermSet(t)
- // if err != nil t has invalid type restrictions. Fall back on a non-zero
- // hash.
- if err != nil {
- return 9151
- }
- return h.hashTermSet(terms)
-}
-
-func (h hasher) hashTermSet(terms []*types.Term) uint32 {
- hash := 9157 + 2*uint32(len(terms))
- for _, term := range terms {
- // term order is not significant.
- termHash := h.hash(term.Type())
- if term.Tilde() {
- termHash *= 9161
- }
- hash += 3 * termHash
- }
- return hash
-}
-
-// hashTypeParam returns the hash of a type parameter.
-func (h hasher) hashTypeParam(t *types.TypeParam) uint32 {
- // Within the signature of a generic function, TypeParams are
- // identical if they have the same index and constraint, so we
- // hash them based on index.
- //
- // When we are outside a generic function, free TypeParams are
- // identical iff they are the same object, so we can use a
- // more discriminating hash consistent with object identity.
- // This optimization saves [Map] about 4% when hashing all the
- // types.Info.Types in the forward closure of net/http.
- if !h.inGenericSig {
- // Optimization: outside a generic function signature,
- // use a more discrimating hash consistent with object identity.
- return h.hashTypeName(t.Obj())
- }
- return 9173 + 3*uint32(t.Index())
-}
-
-var theSeed = maphash.MakeSeed()
-
-// hashTypeName hashes the pointer of tname.
-func (hasher) hashTypeName(tname *types.TypeName) uint32 {
- // Since types.Identical uses == to compare TypeNames,
- // the Hash function uses maphash.Comparable.
- hash := maphash.Comparable(theSeed, tname)
- return uint32(hash ^ (hash >> 32))
-}
-
-// shallowHash computes a hash of t without looking at any of its
-// element Types, to avoid potential anonymous cycles in the types of
-// interface methods.
-//
-// When an unnamed non-empty interface type appears anywhere among the
-// arguments or results of an interface method, there is a potential
-// for endless recursion. Consider:
-//
-// type X interface { m() []*interface { X } }
-//
-// The problem is that the Methods of the interface in m's result type
-// include m itself; there is no mention of the named type X that
-// might help us break the cycle.
-// (See comment in go/types.identical, case *Interface, for more.)
-func (h hasher) shallowHash(t types.Type) uint32 {
- // t is the type of an interface method (Signature),
- // its params or results (Tuples), or their immediate
- // elements (mostly Slice, Pointer, Basic, Named),
- // so there's no need to optimize anything else.
- switch t := t.(type) {
- case *types.Alias:
- return h.shallowHash(types.Unalias(t))
-
- case *types.Signature:
- var hash uint32 = 604171
- if t.Variadic() {
- hash *= 971767
- }
- // The Signature/Tuple recursion is always finite
- // and invariably shallow.
- return hash + 1062599*h.shallowHash(t.Params()) + 1282529*h.shallowHash(t.Results())
-
- case *types.Tuple:
- n := t.Len()
- hash := 9137 + 2*uint32(n)
- for i := range n {
- hash += 53471161 * h.shallowHash(t.At(i).Type())
- }
- return hash
-
- case *types.Basic:
- return 45212177 * uint32(t.Kind())
-
- case *types.Array:
- return 1524181 + 2*uint32(t.Len())
-
- case *types.Slice:
- return 2690201
-
- case *types.Struct:
- return 3326489
-
- case *types.Pointer:
- return 4393139
-
- case *types.Union:
- return 562448657
-
- case *types.Interface:
- return 2124679 // no recursion here
-
- case *types.Map:
- return 9109
-
- case *types.Chan:
- return 9127
-
- case *types.Named:
- return h.hashTypeName(t.Obj())
-
- case *types.TypeParam:
- return h.hashTypeParam(t)
- }
- panic(fmt.Sprintf("shallowHash: %T: %v", t, t))
-}
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go b/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go
deleted file mode 100644
index f7666028fe5d..000000000000
--- a/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file implements a cache of method sets.
-
-package typeutil
-
-import (
- "go/types"
- "sync"
-)
-
-// A MethodSetCache records the method set of each type T for which
-// MethodSet(T) is called so that repeat queries are fast.
-// The zero value is a ready-to-use cache instance.
-type MethodSetCache struct {
- mu sync.Mutex
- named map[*types.Named]struct{ value, pointer *types.MethodSet } // method sets for named N and *N
- others map[types.Type]*types.MethodSet // all other types
-}
-
-// MethodSet returns the method set of type T. It is thread-safe.
-//
-// If cache is nil, this function is equivalent to types.NewMethodSet(T).
-// Utility functions can thus expose an optional *MethodSetCache
-// parameter to clients that care about performance.
-func (cache *MethodSetCache) MethodSet(T types.Type) *types.MethodSet {
- if cache == nil {
- return types.NewMethodSet(T)
- }
- cache.mu.Lock()
- defer cache.mu.Unlock()
-
- switch T := types.Unalias(T).(type) {
- case *types.Named:
- return cache.lookupNamed(T).value
-
- case *types.Pointer:
- if N, ok := types.Unalias(T.Elem()).(*types.Named); ok {
- return cache.lookupNamed(N).pointer
- }
- }
-
- // all other types
- // (The map uses pointer equivalence, not type identity.)
- mset := cache.others[T]
- if mset == nil {
- mset = types.NewMethodSet(T)
- if cache.others == nil {
- cache.others = make(map[types.Type]*types.MethodSet)
- }
- cache.others[T] = mset
- }
- return mset
-}
-
-func (cache *MethodSetCache) lookupNamed(named *types.Named) struct{ value, pointer *types.MethodSet } {
- if cache.named == nil {
- cache.named = make(map[*types.Named]struct{ value, pointer *types.MethodSet })
- }
- // Avoid recomputing mset(*T) for each distinct Pointer
- // instance whose underlying type is a named type.
- msets, ok := cache.named[named]
- if !ok {
- msets.value = types.NewMethodSet(named)
- msets.pointer = types.NewMethodSet(types.NewPointer(named))
- cache.named[named] = msets
- }
- return msets
-}
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/ui.go b/vendor/golang.org/x/tools/go/types/typeutil/ui.go
deleted file mode 100644
index 9dda6a25df79..000000000000
--- a/vendor/golang.org/x/tools/go/types/typeutil/ui.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeutil
-
-// This file defines utilities for user interfaces that display types.
-
-import (
- "go/types"
-)
-
-// IntuitiveMethodSet returns the intuitive method set of a type T,
-// which is the set of methods you can call on an addressable value of
-// that type.
-//
-// The result always contains MethodSet(T), and is exactly MethodSet(T)
-// for interface types and for pointer-to-concrete types.
-// For all other concrete types T, the result additionally
-// contains each method belonging to *T if there is no identically
-// named method on T itself.
-//
-// This corresponds to user intuition about method sets;
-// this function is intended only for user interfaces.
-//
-// The order of the result is as for types.MethodSet(T).
-func IntuitiveMethodSet(T types.Type, msets *MethodSetCache) []*types.Selection {
- isPointerToConcrete := func(T types.Type) bool {
- ptr, ok := types.Unalias(T).(*types.Pointer)
- return ok && !types.IsInterface(ptr.Elem())
- }
-
- var result []*types.Selection
- mset := msets.MethodSet(T)
- if types.IsInterface(T) || isPointerToConcrete(T) {
- for i, n := 0, mset.Len(); i < n; i++ {
- result = append(result, mset.At(i))
- }
- } else {
- // T is some other concrete type.
- // Report methods of T and *T, preferring those of T.
- pmset := msets.MethodSet(types.NewPointer(T))
- for i, n := 0, pmset.Len(); i < n; i++ {
- meth := pmset.At(i)
- if m := mset.Lookup(meth.Obj().Pkg(), meth.Obj().Name()); m != nil {
- meth = m
- }
- result = append(result, meth)
- }
-
- }
- return result
-}
diff --git a/vendor/golang.org/x/tools/internal/moremaps/maps.go b/vendor/golang.org/x/tools/internal/moremaps/maps.go
new file mode 100644
index 000000000000..a1bae078b18f
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/moremaps/maps.go
@@ -0,0 +1,116 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package moremaps contains more functions for working with maps.
+package moremaps
+
+import (
+ "cmp"
+ "iter"
+ "maps"
+ "slices"
+)
+
+// Arbitrary returns an arbitrary (key, value) entry from the map and ok is true, if
+// the map is not empty. Otherwise, it returns zero values for K and V, and false.
+func Arbitrary[K comparable, V any](m map[K]V) (_ K, _ V, ok bool) {
+ for k, v := range m {
+ return k, v, true
+ }
+ return
+}
+
+// Group returns a new non-nil map containing the elements of s grouped by the
+// keys returned from the key func.
+func Group[K comparable, V any](s []V, key func(V) K) map[K][]V {
+ m := make(map[K][]V)
+ for _, v := range s {
+ k := key(v)
+ m[k] = append(m[k], v)
+ }
+ return m
+}
+
+// KeySlice returns the keys of the map M, like slices.Collect(maps.Keys(m)).
+func KeySlice[M ~map[K]V, K comparable, V any](m M) []K {
+ r := make([]K, 0, len(m))
+ for k := range m {
+ r = append(r, k)
+ }
+ return r
+}
+
+// ValueSlice returns the values of the map M, like slices.Collect(maps.Values(m)).
+func ValueSlice[M ~map[K]V, K comparable, V any](m M) []V {
+ r := make([]V, 0, len(m))
+ for _, v := range m {
+ r = append(r, v)
+ }
+ return r
+}
+
+// SameKeys reports whether x and y have equal sets of keys.
+func SameKeys[K comparable, V1, V2 any](x map[K]V1, y map[K]V2) bool {
+ ignoreValues := func(V1, V2) bool { return true }
+ return maps.EqualFunc(x, y, ignoreValues)
+}
+
+// Sorted returns an iterator over the entries of m in key order.
+func Sorted[M ~map[K]V, K cmp.Ordered, V any](m M) iter.Seq2[K, V] {
+ // TODO(adonovan): use maps.Sorted if proposal #68598 is accepted.
+ return func(yield func(K, V) bool) {
+ keys := KeySlice(m)
+ slices.Sort(keys)
+ for _, k := range keys {
+ if !yield(k, m[k]) {
+ break
+ }
+ }
+ }
+}
+
+// SortedFunc returns an iterator over the entries of m in the key order determined by cmp.
+func SortedFunc[M ~map[K]V, K comparable, V any](m M, cmp func(x, y K) int) iter.Seq2[K, V] {
+ // TODO(adonovan): use maps.SortedFunc if proposal #68598 is accepted.
+ return func(yield func(K, V) bool) {
+ keys := KeySlice(m)
+ slices.SortFunc(keys, cmp)
+ for _, k := range keys {
+ if !yield(k, m[k]) {
+ break
+ }
+ }
+ }
+}
+
+// Delete is like delete(m, k) but reports whether deletion occurred.
+func Delete[M ~map[K]V, K comparable, V any](m M, k K) bool {
+ pre := len(m)
+ delete(m, k)
+ return pre != len(m)
+}
+
+// Entry is a key-value pair obtained from a map.
+type Entry[K comparable, V any] struct {
+ Key K
+ Value V
+}
+
+// Entries returns a new unordered array of the entries of a map.
+func Entries[M ~map[K]V, K comparable, V any](m M) []Entry[K, V] {
+ entries := make([]Entry[K, V], 0, len(m))
+ for k, v := range m {
+ entries = append(entries, Entry[K, V]{k, v})
+ }
+ return entries
+}
+
+// FromEntries returns a new map into which the entries have been inserted in order.
+func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V {
+ m := make(map[K]V, len(entries))
+ for _, e := range entries {
+ m[e.Key] = e.Value
+ }
+ return m
+}
diff --git a/vendor/golang.org/x/tools/internal/stdlib/deps.go b/vendor/golang.org/x/tools/internal/stdlib/deps.go
index 0f73c719cd11..b049e5f9775b 100644
--- a/vendor/golang.org/x/tools/internal/stdlib/deps.go
+++ b/vendor/golang.org/x/tools/internal/stdlib/deps.go
@@ -12,386 +12,387 @@ type pkginfo struct {
}
var deps = [...]pkginfo{
- {"archive/tar", "\x03{\x03F>\x01\n\x01&\x01\x01\x02\x05\b\x02\x01\x02\x02\r"},
- {"archive/zip", "\x02\x04j\x0e\x03\x12\x022>\x01-\x05\x01\x0f\x03\x02\x0f\x04"},
- {"bufio", "\x03{\x87\x01F\x15"},
- {"bytes", "~*]\x03\fJ\x02\x02"},
+ {"archive/tar", "\x03|\x03F>\x01\n\x01&\x01\x01\x02\x05\b\x02\x01\x02\x02\r"},
+ {"archive/zip", "\x02\x04k\x0e\x03\x12\x022>\x01-\x05\x01\x0f\x03\x02\x0f\x04"},
+ {"bufio", "\x03|\x87\x01F\x15"},
+ {"bytes", "\x7f*]\x03\fJ\x02\x02"},
{"cmp", ""},
- {"compress/bzip2", "\x02\x02\x81\x02C"},
- {"compress/flate", "\x02|\x03\x84\x01\f\x034\x02\x03"},
- {"compress/gzip", "\x02\x04j\x0e\x03\x14pW"},
- {"compress/lzw", "\x02|\x03\x84\x01"},
- {"compress/zlib", "\x02\x04j\x0e\x03\x12\x01q"},
- {"container/heap", "\xc9\x02"},
+ {"compress/bzip2", "\x02\x02\x82\x02C"},
+ {"compress/flate", "\x02}\x03\x84\x01\f\x034\x02\x03"},
+ {"compress/gzip", "\x02\x04k\x0e\x03\x14pW"},
+ {"compress/lzw", "\x02}\x03\x84\x01"},
+ {"compress/zlib", "\x02\x04k\x0e\x03\x12\x01q"},
+ {"container/heap", "\xca\x02"},
{"container/list", ""},
{"container/ring", ""},
- {"context", "~]r\x01\x0e"},
- {"crypto", "\x93\x01rE"},
- {"crypto/aes", "\x10\v\n\xa5\x02"},
- {"crypto/cipher", "\x03\"\x01\x01 \x13$+\\"},
- {"crypto/des", "\x10\x17 7+\xa1\x01\x03"},
- {"crypto/dsa", "G\x034\x87\x01\r"},
- {"crypto/ecdh", "\x03\v\r\x11\x04\x17\x03\x10$\x87\x01"},
- {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x11\b\v\x06\x01\x03\x0f\x01$\x87\x01\r\x05O\x01"},
- {"crypto/ed25519", "\x0e \x12\a\x03\t\a$I>E"},
- {"crypto/elliptic", "5I\x87\x01\r;"},
- {"crypto/fips140", "$\x05\x9e\x01\x9b\x01"},
- {"crypto/hkdf", "1\x15\x017\x15"},
- {"crypto/hmac", "\x1b\x17\x14\x01\x139"},
- {"crypto/hpke", "\x03\v\x02\x03\x04\x01\r\x01\x05\x1f\x06\a\x01\x01%\x03\x12\x16\x9f\x01\x1d"},
- {"crypto/internal/boring", "\x0e\x02\x0eu"},
- {"crypto/internal/boring/bbig", "\x1b\xf7\x01P"},
- {"crypto/internal/boring/bcache", "\xce\x02\x14"},
+ {"context", "\x7f]r\x01\x0e"},
+ {"crypto", "\x94\x01rE"},
+ {"crypto/aes", "\x10\v\v\xa5\x02"},
+ {"crypto/cipher", "\x03#\x01\x01 \x13$+\\"},
+ {"crypto/des", "\x10\x18 7+\xa1\x01\x03"},
+ {"crypto/dsa", "H\x034\x87\x01\r"},
+ {"crypto/ecdh", "\x03\v\r\x12\x04\x17\x03\x10$\x87\x01"},
+ {"crypto/ecdsa", "\x0e\x05\x03\x05\x01\x12\b\v\x06\x01\x03\x0f\x01$\x87\x01\r\x05O\x01"},
+ {"crypto/ed25519", "\x0e!\x12\a\x03\t\a$I>E"},
+ {"crypto/elliptic", "6I\x87\x01\r;"},
+ {"crypto/fips140", "%\x05\x9e\x01\x9b\x01"},
+ {"crypto/hkdf", "2\x15\x017\x15"},
+ {"crypto/hmac", "\x1b\x18\x14\x01\x139"},
+ {"crypto/hpke", "\x03\v\x02\x03\x04\x01\x0e\x01\x05\x1f\x06\a\x01\x01%\x03\x12\x16\x9f\x01\x1d"},
+ {"crypto/internal/boring", "\x0e\x02\x0ev"},
+ {"crypto/internal/boring/bbig", "\x1b\xf8\x01P"},
+ {"crypto/internal/boring/bcache", "\xcf\x02\x14"},
{"crypto/internal/boring/sig", ""},
{"crypto/internal/constanttime", ""},
- {"crypto/internal/cryptotest", "\x03\r\v\t%\x11\x1a\r\x12\x12!\x04\x06\n\x19\x01\x11\x11\x1d\x01\a\x03\x02\b\x02\x01\x05\f"},
- {"crypto/internal/cryptotest/wycheproof", "\x0e\x12S\x01\f\x01r@\x05\x03\x15\x10"},
- {"crypto/internal/entropy", "L"},
- {"crypto/internal/entropy/v1.0.0", "E9\x96\x01:\x14"},
- {"crypto/internal/fips140", "D:\xc2\x01\v\x17"},
- {"crypto/internal/fips140/aes", "\x03!\x03\x02\x14\x05\x01\x01\x055\x96\x016"},
- {"crypto/internal/fips140/aes/gcm", "$\x01\x02\x02\x02\x12\x05\x01\x065\x93\x01"},
- {"crypto/internal/fips140/alias", "\xe2\x02"},
- {"crypto/internal/fips140/bigmod", ")\x19\x01\x065\x96\x01"},
- {"crypto/internal/fips140/check", "$\x0e\a\t\x02\xc1\x01]"},
- {"crypto/internal/fips140/check/checktest", ")\x97\x02\""},
- {"crypto/internal/fips140/drbg", "\x03 \x01\x01\x04\x14\x05\n2\x87\x01\x0f9\x01"},
- {"crypto/internal/fips140/ecdh", "\x03!\x05\x02\n\r<\x87\x01\x0f9"},
- {"crypto/internal/fips140/ecdsa", "\x03!\x04\x01\x02\a\x03\x06C\x15r\x0f9"},
- {"crypto/internal/fips140/ed25519", "\x03!\x05\x02\x04\fC\xcc\x01\x03"},
- {"crypto/internal/fips140/edwards25519", "\x1f\n\a\x12<\x96\x019"},
- {"crypto/internal/fips140/edwards25519/field", ")\x14\x05<\x96\x01"},
- {"crypto/internal/fips140/hkdf", "\x03!\x05\t\aE\x15"},
- {"crypto/internal/fips140/hmac", "\x03!\x15\x01\x01C\x15"},
- {"crypto/internal/fips140/mldsa", "\x03\x1c\x05\x05\x02\x0e\x01\x03\x05<\x96\x019"},
- {"crypto/internal/fips140/mlkem", "\x03!\x05\x02\x0f\x03\x05<\xcf\x01"},
- {"crypto/internal/fips140/nistec", "\x1f\n\r\f<\x96\x01,\r\x15"},
- {"crypto/internal/fips140/nistec/fiat", ")\x14A\x96\x01"},
- {"crypto/internal/fips140/pbkdf2", "\x03!\x05\t\aE\x15"},
- {"crypto/internal/fips140/rsa", "\x03\x1c\x05\x04\x01\x02\x0e\x01\x01\x02A\x15rH"},
- {"crypto/internal/fips140/sha256", "\x03!\x1e\x01\x065\x15\x81\x01"},
- {"crypto/internal/fips140/sha3", "\x03!\x19\x05\x01;\x96\x01N"},
- {"crypto/internal/fips140/sha512", "\x03!\x1e\x01\x065\x15\x81\x01"},
- {"crypto/internal/fips140/ssh", ")j"},
- {"crypto/internal/fips140/subtle", "\x1f\b\x1b\xd2\x01"},
- {"crypto/internal/fips140/tls12", "\x03!\x05\t\a\x02C\x15"},
- {"crypto/internal/fips140/tls13", "\x03!\x05\b\b\t<\x15"},
- {"crypto/internal/fips140cache", "\xc0\x02\r."},
+ {"crypto/internal/cryptotest", "\x03\r\v\n%\x11\x1a\r\x12\x12!\x04\x06\n\x19\x01\x11\x11\x1d\x01\a\x03\x02\b\x02\x01\x05\f"},
+ {"crypto/internal/cryptotest/wycheproof", "\x0e\x12T\x01\f\x01r@\x05\x03\x15\x10"},
+ {"crypto/internal/cryptotest/x509limbo", "u\n\x03\xba\x01\x03\x1e"},
+ {"crypto/internal/entropy", "M"},
+ {"crypto/internal/entropy/v1.0.0", "F9\x96\x01:\x14"},
+ {"crypto/internal/fips140", "E:\xc2\x01\v\x17"},
+ {"crypto/internal/fips140/aes", "\x03\"\x03\x02\x14\x05\x01\x01\x055\x96\x016"},
+ {"crypto/internal/fips140/aes/gcm", "%\x01\x02\x02\x02\x12\x05\x01\x065\x93\x01"},
+ {"crypto/internal/fips140/alias", "\xe3\x02"},
+ {"crypto/internal/fips140/bigmod", "*\x19\x01\x065\x96\x01"},
+ {"crypto/internal/fips140/check", "%\x0e\a\t\x02\xc1\x01]"},
+ {"crypto/internal/fips140/check/checktest", "*\x97\x02\""},
+ {"crypto/internal/fips140/drbg", "\x03!\x01\x01\x04\x14\x05\n2\x87\x01\x0f9\x01"},
+ {"crypto/internal/fips140/ecdh", "\x03\"\x05\x02\n\r<\x87\x01\x0f9"},
+ {"crypto/internal/fips140/ecdsa", "\x03\"\x04\x01\x02\a\x03\x06C\x15r\x0f9"},
+ {"crypto/internal/fips140/ed25519", "\x03\"\x05\x02\x04\fC\xcc\x01\x03"},
+ {"crypto/internal/fips140/edwards25519", "\x1f\v\a\x12<\x96\x019"},
+ {"crypto/internal/fips140/edwards25519/field", "*\x14\x05<\x96\x01"},
+ {"crypto/internal/fips140/hkdf", "\x03\"\x05\t\aE\x15"},
+ {"crypto/internal/fips140/hmac", "\x03\"\x15\x01\x01C\x15"},
+ {"crypto/internal/fips140/mldsa", "\x03\x1c\x06\x05\x02\x0e\x01\x03\x05<\x96\x019"},
+ {"crypto/internal/fips140/mlkem", "\x03\"\x05\x02\x0f\x03\x05<\xcf\x01"},
+ {"crypto/internal/fips140/nistec", "\x1f\v\r\f<\x96\x01,\r\x15"},
+ {"crypto/internal/fips140/nistec/fiat", "*\x14A\x96\x01"},
+ {"crypto/internal/fips140/pbkdf2", "\x03\"\x05\t\aE\x15"},
+ {"crypto/internal/fips140/rsa", "\x03\x1c\x06\x04\x01\x02\x0e\x01\x01\x02A\x15rH"},
+ {"crypto/internal/fips140/sha256", "\x03\"\x1e\x01\x065\x15\x81\x01"},
+ {"crypto/internal/fips140/sha3", "\x03\"\x19\x05\x01;\x96\x01N"},
+ {"crypto/internal/fips140/sha512", "\x03\"\x1e\x01\x065\x15\x81\x01"},
+ {"crypto/internal/fips140/ssh", "*j"},
+ {"crypto/internal/fips140/subtle", "\x1f\t\x1b\xd2\x01"},
+ {"crypto/internal/fips140/tls12", "\x03\"\x05\t\a\x02C\x15"},
+ {"crypto/internal/fips140/tls13", "\x03\"\x05\b\b\t<\x15"},
+ {"crypto/internal/fips140cache", "\xc1\x02\r."},
{"crypto/internal/fips140deps", ""},
- {"crypto/internal/fips140deps/byteorder", "\xa9\x01"},
- {"crypto/internal/fips140deps/cpu", "\xbe\x01\b"},
- {"crypto/internal/fips140deps/godebug", "\xc7\x01"},
- {"crypto/internal/fips140deps/time", "\xe2\x02"},
- {"crypto/internal/fips140hash", ":\x1e;\xcf\x01"},
- {"crypto/internal/fips140only", "\x17\x14\x0e\x01\x01Xr"},
+ {"crypto/internal/fips140deps/byteorder", "\xaa\x01"},
+ {"crypto/internal/fips140deps/cpu", "\xbf\x01\b"},
+ {"crypto/internal/fips140deps/godebug", "\xc8\x01"},
+ {"crypto/internal/fips140deps/time", "\xe3\x02"},
+ {"crypto/internal/fips140hash", ";\x1e;\xcf\x01"},
+ {"crypto/internal/fips140only", "\x17\x15\x0e\x01\x01Xr"},
{"crypto/internal/fips140test", ""},
- {"crypto/internal/impl", "\xcb\x02"},
- {"crypto/internal/rand", "\x1b\x10 |>]"},
- {"crypto/internal/randutil", "\x85\x02\x12"},
- {"crypto/internal/sysrand", "~r!\"\r\r\x01\x01\r\x06"},
- {"crypto/internal/sysrand/internal/seccomp", "~"},
- {"crypto/md5", "\x0e97\x15\x16k"},
- {"crypto/mldsa", "\x0e%K\x87\x01"},
- {"crypto/mlkem", "\x0e&"},
- {"crypto/mlkem/mlkemtest", "4\x13\t."},
- {"crypto/pbkdf2", "7\x0f\x017\x15"},
- {"crypto/rand", "\x1b\x10\x1c\x034\x87\x01\rP"},
- {"crypto/rc4", "' 7\xcc\x01"},
- {"crypto/rsa", "\x0e\r\x01\f\x10\x0e\x01\x03\t\a$\x03\x124>\f\x01"},
- {"crypto/sha1", "\x0e\r,\x025\x15\x16\x15V"},
- {"crypto/sha256", "\x0e\r\x1eZ"},
- {"crypto/sha3", "\x0e,Y\xcf\x01"},
- {"crypto/sha512", "\x0e\r X"},
- {"crypto/subtle", "\x1f\x1e\xa9\x01|"},
- {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\n\x01\x18\x01\x0f\x01\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x1f\x02\x03\x12\x16\x15\t>\x16\x18\r\b\x01\x01\x01\x02\x01\x0e\x06\x03\x01\x15"},
- {"crypto/tls/internal/fips140tls", "\x17\xb7\x02"},
- {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x01\x017\x01\x06\x01\x01\x02\x05\x0f\x06\t\x02\x03F\x03;\x01\x02\b\x01\x01\x02\a\x12\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x04\x01"},
- {"crypto/x509/pkix", "m\x06\x0e\x91\x019\x11"},
- {"database/sql", "\x03\nS\x01\x1d\x03\x84\x01\v\a$\x05\b\x02\x03\x01\x0e\x02\x02\x02\x01"},
- {"database/sql/driver", "\rT\x1d\x03\xba\x01\x0f\x12\a"},
+ {"crypto/internal/impl", "\xcc\x02"},
+ {"crypto/internal/rand", "\x1b\x11 |>]"},
+ {"crypto/internal/randutil", "\x86\x02\x12"},
+ {"crypto/internal/sysrand", "\x7fr!\"\r\r\x01\x01\r\x06"},
+ {"crypto/internal/sysrand/internal/seccomp", "\x7f"},
+ {"crypto/md5", "\x0e:7\x15\x16k"},
+ {"crypto/mldsa", "\x0e&K\x87\x01"},
+ {"crypto/mlkem", "\x0e'"},
+ {"crypto/mlkem/mlkemtest", "5\x13\t."},
+ {"crypto/pbkdf2", "8\x0f\x017\x15"},
+ {"crypto/rand", "\x1b\x11\x1c\x034\x87\x01\rP"},
+ {"crypto/rc4", "( 7\xcc\x01"},
+ {"crypto/rsa", "\x0e\r\x01\r\x10\x0e\x01\x03\t\a$\x03\x124>\f\x01"},
+ {"crypto/sha1", "\x0e\r-\x025\x15\x16\x15V"},
+ {"crypto/sha256", "\x0e\r\x1fZ"},
+ {"crypto/sha3", "\x0e-Y\xcf\x01"},
+ {"crypto/sha512", "\x0e\r!X"},
+ {"crypto/subtle", "\x1f\x1f\xa9\x01|"},
+ {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\v\x01\x18\x01\x0f\x01\x01\x03\x01\x01\x01\x01\x02\x01\x02\x01\x1f\x02\x03\x12\x16\x15\t>\x16\x18\r\b\x01\x01\x01\x02\x01\x0e\x06\x03\x01\x15"},
+ {"crypto/tls/internal/fips140tls", "\x17\xb8\x02"},
+ {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x01\x018\x01\x06\x01\x01\x02\x05\x0f\x06\t\x02\x03F\x03;\x01\x02\b\x01\x01\x02\a\x12\x05\x01\x06\a\b\x02\x01\x02\x0f\x02\x01\x01\x02\x04\x01"},
+ {"crypto/x509/pkix", "n\x06\x0e\x91\x019\x11"},
+ {"database/sql", "\x03\nT\x01\x1d\x03\x84\x01\v\a$\x05\b\x02\x03\x01\x0e\x02\x02\x02\x01"},
+ {"database/sql/driver", "\rU\x1d\x03\xba\x01\x0f\x12\a"},
{"database/sql/internal", ""},
- {"debug/buildinfo", "\x03a\x02\x01\x01\b\x0e\x03h\x1a\x02\x01-\x0f "},
- {"debug/dwarf", "\x03m\x0e\x03\x84\x013\x11\x01\x01"},
- {"debug/elf", "\x03\x06Z\r\x0e\x03h\x1b\x01\f\"\x17\x01\x17"},
- {"debug/gosym", "\x03m\x11#\xa5\x01\x01\x01\x02"},
- {"debug/macho", "\x03\x06Z\r\x11h\x1c.\x17\x01"},
- {"debug/pe", "\x03\x06Z\r\x0e\x03h\x1c.\x17\x01\x17"},
- {"debug/plan9obj", "p\x0e\x03h\x1c."},
- {"embed", "~*D\x19\x01V"},
+ {"debug/buildinfo", "\x03b\x02\x01\x01\b\x0e\x03h\x1a\x02\x01-\x0f "},
+ {"debug/dwarf", "\x03n\x0e\x03\x84\x013\x11\x01\x01"},
+ {"debug/elf", "\x03\x06[\r\x0e\x03h\x1b\x01\f\"\x17\x01\x17"},
+ {"debug/gosym", "\x03n\x11#\xa5\x01\x01\x01\x02"},
+ {"debug/macho", "\x03\x06[\r\x11h\x1c.\x17\x01"},
+ {"debug/pe", "\x03\x06[\r\x0e\x03h\x1c.\x17\x01\x17"},
+ {"debug/plan9obj", "q\x0e\x03h\x1c."},
+ {"embed", "\x7f*D\x19\x01V"},
{"embed/internal/embedtest", ""},
{"encoding", ""},
- {"encoding/ascii85", "\x85\x02E"},
- {"encoding/asn1", "\x03{\x03h(\x01)\r\x02\x01\x11\x03\x01"},
- {"encoding/base32", "\x85\x02C\x02"},
- {"encoding/base64", "\xa9\x01\\C\x02"},
- {"encoding/binary", "~\x87\x01\f*\r\x05"},
- {"encoding/csv", "\x02\x01{\x03\x84\x01F\x13\x02"},
- {"encoding/gob", "\x02i\x05\x0e\x03h\x1c\v\x01\x03\x1f\b\x12\x01\x10\x02"},
- {"encoding/hex", "~\x03\x84\x01C\x03"},
- {"encoding/json", "\x03\x01g\n\x01\x01\x02\x01\x01\x03\x03\x84\x016\x0f\x01"},
- {"encoding/json/internal", "~"},
- {"encoding/json/internal/jsonflags", "u"},
- {"encoding/json/internal/jsonopts", "u\x01"},
- {"encoding/json/internal/jsontest", "\x03f\x15\x03\x83\x01\x01\x012\b\b\x03\x02\x0f"},
- {"encoding/json/internal/jsonwire", "\x04r\b\x87\x01\f7\x02\x01\x13\x01\x01"},
- {"encoding/json/jsontext", "\x03r\x01\x01\x02\x05\x87\x01\x03\t\x034\x02\x01\x02\x13"},
- {"encoding/json/v2", "\x03\x01g\x03\x01\x01\x03\x02\x01\x01\x02\x01\x04\x03\x84\x01\f\x03'\r\x02\x01\x02\x0f\x02\x02"},
- {"encoding/pem", "\x03l\x0f\x87\x01C\x03"},
- {"encoding/xml", "\x02\x01h\x13\x03\x84\x016\x05\n\x01\x02\x11\x02"},
- {"errors", "\xdb\x01\x87\x01"},
- {"expvar", "tSB\b\v\x17\r\b\x02\x03\x01\x12"},
- {"flag", "k\x13\x03\x84\x01.\b\x05\b\x02\x01\x11"},
- {"fmt", "~E)\x19\f\"\b\r\x02\x03\x13"},
- {"go/ast", "\x03\x01}\x0e\x01u\x03+\b\r\x02\x01\x13\x02"},
- {"go/build", "\x02\x01{\x03\x01\x02\x02\a\x02\x01\x17 \x04\x02\t\x1c\x13\x01-\x01\x04\x01\a\b\x02\x01\x13\x02\x02"},
- {"go/build/constraint", "~\xcc\x01\x01\x13\x02"},
- {"go/constant", "\x81\x01\x0f\x81\x01\x01\x026\x01\x02\x13"},
- {"go/doc", "\x04}\x01\x05\t>73\x10\x02\x01\x13\x02"},
- {"go/doc/comment", "\x03~\xc7\x01\x01\x01\x01\x13\x02"},
- {"go/format", "\x03~\x01\v\x01\x02uF"},
- {"go/importer", "\x83\x01\a\x01\x01\x04\x01t;"},
- {"go/internal/gccgoimporter", "\x02\x01a\x1a\x03\x04\v\x01r\x02.\x01\x05\x11\x01\r\b"},
- {"go/internal/gcimporter", "\x02\x7f\x0f\x010\x140.\x15\x03\x02"},
- {"go/internal/srcimporter", "\x81\x01\x01\x01\n\x03\x01t.\x01\x05\x12\x02\x15"},
- {"go/parser", "\x03{\x03\x01\x02\v\x01u\x01-\x06\x12"},
- {"go/printer", "\x81\x01\x01\x02\x03\tu\f\"\x15\x02\x01\x02\f\x05\x02"},
- {"go/scanner", "\x03~\x0fu4\x10\x01\x14\x02"},
- {"go/token", "\x04}\x87\x01@\x02\x03\x01\x10\x02"},
- {"go/types", "\x03\x01\x06t\x03\x01\x03\b\x03\x02\x0654\x04\x03\t\"\x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"},
- {"go/version", "\xcc\x01\x7f"},
- {"hash", "\x85\x02"},
- {"hash/adler32", "~\x15\x16"},
- {"hash/crc32", "~\x15\x16\x15\x8f\x01\x01\x14"},
- {"hash/crc64", "~\x15\x16\xa4\x01"},
- {"hash/fnv", "~\x15\x16k"},
- {"hash/maphash", "\x93\x01\x11>\x80\x01"},
- {"html", "\xcb\x02\x02\x13"},
- {"html/template", "\x03q\r\x18.>\x01\n#\x05\x01\x02\x03\n\x02\x01\x02\r\x01\x03\x02"},
- {"image", "\x02|\x1ei\x0f6\x03\x01"},
+ {"encoding/ascii85", "\x86\x02E"},
+ {"encoding/asn1", "\x03|\x03h(\x01)\r\x02\x01\x11\x03\x01"},
+ {"encoding/base32", "\x86\x02C\x02"},
+ {"encoding/base64", "\xaa\x01\\C\x02"},
+ {"encoding/binary", "\x7f\x87\x01\f*\r\x05"},
+ {"encoding/csv", "\x02\x01|\x03\x84\x01F\x13\x02"},
+ {"encoding/gob", "\x02j\x05\x0e\x03h\x1c\v\x01\x03\x1f\b\x12\x01\x10\x02"},
+ {"encoding/hex", "\x7f\x03\x84\x01C\x03"},
+ {"encoding/json", "\x03\x01h\n\x01\x01\x02\x01\x01\x03\x03\x84\x016\x0f\x01"},
+ {"encoding/json/internal", "\x7f"},
+ {"encoding/json/internal/jsonflags", "v"},
+ {"encoding/json/internal/jsonopts", "v\x01"},
+ {"encoding/json/internal/jsontest", "\x03g\x15\x03\x83\x01\x01\x012\b\b\x03\x02\x0f"},
+ {"encoding/json/internal/jsonwire", "\x04s\b\x87\x01\f7\x02\x01\x13\x01\x01"},
+ {"encoding/json/jsontext", "\x03s\x01\x01\x02\x05\x87\x01\x03\t\x034\x02\x01\x02\x13"},
+ {"encoding/json/v2", "\x03\x01h\x03\x01\x01\x03\x02\x01\x01\x02\x01\x04\x03\x84\x01\f\x03'\r\x02\x01\x02\x0f\x02\x02"},
+ {"encoding/pem", "\x03m\x0f\x87\x01C\x03"},
+ {"encoding/xml", "\x02\x01i\x13\x03\x84\x016\x05\n\x01\x02\x11\x02"},
+ {"errors", "\xdc\x01\x87\x01"},
+ {"expvar", "uSB\b\v\x17\r\b\x02\x03\x01\x12"},
+ {"flag", "l\x13\x03\x84\x01.\b\x05\b\x02\x01\x11"},
+ {"fmt", "\x7fE)\x19\f\"\b\r\x02\x03\x13"},
+ {"go/ast", "\x03\x01~\x0e\x01u\x03+\b\r\x02\x01\x13\x02"},
+ {"go/build", "\x02\x01|\x03\x01\x02\x02\a\x02\x01\x17 \x04\x02\t\x1c\x13\x01-\x01\x04\x01\a\b\x02\x01\x13\x02\x02"},
+ {"go/build/constraint", "\x7f\xcc\x01\x01\x13\x02"},
+ {"go/constant", "\x82\x01\x0f\x81\x01\x01\x026\x01\x02\x13"},
+ {"go/doc", "\x04~\x01\x05\t>73\x10\x02\x01\x13\x02"},
+ {"go/doc/comment", "\x03\x7f\xc7\x01\x01\x01\x01\x13\x02"},
+ {"go/format", "\x03\x7f\x01\v\x01\x02uF"},
+ {"go/importer", "\x84\x01\a\x01\x01\x04\x01t;"},
+ {"go/internal/gccgoimporter", "\x02\x01b\x1a\x03\x04\v\x01r\x02.\x01\x05\x11\x01\r\b"},
+ {"go/internal/gcimporter", "\x02\x80\x01\x0f\x010\x140.\x15\x03\x02"},
+ {"go/internal/srcimporter", "\x82\x01\x01\x01\n\x03\x01t.\x01\x05\x12\x02\x15"},
+ {"go/parser", "\x03|\x03\x01\x02\v\x01u\x01-\x06\x12"},
+ {"go/printer", "\x82\x01\x01\x02\x03\tu\f\"\x15\x02\x01\x02\f\x05\x02"},
+ {"go/scanner", "\x03\x7f\x0fu4\x10\x01\x14\x02"},
+ {"go/token", "\x04~\x87\x01@\x02\x03\x01\x10\x02"},
+ {"go/types", "\x03\x01\x06u\x03\x01\x03\b\x03\x02\x0654\x04\x03\t\"\x06\a\b\x01\x01\x01\x02\x01\x10\x02\x02"},
+ {"go/version", "\xcd\x01\x7f"},
+ {"hash", "\x86\x02"},
+ {"hash/adler32", "\x7f\x15\x16"},
+ {"hash/crc32", "\x7f\x15\x16\x15\x8f\x01\x01\x14"},
+ {"hash/crc64", "\x7f\x15\x16\xa4\x01"},
+ {"hash/fnv", "\x7f\x15\x16k"},
+ {"hash/maphash", "\x94\x01\x11>\x80\x01"},
+ {"html", "\xcc\x02\x02\x13"},
+ {"html/template", "\x03r\r\x18.>\x01\n#\x05\x01\x02\x03\n\x02\x01\x02\r\x01\x03\x02"},
+ {"image", "\x02}\x1ei\x0f6\x03\x01"},
{"image/color", ""},
- {"image/color/palette", "\x9c\x01"},
- {"image/draw", "\x9b\x01\x01\x04"},
- {"image/gif", "\x02\x01\x05v\x03\x1a\x01\x01\x01\v\\\x0f"},
- {"image/internal/imageutil", "\x9b\x01"},
- {"image/jpeg", "\x02|\x1d\x01\x04e"},
- {"image/png", "\x02\ag\x11\x12\x02\x06\x01iE"},
- {"index/suffixarray", "\x03m\x0e\x87\x01\f-\n\x01"},
- {"internal/abi", "\xc6\x01\x9c\x01"},
- {"internal/asan", "\xe2\x02"},
- {"internal/bisect", "\xc0\x02\r\x01"},
- {"internal/buildcfg", "\x81\x01Hj\x06\x02\x05\n\x01"},
- {"internal/bytealg", "\xbe\x01\xa4\x01"},
+ {"image/color/palette", "\x9d\x01"},
+ {"image/draw", "\x9c\x01\x01\x04"},
+ {"image/gif", "\x02\x01\x05w\x03\x1a\x01\x01\x01\v\\\x0f"},
+ {"image/internal/imageutil", "\x9c\x01"},
+ {"image/jpeg", "\x02}\x1d\x01\x04e"},
+ {"image/png", "\x02\ah\x11\x12\x02\x06\x01iE"},
+ {"index/suffixarray", "\x03n\x0e\x87\x01\f-\n\x01"},
+ {"internal/abi", "\xc7\x01\x9c\x01"},
+ {"internal/asan", "\xe3\x02"},
+ {"internal/bisect", "\xc1\x02\r\x01"},
+ {"internal/buildcfg", "\x82\x01Hj\x06\x02\x05\n\x01"},
+ {"internal/bytealg", "\xbf\x01\xa4\x01"},
{"internal/byteorder", ""},
{"internal/cfg", ""},
- {"internal/cgrouptest", "\x81\x01\\V\x06\x0f\x02\x01\x04\x01"},
- {"internal/chacha8rand", "\xa9\x01\x15\b\x9c\x01"},
+ {"internal/cgrouptest", "\x82\x01\\V\x06\x0f\x02\x01\x04\x01"},
+ {"internal/chacha8rand", "\xaa\x01\x15\b\x9c\x01"},
{"internal/copyright", ""},
{"internal/coverage", ""},
{"internal/coverage/calloc", ""},
- {"internal/coverage/cfile", "t\r\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01$\x02'.\x06\a\n\x01\x03\x0e\x06"},
- {"internal/coverage/cformat", "\x04}-\x04S\v8\x01\x02\x0e"},
- {"internal/coverage/cmerge", "\x81\x01-c"},
- {"internal/coverage/decodecounter", "p\x11-\v\x02J.\x17\x18"},
- {"internal/coverage/decodemeta", "\x02n\x11\x16\x17\v\x02J."},
- {"internal/coverage/encodecounter", "\x02n\x11-\f\x01\x02H\v#\x15"},
- {"internal/coverage/encodemeta", "\x02\x01m\x11\x12\x04\x17\r\x02H./"},
- {"internal/coverage/pods", "\x04}-\x85\x01\x06\x05\n\x02\x01"},
- {"internal/coverage/rtcov", "\xe2\x02"},
- {"internal/coverage/slicereader", "p\x11\x84\x01]"},
- {"internal/coverage/slicewriter", "\x81\x01\x84\x01"},
- {"internal/coverage/stringtab", "\x81\x018\x04H"},
+ {"internal/coverage/cfile", "u\r\x16\x17\x01\x02\x01\x01\x01\x01\x01\x01\x01$\x02'.\x06\a\n\x01\x03\x0e\x06"},
+ {"internal/coverage/cformat", "\x04~-\x04S\v8\x01\x02\x0e"},
+ {"internal/coverage/cmerge", "\x82\x01-c"},
+ {"internal/coverage/decodecounter", "q\x11-\v\x02J.\x17\x18"},
+ {"internal/coverage/decodemeta", "\x02o\x11\x16\x17\v\x02J."},
+ {"internal/coverage/encodecounter", "\x02o\x11-\f\x01\x02H\v#\x15"},
+ {"internal/coverage/encodemeta", "\x02\x01n\x11\x12\x04\x17\r\x02H./"},
+ {"internal/coverage/pods", "\x04~-\x85\x01\x06\x05\n\x02\x01"},
+ {"internal/coverage/rtcov", "\xe3\x02"},
+ {"internal/coverage/slicereader", "q\x11\x84\x01]"},
+ {"internal/coverage/slicewriter", "\x82\x01\x84\x01"},
+ {"internal/coverage/stringtab", "\x82\x018\x04H"},
{"internal/coverage/test", ""},
{"internal/coverage/uleb128", ""},
- {"internal/cpu", "\xe2\x02"},
- {"internal/dag", "\x04}\xc7\x01\x03"},
- {"internal/diff", "\x03~\xc8\x01\x02"},
- {"internal/exportdata", "\x02\x01{\x03\x02f\x1c.\x01\x05\x11\x01\x02"},
- {"internal/filepathlite", "~*D\x1aB"},
- {"internal/fmtsort", "\x04\xb7\x02\r"},
- {"internal/fuzz", "\x03\nJ\x19\x04\n\x03\x01\v\x037>\f\x03\x1f\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"},
+ {"internal/cpu", "\xe3\x02"},
+ {"internal/dag", "\x04~\xc7\x01\x03"},
+ {"internal/diff", "\x03\x7f\xc8\x01\x02"},
+ {"internal/exportdata", "\x02\x01|\x03\x02f\x1c.\x01\x05\x11\x01\x02"},
+ {"internal/filepathlite", "\x7f*D\x1aB"},
+ {"internal/fmtsort", "\x04\xb8\x02\r"},
+ {"internal/fuzz", "\x03\nK\x19\x04\n\x03\x01\v\x037>\f\x03\x1f\x01\x05\x02\x05\n\x01\x02\x01\x01\r\x04\x02"},
{"internal/gate", "\r"},
{"internal/goarch", ""},
- {"internal/godebug", "\xa6\x01\"\x85\x01\x01\x14"},
+ {"internal/godebug", "\xa7\x01\"\x85\x01\x01\x14"},
{"internal/godebugs", ""},
{"internal/goexperiment", ""},
{"internal/goos", ""},
- {"internal/goroot", "\xb3\x02\x01\x05\x12\x02"},
+ {"internal/goroot", "\xb4\x02\x01\x05\x12\x02"},
{"internal/gover", "\x04"},
{"internal/goversion", ""},
- {"internal/lazyregexp", "\xb3\x02\v\r\x02"},
- {"internal/lazytemplate", "\x85\x02.\x18\x02\r"},
- {"internal/msan", "\xe2\x02"},
- {"internal/nettest", "\x03\nqG@\f\n\x12\x06\x15\x05\x0f"},
+ {"internal/lazyregexp", "\xb4\x02\v\r\x02"},
+ {"internal/lazytemplate", "\x86\x02.\x18\x02\r"},
+ {"internal/msan", "\xe3\x02"},
+ {"internal/nettest", "\x03\nrG@\f\n\x12\x06\x15\x05\x0f"},
{"internal/nettrace", ""},
- {"internal/obscuretestdata", "o\x96\x01."},
- {"internal/oserror", "~"},
- {"internal/pkgbits", "\x03T\x19\x0e\x03\x04\vu\r!\r\n\x01"},
+ {"internal/obscuretestdata", "p\x96\x01."},
+ {"internal/oserror", "\x7f"},
+ {"internal/pkgbits", "\x03U\x19\x0e\x03\x04\vu\r!\r\n\x01"},
{"internal/platform", ""},
- {"internal/poll", "~m\x05\x15;\r\x01\x01\r\x06"},
- {"internal/profile", "\x03\x04w\x03\x84\x019\n\x01\x01\x01\x11"},
+ {"internal/poll", "\x7fm\x05\x15;\r\x01\x01\r\x06"},
+ {"internal/profile", "\x03\x04x\x03\x84\x019\n\x01\x01\x01\x11"},
{"internal/profilerecord", ""},
- {"internal/race", "\xa4\x01\xbe\x01"},
- {"internal/reflectlite", "\xa4\x01\"<>\""},
- {"internal/runtime/atomic", "\xc6\x01\x9c\x01"},
- {"internal/runtime/cgroup", "\xa8\x01?\x04w"},
- {"internal/runtime/exithook", "\xdc\x01\x86\x01"},
- {"internal/runtime/gc", "\xc6\x01"},
- {"internal/runtime/gc/internal/gen", "\nf\x11\x17m\x04\v\x1f\b\x10\x02"},
- {"internal/runtime/gc/scan", "\xbe\x01\b\x19\a|"},
- {"internal/runtime/maps", "\xa4\x01\x01\x04\x15\b\x03\a\n\t\x03.N"},
- {"internal/runtime/math", "\xc6\x01"},
+ {"internal/race", "\xa5\x01\xbe\x01"},
+ {"internal/reflectlite", "\xa5\x01\"<>\""},
+ {"internal/runtime/atomic", "\xc7\x01\x9c\x01"},
+ {"internal/runtime/cgroup", "\xa9\x01?\x04w"},
+ {"internal/runtime/exithook", "\xdd\x01\x86\x01"},
+ {"internal/runtime/gc", "\xc7\x01"},
+ {"internal/runtime/gc/internal/gen", "\ng\x11\x17m\x04\v\x1f\b\x10\x02"},
+ {"internal/runtime/gc/scan", "\xbf\x01\b\x19\a|"},
+ {"internal/runtime/maps", "\xa5\x01\x01\x04\x15\b\x03\a\n\t\x03.N"},
+ {"internal/runtime/math", "\xc7\x01"},
{"internal/runtime/pprof/label", ""},
{"internal/runtime/startlinetest", ""},
- {"internal/runtime/sys", "\xc6\x01\x04"},
- {"internal/runtime/syscall/linux", "\xc6\x01\x9c\x01"},
+ {"internal/runtime/sys", "\xc7\x01\x04"},
+ {"internal/runtime/syscall/linux", "\xc7\x01\x9c\x01"},
{"internal/runtime/wasitest", ""},
- {"internal/saferio", "\x85\x02]"},
- {"internal/singleflight", "\xcd\x02"},
- {"internal/strconv", "\x94\x02N"},
- {"internal/stringslite", "\xa8\x01\xba\x01"},
- {"internal/sync", "\xa4\x01\"\x14t\x14"},
- {"internal/synctest", "\xa4\x01\xbe\x01"},
- {"internal/syscall/execenv", "\xcf\x02"},
- {"internal/syscall/unix", "\xeb\x01U\x0e\x01\x13"},
- {"internal/sysinfo", "\x02\x01\xbb\x01G.\x18\x02"},
+ {"internal/saferio", "\x86\x02]"},
+ {"internal/singleflight", "\xce\x02"},
+ {"internal/strconv", "\x95\x02N"},
+ {"internal/stringslite", "\xa9\x01\xba\x01"},
+ {"internal/sync", "\xa5\x01\"\x14t\x14"},
+ {"internal/synctest", "\xa5\x01\xbe\x01"},
+ {"internal/syscall/execenv", "\xd0\x02"},
+ {"internal/syscall/unix", "\xec\x01U\x0e\x01\x13"},
+ {"internal/sysinfo", "\x02\x01\xbc\x01G.\x18\x02"},
{"internal/syslist", ""},
- {"internal/testenv", "\x03\nq\x02\x01)\x1c\x100-\x01\x05\a\n\x01\x02\x02\x01\f"},
- {"internal/testhash", "\x03\x90\x01r\x11:\f"},
- {"internal/testlog", "\xcd\x02\x01\x14"},
- {"internal/testpty", "~\x03\xb2\x01"},
- {"internal/trace", "\x02\x01\x01\x06f\x0e\x03x\x03\x03\x06\x03\t-\n\x01\x01\x01\x11\x06"},
- {"internal/trace/internal/testgen", "\x03m\x11v\x03\x02\x03\x013\v\r\x11"},
- {"internal/trace/internal/tracev1", "\x03\x01l\x0e\x03~\x06\f7\x01"},
- {"internal/trace/raw", "\x02n\x11{\x03\x06E\x01\x13"},
- {"internal/trace/testtrace", "\x02\x01{\x03r\x04\x03\x05\x01\x05.\v\x02\b\x02\x01\x05"},
+ {"internal/testenv", "\x03\nr\x02\x01)\x1c\x100-\x01\x05\a\n\x01\x02\x02\x01\f"},
+ {"internal/testhash", "\x03\x91\x01r\x11:\f"},
+ {"internal/testlog", "\xce\x02\x01\x14"},
+ {"internal/testpty", "\x7f\x03\xb2\x01"},
+ {"internal/trace", "\x02\x01\x01\x06g\x0e\x03x\x03\x03\x06\x03\t-\n\x01\x01\x01\x11\x06"},
+ {"internal/trace/internal/testgen", "\x03n\x11v\x03\x02\x03\x013\v\r\x11"},
+ {"internal/trace/internal/tracev1", "\x03\x01m\x0e\x03~\x06\f7\x01"},
+ {"internal/trace/raw", "\x02o\x11{\x03\x06E\x01\x13"},
+ {"internal/trace/testtrace", "\x02\x01|\x03r\x04\x03\x05\x01\x05.\v\x02\b\x02\x01\x05"},
{"internal/trace/tracev2", ""},
- {"internal/trace/traceviewer", "\x02g\v\r\x19>\x1f\a\a\x04\b\v\x17\x01\x05\a\n\x01\x02\x0f"},
+ {"internal/trace/traceviewer", "\x02h\v\r\x19>\x1f\a\a\x04\b\v\x17\x01\x05\a\n\x01\x02\x0f"},
{"internal/trace/traceviewer/format", ""},
- {"internal/trace/version", "\x81\x01{\t"},
- {"internal/txtar", "\x03~\xb2\x01\x18"},
- {"internal/types/errors", "\xca\x02"},
- {"internal/unsafeheader", "\xe2\x02"},
- {"internal/xcoff", "c\r\x0e\x03h\x1c.\x17\x01"},
- {"internal/zstd", "p\x0e\x03\x84\x01\x0f"},
- {"io", "~\xcf\x01"},
- {"io/fs", "~*,13\x10\x14\x04"},
- {"io/ioutil", "\x85\x02\x01-\x15\x03"},
- {"iter", "\xda\x01f\""},
- {"log", "\x81\x01\x84\x01\x05)\r\r\x01\x0e"},
+ {"internal/trace/version", "\x82\x01{\t"},
+ {"internal/txtar", "\x03\x7f\xb2\x01\x18"},
+ {"internal/types/errors", "\xcb\x02"},
+ {"internal/unsafeheader", "\xe3\x02"},
+ {"internal/xcoff", "d\r\x0e\x03h\x1c.\x17\x01"},
+ {"internal/zstd", "q\x0e\x03\x84\x01\x0f"},
+ {"io", "\x7f\xcf\x01"},
+ {"io/fs", "\x7f*,13\x10\x14\x04"},
+ {"io/ioutil", "\x86\x02\x01-\x15\x03"},
+ {"iter", "\xdb\x01f\""},
+ {"log", "\x82\x01\x84\x01\x05)\r\r\x01\x0e"},
{"log/internal", ""},
- {"log/slog", "\x03\n^\t\n\x03H<\x04\x01\x02\x02\x03*\x05\b\x02\x01\x02\x01\x0e\x02\x02\x02"},
+ {"log/slog", "\x03\n_\t\n\x03H<\x04\x01\x02\x02\x03*\x05\b\x02\x01\x02\x01\x0e\x02\x02\x02"},
{"log/slog/internal", ""},
- {"log/slog/internal/benchmarks", "\rq\x03\x84\x01\x06\x03<\x12"},
- {"log/slog/internal/buffer", "\xcd\x02"},
- {"log/syslog", "~\x03\x88\x01\x12\x18\x18\x02\x0f"},
- {"maps", "\x88\x02Z"},
- {"math", "\xbe\x01VN"},
- {"math/big", "\x03{\x03(\x15G\f\x03\x022\x02\x01\x02\x15"},
- {"math/big/internal/asmgen", "\x03\x01}\x93\x014\x03"},
- {"math/bits", "\xe2\x02"},
- {"math/cmplx", "\x91\x02\x03"},
- {"math/rand", "\xc7\x01J<\x01\x14"},
- {"math/rand/v2", "~+\x03e\x03N"},
- {"mime", "\x02\x01l\x0f\x03\x84\x01\v#\x15\x03\x02\x11\x02"},
- {"mime/multipart", "\x02\x01P+\x03F>\v\x01\a\x02\x17\x02\x06\x0f\x02\x01\x17"},
- {"mime/quotedprintable", "\x02\x01~\x84\x01"},
- {"net", "\x04\tq*\x1f\v\x05\x13\x01\x01\x04\x15\x01'\x06\r\b\x05\x01\x01\r\x06\t"},
- {"net/http", "\x02\x01\x03\x01\x04\x02N\x14\x0f\x03F>\x01\x03\a\x01\x06\x01\x01\x02\x06\x02\x01\x01\f\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\x0e\x02\x02\x02\n\x01\x03"},
- {"net/http/cgi", "\x02Y#\x03\x84\x01\x04\a\v\x01\x15\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x11\x10"},
- {"net/http/cookiejar", "\x04z\x03\x9a\x01\x01\b\t\x05\x16\x03\x02\x0f\x04"},
- {"net/http/fcgi", "\x02\x01\nc\x0e\x03\x84\x01\x16\x01\x01\x16\x18\x02\x0f"},
- {"net/http/httptest", "\x02\x01\nN\x02#\x01P4\x04\x12\x01\f\t\x02\r\n\x01\x02\x03\f\x06\n"},
- {"net/http/httptrace", "\rNwI\x16+"},
- {"net/http/httputil", "\x02\x01\nq\x03F>\x04\x0f\x03\x01\x05\x02\x01\r\x01\x19\x02\x01\x0e\x10"},
- {"net/http/internal", "\x02\x01m\x0e\x03\x84\x01"},
- {"net/http/internal/ascii", "\xcb\x02\x13"},
- {"net/http/internal/http2", "\x02\x01\x03\x01\x06F\b\x15\x0e\x03\x84\x01\x01\x03\b\x03\x02\x03\x02\x06\x02\x03\x01\n\x01\x01\b\x05\b\x02\x01\x02\x01\x0e\x10\x02\x02"},
- {"net/http/internal/httpcommon", "\rq\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"},
- {"net/http/internal/httpsfv", "\xc8\x02\x02\x01\x11\x04"},
- {"net/http/internal/testcert", "\xcb\x02"},
- {"net/http/pprof", "\x02\x01\nt\x18.\x11-\x04\x13\x16\x01\r\x04\x03\x01\x02\x01\x11"},
+ {"log/slog/internal/benchmarks", "\rr\x03\x84\x01\x06\x03<\x12"},
+ {"log/slog/internal/buffer", "\xce\x02"},
+ {"log/syslog", "\x7f\x03\x88\x01\x12\x18\x18\x02\x0f"},
+ {"maps", "\x89\x02Z"},
+ {"math", "\xbf\x01VN"},
+ {"math/big", "\x03|\x03(\x15G\f\x03\x022\x02\x01\x02\x15"},
+ {"math/big/internal/asmgen", "\x03\x01~\x93\x014\x03"},
+ {"math/bits", "\xe3\x02"},
+ {"math/cmplx", "\x92\x02\x03"},
+ {"math/rand", "\xc8\x01J<\x01\x14"},
+ {"math/rand/v2", "\x7f+\x03e\x03N"},
+ {"mime", "\x02\x01m\x0f\x03\x84\x01\v#\x15\x03\x02\x11\x02"},
+ {"mime/multipart", "\x02\x01Q+\x03F>\v\x01\a\x02\x17\x02\x06\x0f\x02\x01\x17"},
+ {"mime/quotedprintable", "\x02\x01\x7f\x84\x01"},
+ {"net", "\x04\tr*\x1f\v\x05\x13\x01\x01\x04\x15\x01'\x06\r\b\x05\x01\x01\r\x06\t"},
+ {"net/http", "\x02\x01\x03\x01\x04\x02O\x14\x0f\x03F>\x01\x03\a\x01\x06\x01\x01\x02\x06\x02\x01\x01\f\x01\x01\x05\x01\x02\x05\b\x01\x01\x01\x02\x01\x0e\x02\x02\x02\n\x01\x03"},
+ {"net/http/cgi", "\x02Z#\x03\x84\x01\x04\a\v\x01\x15\x01\x01\x01\x04\x01\x05\x02\b\x02\x01\x11\x10"},
+ {"net/http/cookiejar", "\x04{\x03\x9a\x01\x01\b\t\x05\x16\x03\x02\x0f\x04"},
+ {"net/http/fcgi", "\x02\x01\nd\x0e\x03\x84\x01\x16\x01\x01\x16\x18\x02\x0f"},
+ {"net/http/httptest", "\x02\x01\nO\x02#\x01P4\x04\x12\x01\f\t\x02\r\n\x01\x02\x03\f\x06\n"},
+ {"net/http/httptrace", "\rOwI\x16+"},
+ {"net/http/httputil", "\x02\x01\nr\x03F>\x04\x0f\x03\x01\x05\x02\x01\r\x01\x19\x02\x0f\x10"},
+ {"net/http/internal", "\x02\x01n\x0e\x03\x84\x01"},
+ {"net/http/internal/ascii", "\xcc\x02\x13"},
+ {"net/http/internal/http2", "\x02\x01\x03\x01\x06G\b\x15\x0e\x03\x84\x01\x01\x03\b\x03\x02\x03\x02\x06\x02\x03\x01\n\x01\x01\b\x05\b\x02\x01\x02\x01\x0e\x10\x02\x02"},
+ {"net/http/internal/httpcommon", "\rr\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"},
+ {"net/http/internal/httpsfv", "\xc9\x02\x02\x01\x11\x04"},
+ {"net/http/internal/testcert", "\xcc\x02"},
+ {"net/http/pprof", "\x02\x01\nu\x18.\x11-\x04\x13\x16\x01\r\x04\x03\x01\x02\x01\x11"},
{"net/internal/cgotest", ""},
- {"net/internal/socktest", "\x81\x01\xcc\x01\x02"},
- {"net/mail", "\x02|\x03\x84\x01\x04\x0f\x03\x16\x1a\x02\x0f\x04"},
- {"net/netip", "\x04z*\x01h\x036\x17"},
- {"net/rpc", "\x02p\f\x03\x0f\nk\x04\x12\x01\x1f\r\x03\x02"},
- {"net/rpc/jsonrpc", "t\n\x03\x84\x01\x16\x13\x1f"},
- {"net/smtp", "\x195\r\x14\x0f\x03\x84\x01\x16\x16\x1a"},
- {"net/textproto", "\x02\x01{\x03\x84\x01\f\n/\x01\x02\x15"},
- {"net/url", "~\x03Ff\v\x10\x02\x01\x17"},
- {"os", "~*\x01\x19\x04\x11\x14\x01\x03\x01\x05\x10\x01:\b\x05\x01\x01\r\x06"},
- {"os/exec", "\x03\nqI(\x01\x15\x01-\x06\a\n\x01\x03\x01\r"},
- {"os/exec/internal/fdtest", "\xcf\x02"},
- {"os/signal", "\r\xa6\x02\x15\x05\x02"},
- {"os/user", "\x02\x01{\x03\x84\x01.\r\n\x01\x02"},
- {"path", "~*\xb8\x01"},
- {"path/filepath", "~*\x1aD-\r\b\x03\x04\x11"},
- {"plugin", "~"},
- {"reflect", "~&\x04\x1e\x03\x11\b\x04\x05\x17\x06\t/\n\x03\x11\x02\x02"},
+ {"net/internal/socktest", "\x82\x01\xcc\x01\x02"},
+ {"net/mail", "\x02}\x03\x84\x01\x04\x0f\x03\x16\x1a\x02\x0f\x04"},
+ {"net/netip", "\x04{*\x01h\x036\x17"},
+ {"net/rpc", "\x02q\f\x03\x0f\nk\x04\x12\x01\x1f\r\x03\x02"},
+ {"net/rpc/jsonrpc", "u\n\x03\x84\x01\x16\x13\x1f"},
+ {"net/smtp", "\x196\r\x14\x0f\x03\x84\x01\x16\x16\x1a"},
+ {"net/textproto", "\x02\x01|\x03\x84\x01\f\n/\x01\x02\x15"},
+ {"net/url", "\x7f\x03Ff\v\x10\x02\x01\x17"},
+ {"os", "\x7f*\x01\x19\x04\x11\x14\x01\x03\x01\x05\x10\x01:\b\x05\x01\x01\r\x06"},
+ {"os/exec", "\x03\nrI(\x01\x15\x01-\x06\a\n\x01\x03\x01\r"},
+ {"os/exec/internal/fdtest", "\xd0\x02"},
+ {"os/signal", "\r\xa7\x02\x15\x05\x02"},
+ {"os/user", "\x02\x01|\x03\x84\x01.\r\n\x01\x02"},
+ {"path", "\x7f*\xb8\x01"},
+ {"path/filepath", "\x7f*\x1aD-\r\b\x03\x04\x11"},
+ {"plugin", "\x7f"},
+ {"reflect", "\x7f&\x04\x1e\x03\x11\b\x04\x05\x17\x06\t/\n\x03\x11\x02\x02"},
{"reflect/internal/example1", ""},
{"reflect/internal/example2", ""},
- {"regexp", "\x03\x82\x02\x037\t\x02\x01\x02\x11\x02"},
- {"regexp/syntax", "\xc8\x02\x01\x01\x01\x02\x11\x02"},
- {"runtime", "\xa4\x01\x04\x01\x03\f\x06\b\x02\x01\x01\x0f\x03\x01\x01\x01\x02\x01\x01\x01\x02\x01\x04\x01\x10\x18N"},
- {"runtime/coverage", "\xb0\x01U"},
- {"runtime/debug", "\x81\x01V\\\r\b\x02\x01\x11\x06"},
- {"runtime/metrics", "\xc8\x01I/\""},
- {"runtime/pprof", "\x02\x01\x01\x03\x06c\x0e\x03#5\v!\f\"\r\b\x01\x01\x01\x02\x02\n\x03\x06"},
- {"runtime/race", "\xc6\x02"},
+ {"regexp", "\x03\x83\x02\x037\t\x02\x01\x02\x11\x02"},
+ {"regexp/syntax", "\xc9\x02\x01\x01\x01\x02\x11\x02"},
+ {"runtime", "\xa5\x01\x04\x01\x03\f\x06\b\x02\x01\x01\x0f\x03\x01\x01\x01\x02\x01\x01\x01\x02\x01\x04\x01\x10\x18N"},
+ {"runtime/coverage", "\xb1\x01U"},
+ {"runtime/debug", "\x82\x01V\\\r\b\x02\x01\x11\x06"},
+ {"runtime/metrics", "\xc9\x01I/\""},
+ {"runtime/pprof", "\x02\x01\x01\x03\x06d\x0e\x03#5\v!\f\"\r\b\x01\x01\x01\x02\x02\n\x03\x06"},
+ {"runtime/race", "\xc7\x02"},
{"runtime/race/internal/amd64v1", ""},
- {"runtime/trace", "\rq\x03{\t;\b\x05\x01\x0e\x06"},
- {"slices", "\x04\x84\x02\fN"},
- {"sort", "\xdb\x0194"},
- {"strconv", "~*C\x01t"},
- {"strings", "~&\x04D\x19\x03\f9\x11\x02\x02"},
+ {"runtime/trace", "\rr\x03{\t;\b\x05\x01\x0e\x06"},
+ {"slices", "\x04\x85\x02\fN"},
+ {"sort", "\xdc\x0194"},
+ {"strconv", "\x7f*C\x01t"},
+ {"strings", "\x7f&\x04D\x19\x03\f9\x11\x02\x02"},
{"structs", ""},
- {"sync", "\xda\x01\x02\x11\x01R\x0e\x14"},
- {"sync/atomic", "\xe2\x02"},
- {"syscall", "~'\x03\x01\x1d\n\x04\x06\r\x04U\b\x05\x01\x14"},
- {"testing", "\x03\nq\x02\x01Y\x17\x14\f\x05\x1d\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\x0e\x02\x04"},
- {"testing/cryptotest", "SV\\\x126\x03\x12"},
- {"testing/fstest", "~\x03\x84\x01\x01\n(\x10\x03\t\b"},
- {"testing/internal/testdeps", "\x02\v\xb7\x011\x10.\x03\x05\x03\x06\a\x02\x0f"},
- {"testing/iotest", "\x03{\x03\x84\x01\x04"},
- {"testing/quick", "\x80\x01\x01\x90\x01\x05%\x10\x11"},
- {"testing/slogtest", "\rq\x03\x8a\x010\x05\x10\f"},
- {"testing/synctest", "\xee\x01b\f\x06"},
- {"text/scanner", "\x03~\x84\x01.+\x02"},
- {"text/tabwriter", "\x81\x01\x84\x01["},
- {"text/template", "~\x03BB\x01\n\"\x01\x05\x01\x02\x05\v\x02\x0e\x03\x02"},
- {"text/template/parse", "\x03~\xbf\x01\n\x01\x13\x02"},
- {"time", "~*D(,\r\x02\x13"},
- {"time/tzdata", "~\xd1\x01\x13"},
+ {"sync", "\xdb\x01\x02\x11\x01R\x0e\x14"},
+ {"sync/atomic", "\xe3\x02"},
+ {"syscall", "\x7f'\x03\x01\x1d\n\x04\x06\r\x04U\b\x05\x01\x14"},
+ {"testing", "\x03\nr\x02\x01Y\x17\x14\f\x05\x1d\x06\x02\x05\x02\x05\x01\x02\x01\x02\x01\x0e\x02\x04"},
+ {"testing/cryptotest", "TV\\\x126\x03\x12"},
+ {"testing/fstest", "\x7f\x03\x84\x01\x01\n(\x10\x03\t\b"},
+ {"testing/internal/testdeps", "\x02\v\xb8\x011\x10.\x03\x05\x03\x06\a\x02\x0f"},
+ {"testing/iotest", "\x03|\x03\x84\x01\x04"},
+ {"testing/quick", "\x81\x01\x01\x90\x01\x05%\x10\x11"},
+ {"testing/slogtest", "\rr\x03\x8a\x010\x05\x10\f"},
+ {"testing/synctest", "\xef\x01b\f\x06"},
+ {"text/scanner", "\x03\x7f\x84\x01.+\x02"},
+ {"text/tabwriter", "\x82\x01\x84\x01["},
+ {"text/template", "\x7f\x03BB\x01\n\"\x01\x05\x01\x02\x05\v\x02\x0e\x03\x02"},
+ {"text/template/parse", "\x03\x7f\xbf\x01\n\x01\x13\x02"},
+ {"time", "\x7f*D(,\r\x02\x13"},
+ {"time/tzdata", "\x7f\xd1\x01\x13"},
{"unicode", ""},
{"unicode/utf16", ""},
{"unicode/utf8", ""},
- {"unique", "\xa4\x01\"&\x01S\r\x01\x14\x19"},
+ {"unique", "\xa5\x01\"&\x01S\r\x01\x14\x19"},
{"unsafe", ""},
- {"uuid", "\x03\x01O\x1d\x03\v\xcf\x01\x0f"},
- {"vendor/golang.org/x/crypto/chacha20", "\x10`\x0e\x96\x01,)"},
- {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10\aY\x0e\xe6\x01\x05\x01\f"},
- {"vendor/golang.org/x/crypto/cryptobyte", "m\x11\x03\x91\x01)!\v"},
+ {"uuid", "\x03\x01P\x1d\x03\v\xcf\x01\x0f"},
+ {"vendor/golang.org/x/crypto/chacha20", "\x10a\x0e\x96\x01,)"},
+ {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10\aZ\x0e\xe6\x01\x05\x01\f"},
+ {"vendor/golang.org/x/crypto/cryptobyte", "n\x11\x03\x91\x01)!\v"},
{"vendor/golang.org/x/crypto/cryptobyte/asn1", ""},
- {"vendor/golang.org/x/crypto/hkdf", "\x18\x01e\x15r"},
- {"vendor/golang.org/x/crypto/internal/alias", "\xe2\x02"},
- {"vendor/golang.org/x/crypto/internal/poly1305", "Z\x16\xa4\x01"},
- {"vendor/golang.org/x/net/dns/dnsmessage", "~\xca\x01"},
- {"vendor/golang.org/x/net/http/httpguts", "\x9b\x02\x16\x1a\x15\x10"},
- {"vendor/golang.org/x/net/http/httpproxy", "~\x03\x9a\x01\x12\x05\x01\x18\x15\x10"},
- {"vendor/golang.org/x/net/http2/hpack", "\x03{\x03\x84\x01H"},
- {"vendor/golang.org/x/net/http3", "\x9c\x02@\x06\x0f\x04"},
- {"vendor/golang.org/x/net/idna", "\x81\x01\x90\x01:\x13\x02\x17\x02\x01"},
- {"vendor/golang.org/x/net/internal/http3", "\rN#\x03\x84\x01\v\x04\a\x01\x05\x10\x01\x16\x02\x01\x02\x0f\x10\x02\x04\x03"},
- {"vendor/golang.org/x/net/internal/httpcommon", "\rq\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"},
- {"vendor/golang.org/x/net/internal/quic/quicwire", "p"},
- {"vendor/golang.org/x/net/nettest", "\x03m\x0e\x03\x84\x01\x11\x05\x18\x01\f\n\x01\x02\x02\x01\f"},
- {"vendor/golang.org/x/net/quic", "\x03\n\x01\x01\x01\t:\x04\x04\x15\x03\v\x03\x12r\x06\x06\x06\x04\x12\x06\x15\x02\x01\x02\x01\x01\r\x06\x02\x01\x01\x02\v"},
- {"vendor/golang.org/x/sys/cpu", "\xb3\x02\r\n\x01\x17"},
- {"vendor/golang.org/x/text/secure/bidirule", "~\xe2\x01\x18\x01"},
- {"vendor/golang.org/x/text/transform", "\x03{\x87\x01["},
- {"vendor/golang.org/x/text/unicode/bidi", "\x03\bv\x88\x01@\x17"},
- {"vendor/golang.org/x/text/unicode/norm", "p\x11\x84\x01H\x13\x18"},
- {"weak", "\xa4\x01\x9c\x01\""},
+ {"vendor/golang.org/x/crypto/hkdf", "\x18\x01f\x15r"},
+ {"vendor/golang.org/x/crypto/internal/alias", "\xe3\x02"},
+ {"vendor/golang.org/x/crypto/internal/poly1305", "[\x16\xa4\x01"},
+ {"vendor/golang.org/x/net/dns/dnsmessage", "\x7f\xca\x01"},
+ {"vendor/golang.org/x/net/http/httpguts", "\x9c\x02\x16\x1a\x15\x10"},
+ {"vendor/golang.org/x/net/http/httpproxy", "\x7f\x03\x9a\x01\x12\x05\x01\x18\x15\x10"},
+ {"vendor/golang.org/x/net/http2/hpack", "\x03|\x03\x84\x01H"},
+ {"vendor/golang.org/x/net/http3", "\x9d\x02@\x06\x0f\x04"},
+ {"vendor/golang.org/x/net/idna", "\x82\x01\x90\x01:\x13\x02\x17\x02\x01"},
+ {"vendor/golang.org/x/net/internal/http3", "\rO#\x03\x84\x01\v\x04\a\x01\x05\x10\x01\x16\x02\x01\x02\x0f\x10\x02\x04\x03"},
+ {"vendor/golang.org/x/net/internal/httpcommon", "\rr\x03\xa0\x01\x10\x01\x17\x01\x01\x02\x1f\x02"},
+ {"vendor/golang.org/x/net/internal/quic/quicwire", "q"},
+ {"vendor/golang.org/x/net/nettest", "\x03n\x0e\x03\x84\x01\x11\x05\x18\x01\f\n\x01\x02\x02\x01\f"},
+ {"vendor/golang.org/x/net/quic", "\x03\n\x01\x01\x01\t;\x04\x04\x15\x03\v\x03\x12r\x06\x06\x06\x04\x12\x06\x15\x02\x01\x02\x01\x01\r\x06\x02\x01\x01\x02\v"},
+ {"vendor/golang.org/x/sys/cpu", "\xb4\x02\r\n\x01\x17"},
+ {"vendor/golang.org/x/text/secure/bidirule", "\x7f\xe2\x01\x18\x01"},
+ {"vendor/golang.org/x/text/transform", "\x03|\x87\x01["},
+ {"vendor/golang.org/x/text/unicode/bidi", "\x03\bw\x88\x01@\x17"},
+ {"vendor/golang.org/x/text/unicode/norm", "q\x11\x84\x01H\x13\x18"},
+ {"weak", "\xa5\x01\x9c\x01\""},
}
// bootstrap is the list of bootstrap packages extracted from cmd/dist.
diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
index 2180c296ec01..e11abf04553d 100644
--- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go
+++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
@@ -9153,6 +9153,7 @@ var PackageSymbols = map[string][]Symbol{
{"CrossOriginProtection", Type, 25, ""},
{"DefaultClient", Var, 0, ""},
{"DefaultMaxHeaderBytes", Const, 0, ""},
+ {"DefaultMaxHeaderValueCount", Const, 27, ""},
{"DefaultMaxIdleConnsPerHost", Const, 0, ""},
{"DefaultServeMux", Var, 0, ""},
{"DefaultTransport", Var, 0, ""},
@@ -9317,6 +9318,7 @@ var PackageSymbols = map[string][]Symbol{
{"Server.Handler", Field, 0, ""},
{"Server.IdleTimeout", Field, 8, ""},
{"Server.MaxHeaderBytes", Field, 0, ""},
+ {"Server.MaxHeaderValueCount", Field, 27, ""},
{"Server.Protocols", Field, 24, ""},
{"Server.ReadHeaderTimeout", Field, 8, ""},
{"Server.ReadTimeout", Field, 0, ""},
diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go
deleted file mode 100644
index cdae2b8e8184..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/common.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package typeparams contains common utilities for writing tools that
-// interact with generic Go code, as introduced with Go 1.18. It
-// supplements the standard library APIs. Notably, the StructuralTerms
-// API computes a minimal representation of the structural
-// restrictions on a type parameter.
-//
-// An external version of these APIs is available in the
-// golang.org/x/exp/typeparams module.
-package typeparams
-
-import (
- "go/ast"
- "go/token"
- "go/types"
-)
-
-// UnpackIndexExpr extracts data from AST nodes that represent index
-// expressions.
-//
-// For an ast.IndexExpr, the resulting indices slice will contain exactly one
-// index expression. For an ast.IndexListExpr (go1.18+), it may have a variable
-// number of index expressions.
-//
-// For nodes that don't represent index expressions, the first return value of
-// UnpackIndexExpr will be nil.
-func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) {
- switch e := n.(type) {
- case *ast.IndexExpr:
- return e.X, e.Lbrack, []ast.Expr{e.Index}, e.Rbrack
- case *ast.IndexListExpr:
- return e.X, e.Lbrack, e.Indices, e.Rbrack
- }
- return nil, token.NoPos, nil, token.NoPos
-}
-
-// PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on
-// the cardinality of indices. Calling PackIndexExpr with len(indices) == 0
-// will panic.
-func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr {
- switch len(indices) {
- case 0:
- panic("empty indices")
- case 1:
- return &ast.IndexExpr{
- X: x,
- Lbrack: lbrack,
- Index: indices[0],
- Rbrack: rbrack,
- }
- default:
- return &ast.IndexListExpr{
- X: x,
- Lbrack: lbrack,
- Indices: indices,
- Rbrack: rbrack,
- }
- }
-}
-
-// IsTypeParam reports whether t is a type parameter (or an alias of one).
-func IsTypeParam(t types.Type) bool {
- _, ok := types.Unalias(t).(*types.TypeParam)
- return ok
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/vendor/golang.org/x/tools/internal/typeparams/coretype.go
deleted file mode 100644
index 2e05de4649a4..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/coretype.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2022 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeparams
-
-import (
- "fmt"
- "go/types"
-)
-
-// CoreType returns the core type of T or nil if T does not have a core type.
-//
-// As of Go1.25, the notion of a core type has been removed from the language spec.
-// See https://go.dev/blog/coretypes for more details.
-// TODO(mkalil): We should eventually consider removing all uses of CoreType.
-func CoreType(T types.Type) types.Type {
- U := T.Underlying()
- if _, ok := U.(*types.Interface); !ok {
- return U // for non-interface types,
- }
-
- terms, err := NormalTerms(U)
- if len(terms) == 0 || err != nil {
- // len(terms) -> empty type set of interface.
- // err != nil => U is invalid, exceeds complexity bounds, or has an empty type set.
- return nil // no core type.
- }
-
- U = terms[0].Type().Underlying()
- var identical int // i in [0,identical) => Identical(U, terms[i].Type().Underlying())
- for identical = 1; identical < len(terms); identical++ {
- if !types.Identical(U, terms[identical].Type().Underlying()) {
- break
- }
- }
-
- if identical == len(terms) {
- // From the deprecated core types spec:
- // "There is a single type U which is the underlying type of all types in the type set of T"
- return U
- }
- ch, ok := U.(*types.Chan)
- if !ok {
- return nil // no core type as identical < len(terms) and U is not a channel.
- }
- // From the deprecated core types spec:
- // "the type chan E if T contains only bidirectional channels, or the type chan<- E or
- // <-chan E depending on the direction of the directional channels present."
- for chans := identical; chans < len(terms); chans++ {
- curr, ok := terms[chans].Type().Underlying().(*types.Chan)
- if !ok {
- return nil
- }
- if !types.Identical(ch.Elem(), curr.Elem()) {
- return nil // channel elements are not identical.
- }
- if ch.Dir() == types.SendRecv {
- // ch is bidirectional. We can safely always use curr's direction.
- ch = curr
- } else if curr.Dir() != types.SendRecv && ch.Dir() != curr.Dir() {
- // ch and curr are not bidirectional and not the same direction.
- return nil
- }
- }
- return ch
-}
-
-// NormalTerms returns a slice of terms representing the normalized structural
-// type restrictions of a type, if any.
-//
-// For all types other than *types.TypeParam, *types.Interface, and
-// *types.Union, this is just a single term with Tilde() == false and
-// Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see
-// below.
-//
-// Structural type restrictions of a type parameter are created via
-// non-interface types embedded in its constraint interface (directly, or via a
-// chain of interface embeddings). For example, in the declaration type
-// T[P interface{~int; m()}] int the structural restriction of the type
-// parameter P is ~int.
-//
-// With interface embedding and unions, the specification of structural type
-// restrictions may be arbitrarily complex. For example, consider the
-// following:
-//
-// type A interface{ ~string|~[]byte }
-//
-// type B interface{ int|string }
-//
-// type C interface { ~string|~int }
-//
-// type T[P interface{ A|B; C }] int
-//
-// In this example, the structural type restriction of P is ~string|int: A|B
-// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
-// which when intersected with C (~string|~int) yields ~string|int.
-//
-// NormalTerms computes these expansions and reductions, producing a
-// "normalized" form of the embeddings. A structural restriction is normalized
-// if it is a single union containing no interface terms, and is minimal in the
-// sense that removing any term changes the set of types satisfying the
-// constraint. It is left as a proof for the reader that, modulo sorting, there
-// is exactly one such normalized form.
-//
-// Because the minimal representation always takes this form, NormalTerms
-// returns a slice of tilde terms corresponding to the terms of the union in
-// the normalized structural restriction. An error is returned if the type is
-// invalid, exceeds complexity bounds, or has an empty type set. In the latter
-// case, NormalTerms returns ErrEmptyTypeSet.
-//
-// NormalTerms makes no guarantees about the order of terms, except that it
-// is deterministic.
-func NormalTerms(T types.Type) ([]*types.Term, error) {
- // typeSetOf(T) == typeSetOf(Unalias(T))
- typ := types.Unalias(T)
- if named, ok := typ.(*types.Named); ok {
- typ = named.Underlying()
- }
- switch typ := typ.(type) {
- case *types.TypeParam:
- return StructuralTerms(typ)
- case *types.Union:
- return UnionTermSet(typ)
- case *types.Interface:
- return InterfaceTermSet(typ)
- default:
- return []*types.Term{types.NewTerm(false, T)}, nil
- }
-}
-
-// Deref returns the type of the variable pointed to by t,
-// if t's core type is a pointer; otherwise it returns t.
-//
-// Do not assume that Deref(T)==T implies T is not a pointer:
-// consider "type T *T", for example.
-//
-// TODO(adonovan): ideally this would live in typesinternal, but that
-// creates an import cycle. Move there when we melt this package down.
-func Deref(t types.Type) types.Type {
- if ptr, ok := CoreType(t).(*types.Pointer); ok {
- return ptr.Elem()
- }
- return t
-}
-
-// MustDeref returns the type of the variable pointed to by t.
-// It panics if t's core type is not a pointer.
-//
-// TODO(adonovan): ideally this would live in typesinternal, but that
-// creates an import cycle. Move there when we melt this package down.
-func MustDeref(t types.Type) types.Type {
- if ptr, ok := CoreType(t).(*types.Pointer); ok {
- return ptr.Elem()
- }
- panic(fmt.Sprintf("%v is not a pointer", t))
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/free.go b/vendor/golang.org/x/tools/internal/typeparams/free.go
deleted file mode 100644
index 4c391876e4a5..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/free.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeparams
-
-import (
- "go/types"
-)
-
-// Free is a memoization of the set of free type parameters within a
-// type. It makes a sequence of calls to [Free.Has] for overlapping
-// types more efficient. The zero value is ready for use.
-//
-// NOTE: Adapted from go/types/infer.go. If it is later exported, factor.
-type Free struct {
- seen map[types.Type]bool
-}
-
-// Has reports whether the specified type has a free type parameter.
-func (w *Free) Has(typ types.Type) (res bool) {
- // detect cycles
- if x, ok := w.seen[typ]; ok {
- return x
- }
- if w.seen == nil {
- w.seen = make(map[types.Type]bool)
- }
- w.seen[typ] = false
- defer func() {
- w.seen[typ] = res
- }()
-
- switch t := typ.(type) {
- case nil, *types.Basic: // TODO(gri) should nil be handled here?
- break
-
- case *types.Alias:
- if t.TypeParams().Len() > t.TypeArgs().Len() {
- return true // This is an uninstantiated Alias.
- }
- // The expansion of an alias can have free type parameters,
- // whether or not the alias itself has type parameters:
- //
- // func _[K comparable]() {
- // type Set = map[K]bool // free(Set) = {K}
- // type MapTo[V] = map[K]V // free(Map[foo]) = {V}
- // }
- //
- // So, we must Unalias.
- return w.Has(types.Unalias(t))
-
- case *types.Array:
- return w.Has(t.Elem())
-
- case *types.Slice:
- return w.Has(t.Elem())
-
- case *types.Struct:
- for i, n := 0, t.NumFields(); i < n; i++ {
- if w.Has(t.Field(i).Type()) {
- return true
- }
- }
-
- case *types.Pointer:
- return w.Has(t.Elem())
-
- case *types.Tuple:
- n := t.Len()
- for i := range n {
- if w.Has(t.At(i).Type()) {
- return true
- }
- }
-
- case *types.Signature:
- // t.tparams may not be nil if we are looking at a signature
- // of a generic function type (or an interface method) that is
- // part of the type we're testing. We don't care about these type
- // parameters.
- // Similarly, the receiver of a method may declare (rather than
- // use) type parameters, we don't care about those either.
- // Thus, we only need to look at the input and result parameters.
- return w.Has(t.Params()) || w.Has(t.Results())
-
- case *types.Interface:
- for i, n := 0, t.NumMethods(); i < n; i++ {
- if w.Has(t.Method(i).Type()) {
- return true
- }
- }
- terms, err := InterfaceTermSet(t)
- if err != nil {
- return false // ill typed
- }
- for _, term := range terms {
- if w.Has(term.Type()) {
- return true
- }
- }
-
- case *types.Map:
- return w.Has(t.Key()) || w.Has(t.Elem())
-
- case *types.Chan:
- return w.Has(t.Elem())
-
- case *types.Named:
- args := t.TypeArgs()
- if params := t.TypeParams(); params.Len() > args.Len() {
- return true // this is an uninstantiated named type.
- }
- for i, n := 0, args.Len(); i < n; i++ {
- if w.Has(args.At(i)) {
- return true
- }
- }
- return w.Has(t.Underlying()) // recurse for types local to parameterized functions
-
- case *types.TypeParam:
- return true
-
- default:
- panic(t) // unreachable
- }
-
- return false
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/normalize.go b/vendor/golang.org/x/tools/internal/typeparams/normalize.go
deleted file mode 100644
index 8d13f12147f5..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/normalize.go
+++ /dev/null
@@ -1,216 +0,0 @@
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package typeparams
-
-import (
- "errors"
- "fmt"
- "go/types"
- "os"
- "strings"
-)
-
-//go:generate go run copytermlist.go
-
-const debug = false
-
-var ErrEmptyTypeSet = errors.New("empty type set")
-
-// StructuralTerms returns a slice of terms representing the normalized
-// structural type restrictions of a type parameter, if any.
-//
-// Structural type restrictions of a type parameter are created via
-// non-interface types embedded in its constraint interface (directly, or via a
-// chain of interface embeddings). For example, in the declaration
-//
-// type T[P interface{~int; m()}] int
-//
-// the structural restriction of the type parameter P is ~int.
-//
-// With interface embedding and unions, the specification of structural type
-// restrictions may be arbitrarily complex. For example, consider the
-// following:
-//
-// type A interface{ ~string|~[]byte }
-//
-// type B interface{ int|string }
-//
-// type C interface { ~string|~int }
-//
-// type T[P interface{ A|B; C }] int
-//
-// In this example, the structural type restriction of P is ~string|int: A|B
-// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int,
-// which when intersected with C (~string|~int) yields ~string|int.
-//
-// StructuralTerms computes these expansions and reductions, producing a
-// "normalized" form of the embeddings. A structural restriction is normalized
-// if it is a single union containing no interface terms, and is minimal in the
-// sense that removing any term changes the set of types satisfying the
-// constraint. It is left as a proof for the reader that, modulo sorting, there
-// is exactly one such normalized form.
-//
-// Because the minimal representation always takes this form, StructuralTerms
-// returns a slice of tilde terms corresponding to the terms of the union in
-// the normalized structural restriction. An error is returned if the
-// constraint interface is invalid, exceeds complexity bounds, or has an empty
-// type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet.
-//
-// StructuralTerms makes no guarantees about the order of terms, except that it
-// is deterministic.
-func StructuralTerms(tparam *types.TypeParam) ([]*types.Term, error) {
- constraint := tparam.Constraint()
- if constraint == nil {
- return nil, fmt.Errorf("%s has nil constraint", tparam)
- }
- iface, _ := constraint.Underlying().(*types.Interface)
- if iface == nil {
- return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying())
- }
- return InterfaceTermSet(iface)
-}
-
-// InterfaceTermSet computes the normalized terms for a constraint interface,
-// returning an error if the term set cannot be computed or is empty. In the
-// latter case, the error will be ErrEmptyTypeSet.
-//
-// See the documentation of StructuralTerms for more information on
-// normalization.
-func InterfaceTermSet(iface *types.Interface) ([]*types.Term, error) {
- return computeTermSet(iface)
-}
-
-// UnionTermSet computes the normalized terms for a union, returning an error
-// if the term set cannot be computed or is empty. In the latter case, the
-// error will be ErrEmptyTypeSet.
-//
-// See the documentation of StructuralTerms for more information on
-// normalization.
-func UnionTermSet(union *types.Union) ([]*types.Term, error) {
- return computeTermSet(union)
-}
-
-func computeTermSet(typ types.Type) ([]*types.Term, error) {
- tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0)
- if err != nil {
- return nil, err
- }
- if tset.terms.isEmpty() {
- return nil, ErrEmptyTypeSet
- }
- if tset.terms.isAll() {
- return nil, nil
- }
- var terms []*types.Term
- for _, term := range tset.terms {
- terms = append(terms, types.NewTerm(term.tilde, term.typ))
- }
- return terms, nil
-}
-
-// A termSet holds the normalized set of terms for a given type.
-//
-// The name termSet is intentionally distinct from 'type set': a type set is
-// all types that implement a type (and includes method restrictions), whereas
-// a term set just represents the structural restrictions on a type.
-type termSet struct {
- complete bool
- terms termlist
-}
-
-func indentf(depth int, format string, args ...any) {
- fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...)
-}
-
-func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) {
- if t == nil {
- panic("nil type")
- }
-
- if debug {
- indentf(depth, "%s", t.String())
- defer func() {
- if err != nil {
- indentf(depth, "=> %s", err)
- } else {
- indentf(depth, "=> %s", res.terms.String())
- }
- }()
- }
-
- const maxTermCount = 100
- if tset, ok := seen[t]; ok {
- if !tset.complete {
- return nil, fmt.Errorf("cycle detected in the declaration of %s", t)
- }
- return tset, nil
- }
-
- // Mark the current type as seen to avoid infinite recursion.
- tset := new(termSet)
- defer func() {
- tset.complete = true
- }()
- seen[t] = tset
-
- switch u := t.Underlying().(type) {
- case *types.Interface:
- // The term set of an interface is the intersection of the term sets of its
- // embedded types.
- tset.terms = allTermlist
- for embedded := range u.EmbeddedTypes() {
- if _, ok := embedded.Underlying().(*types.TypeParam); ok {
- return nil, fmt.Errorf("invalid embedded type %T", embedded)
- }
- tset2, err := computeTermSetInternal(embedded, seen, depth+1)
- if err != nil {
- return nil, err
- }
- tset.terms = tset.terms.intersect(tset2.terms)
- }
- case *types.Union:
- // The term set of a union is the union of term sets of its terms.
- tset.terms = nil
- for t := range u.Terms() {
- var terms termlist
- switch t.Type().Underlying().(type) {
- case *types.Interface:
- tset2, err := computeTermSetInternal(t.Type(), seen, depth+1)
- if err != nil {
- return nil, err
- }
- terms = tset2.terms
- case *types.TypeParam, *types.Union:
- // A stand-alone type parameter or union is not permitted as union
- // term.
- return nil, fmt.Errorf("invalid union term %T", t)
- default:
- if t.Type() == types.Typ[types.Invalid] {
- continue
- }
- terms = termlist{{t.Tilde(), t.Type()}}
- }
- tset.terms = tset.terms.union(terms)
- if len(tset.terms) > maxTermCount {
- return nil, fmt.Errorf("exceeded max term count %d", maxTermCount)
- }
- }
- case *types.TypeParam:
- panic("unreachable")
- default:
- // For all other types, the term set is just a single non-tilde term
- // holding the type itself.
- if u != types.Typ[types.Invalid] {
- tset.terms = termlist{{false, t}}
- }
- }
- return tset, nil
-}
-
-// under is a facade for the go/types internal function of the same name. It is
-// used by typeterm.go.
-func under(t types.Type) types.Type {
- return t.Underlying()
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/termlist.go b/vendor/golang.org/x/tools/internal/typeparams/termlist.go
deleted file mode 100644
index 9bc29143f6ad..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/termlist.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
-// Source: ../../cmd/compile/internal/types2/termlist.go
-
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Code generated by copytermlist.go DO NOT EDIT.
-
-package typeparams
-
-import (
- "go/types"
- "strings"
-)
-
-// A termlist represents the type set represented by the union
-// t1 ∪ y2 ∪ ... tn of the type sets of the terms t1 to tn.
-// A termlist is in normal form if all terms are disjoint.
-// termlist operations don't require the operands to be in
-// normal form.
-type termlist []*term
-
-// allTermlist represents the set of all types.
-// It is in normal form.
-var allTermlist = termlist{new(term)}
-
-// termSep is the separator used between individual terms.
-const termSep = " | "
-
-// String prints the termlist exactly (without normalization).
-func (xl termlist) String() string {
- if len(xl) == 0 {
- return "∅"
- }
- var buf strings.Builder
- for i, x := range xl {
- if i > 0 {
- buf.WriteString(termSep)
- }
- buf.WriteString(x.String())
- }
- return buf.String()
-}
-
-// isEmpty reports whether the termlist xl represents the empty set of types.
-func (xl termlist) isEmpty() bool {
- // If there's a non-nil term, the entire list is not empty.
- // If the termlist is in normal form, this requires at most
- // one iteration.
- for _, x := range xl {
- if x != nil {
- return false
- }
- }
- return true
-}
-
-// isAll reports whether the termlist xl represents the set of all types.
-func (xl termlist) isAll() bool {
- // If there's a 𝓤 term, the entire list is 𝓤.
- // If the termlist is in normal form, this requires at most
- // one iteration.
- for _, x := range xl {
- if x != nil && x.typ == nil {
- return true
- }
- }
- return false
-}
-
-// norm returns the normal form of xl.
-func (xl termlist) norm() termlist {
- // Quadratic algorithm, but good enough for now.
- // TODO(gri) fix asymptotic performance
- used := make([]bool, len(xl))
- var rl termlist
- for i, xi := range xl {
- if xi == nil || used[i] {
- continue
- }
- for j := i + 1; j < len(xl); j++ {
- xj := xl[j]
- if xj == nil || used[j] {
- continue
- }
- if u1, u2 := xi.union(xj); u2 == nil {
- // If we encounter a 𝓤 term, the entire list is 𝓤.
- // Exit early.
- // (Note that this is not just an optimization;
- // if we continue, we may end up with a 𝓤 term
- // and other terms and the result would not be
- // in normal form.)
- if u1.typ == nil {
- return allTermlist
- }
- xi = u1
- used[j] = true // xj is now unioned into xi - ignore it in future iterations
- }
- }
- rl = append(rl, xi)
- }
- return rl
-}
-
-// union returns the union xl ∪ yl.
-func (xl termlist) union(yl termlist) termlist {
- return append(xl, yl...).norm()
-}
-
-// intersect returns the intersection xl ∩ yl.
-func (xl termlist) intersect(yl termlist) termlist {
- if xl.isEmpty() || yl.isEmpty() {
- return nil
- }
-
- // Quadratic algorithm, but good enough for now.
- // TODO(gri) fix asymptotic performance
- var rl termlist
- for _, x := range xl {
- for _, y := range yl {
- if r := x.intersect(y); r != nil {
- rl = append(rl, r)
- }
- }
- }
- return rl.norm()
-}
-
-// equal reports whether xl and yl represent the same type set.
-func (xl termlist) equal(yl termlist) bool {
- // TODO(gri) this should be more efficient
- return xl.subsetOf(yl) && yl.subsetOf(xl)
-}
-
-// includes reports whether t ∈ xl.
-func (xl termlist) includes(t types.Type) bool {
- for _, x := range xl {
- if x.includes(t) {
- return true
- }
- }
- return false
-}
-
-// supersetOf reports whether y ⊆ xl.
-func (xl termlist) supersetOf(y *term) bool {
- for _, x := range xl {
- if y.subsetOf(x) {
- return true
- }
- }
- return false
-}
-
-// subsetOf reports whether xl ⊆ yl.
-func (xl termlist) subsetOf(yl termlist) bool {
- if yl.isEmpty() {
- return xl.isEmpty()
- }
-
- // each term x of xl must be a subset of yl
- for _, x := range xl {
- if !yl.supersetOf(x) {
- return false // x is not a subset yl
- }
- }
- return true
-}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
deleted file mode 100644
index fa758cdc9895..000000000000
--- a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
-// Source: ../../cmd/compile/internal/types2/typeterm.go
-
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Code generated by copytermlist.go DO NOT EDIT.
-
-package typeparams
-
-import "go/types"
-
-// A term describes elementary type sets:
-//
-// ∅: (*term)(nil) == ∅ // set of no types (empty set)
-// 𝓤: &term{} == 𝓤 // set of all types (𝓤niverse)
-// T: &term{false, T} == {T} // set of type T
-// ~t: &term{true, t} == {t' | under(t') == t} // set of types with underlying type t
-type term struct {
- tilde bool // valid if typ != nil
- typ types.Type
-}
-
-func (x *term) String() string {
- switch {
- case x == nil:
- return "∅"
- case x.typ == nil:
- return "𝓤"
- case x.tilde:
- return "~" + x.typ.String()
- default:
- return x.typ.String()
- }
-}
-
-// equal reports whether x and y represent the same type set.
-func (x *term) equal(y *term) bool {
- // easy cases
- switch {
- case x == nil || y == nil:
- return x == y
- case x.typ == nil || y.typ == nil:
- return x.typ == y.typ
- }
- // ∅ ⊂ x, y ⊂ 𝓤
-
- return x.tilde == y.tilde && types.Identical(x.typ, y.typ)
-}
-
-// union returns the union x ∪ y: zero, one, or two non-nil terms.
-func (x *term) union(y *term) (_, _ *term) {
- // easy cases
- switch {
- case x == nil && y == nil:
- return nil, nil // ∅ ∪ ∅ == ∅
- case x == nil:
- return y, nil // ∅ ∪ y == y
- case y == nil:
- return x, nil // x ∪ ∅ == x
- case x.typ == nil:
- return x, nil // 𝓤 ∪ y == 𝓤
- case y.typ == nil:
- return y, nil // x ∪ 𝓤 == 𝓤
- }
- // ∅ ⊂ x, y ⊂ 𝓤
-
- if x.disjoint(y) {
- return x, y // x ∪ y == (x, y) if x ∩ y == ∅
- }
- // x.typ == y.typ
-
- // ~t ∪ ~t == ~t
- // ~t ∪ T == ~t
- // T ∪ ~t == ~t
- // T ∪ T == T
- if x.tilde || !y.tilde {
- return x, nil
- }
- return y, nil
-}
-
-// intersect returns the intersection x ∩ y.
-func (x *term) intersect(y *term) *term {
- // easy cases
- switch {
- case x == nil || y == nil:
- return nil // ∅ ∩ y == ∅ and ∩ ∅ == ∅
- case x.typ == nil:
- return y // 𝓤 ∩ y == y
- case y.typ == nil:
- return x // x ∩ 𝓤 == x
- }
- // ∅ ⊂ x, y ⊂ 𝓤
-
- if x.disjoint(y) {
- return nil // x ∩ y == ∅ if x ∩ y == ∅
- }
- // x.typ == y.typ
-
- // ~t ∩ ~t == ~t
- // ~t ∩ T == T
- // T ∩ ~t == T
- // T ∩ T == T
- if !x.tilde || y.tilde {
- return x
- }
- return y
-}
-
-// includes reports whether t ∈ x.
-func (x *term) includes(t types.Type) bool {
- // easy cases
- switch {
- case x == nil:
- return false // t ∈ ∅ == false
- case x.typ == nil:
- return true // t ∈ 𝓤 == true
- }
- // ∅ ⊂ x ⊂ 𝓤
-
- u := t
- if x.tilde {
- u = under(u)
- }
- return types.Identical(x.typ, u)
-}
-
-// subsetOf reports whether x ⊆ y.
-func (x *term) subsetOf(y *term) bool {
- // easy cases
- switch {
- case x == nil:
- return true // ∅ ⊆ y == true
- case y == nil:
- return false // x ⊆ ∅ == false since x != ∅
- case y.typ == nil:
- return true // x ⊆ 𝓤 == true
- case x.typ == nil:
- return false // 𝓤 ⊆ y == false since y != 𝓤
- }
- // ∅ ⊂ x, y ⊂ 𝓤
-
- if x.disjoint(y) {
- return false // x ⊆ y == false if x ∩ y == ∅
- }
- // x.typ == y.typ
-
- // ~t ⊆ ~t == true
- // ~t ⊆ T == false
- // T ⊆ ~t == true
- // T ⊆ T == true
- return !x.tilde || y.tilde
-}
-
-// disjoint reports whether x ∩ y == ∅.
-// x.typ and y.typ must not be nil.
-func (x *term) disjoint(y *term) bool {
- if debug && (x.typ == nil || y.typ == nil) {
- panic("invalid argument(s)")
- }
- ux := x.typ
- if y.tilde {
- ux = under(ux)
- }
- uy := y.typ
- if x.tilde {
- uy = under(uy)
- }
- return !types.Identical(ux, uy)
-}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go b/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go
new file mode 100644
index 000000000000..020defc38396
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go
@@ -0,0 +1,128 @@
+// Copyright 2026 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package typesinternal
+
+import (
+ "go/ast"
+ "go/token"
+ "go/types"
+
+ "golang.org/x/tools/go/ast/edge"
+ "golang.org/x/tools/go/ast/inspector"
+)
+
+// IsAssignedOrAddressTaken reports whether the expression cur denotes a
+// variable and appears in a context that assigns it or that takes its address,
+// potentially leading to indirect assignment.
+//
+// These examples cause IsAssignedOrAddressTaken on the identifier for x to
+// return true:
+//
+// x = 1
+// x++
+// x[i] = 1 (assume x is an array)
+// x.a[i] = 1 (assume x.a is a non-pointer struct field)
+// use(&x)
+//
+// whereas these cause it to return false:
+//
+// y = x
+// f(x)
+// use(x.a[i])
+// use(*x)
+//
+// The expression may itself be a compound, for example:
+//
+// use(&(*ptr)) => IsAssignedOrAddressTaken("*ptr") = true
+// x.a[i] = 1 => IsAssignedOrAddressTaken("x.a") = true
+// _ = x.a[i] => IsAssignedOrAddressTaken("x.a") = false
+//
+// A variable's declaration is not considered to be an assignment:
+//
+// var x int => IsAssignedOrAddressTaken(x) = false
+// x := 1 => IsAssignedOrAddressTaken(x) = false
+//
+// TODO(adonovan): revisit the surprising behavior for declarations.
+func IsAssignedOrAddressTaken(info *types.Info, cur inspector.Cursor) bool {
+ // Unfortunately we can't simply use info.Types[e].Assignable()
+ // as it is always true for a variable even when that variable is
+ // used only as an r-value. So we must inspect enclosing syntax.
+outer:
+ // Ascend to outermost aggregate of which
+ // original cur is a part:
+ // x -> (x) | x.f | x[i] | x[i:j]
+ for cur = range cur.Enclosing() {
+ switch cur.ParentEdgeKind() {
+ case edge.ParenExpr_X:
+ // If x is an lvalue, then (x) is an lvalue.
+ case edge.SelectorExpr_X:
+ // If x is an lvalue, then x.f is an lvalue iff
+ // the selection does not traverse a pointer.
+ sel := cur.Parent().Node().(*ast.SelectorExpr)
+ if seln, ok := info.Selections[sel]; ok {
+ // Note: there is a bug in Indirect() where it spuriously returns true
+ // when both the selection receiver and parameter are pointers. However,
+ // it's okay in this case because there is no address taken when a
+ // pointer receiver method is called on a pointer type.
+ if seln.Indirect() {
+ return false
+ }
+ if seln.Kind() == types.MethodVal {
+ sig := seln.Obj().Type().(*types.Signature)
+ if is[*types.Pointer](sig.Recv().Type().Underlying()) {
+ t := seln.Recv()
+ // The receiver may be an embedded field, so we need
+ // to get the inner-most type (right before the method
+ // call in seln.Index())
+ for _, idx := range seln.Index()[:len(seln.Index())-1] {
+ t = t.Underlying().(*types.Struct).Field(idx).Type()
+ }
+ if !is[*types.Pointer](t.Underlying()) {
+ return true // takes address of receiver
+ }
+ }
+ return false
+ }
+ }
+ case edge.IndexExpr_X, edge.SliceExpr_X:
+ // If x[i] or x[i:j] is an lvalue,
+ // then x is an lvalue iff x is an array.
+ if !is[*types.Array](info.TypeOf(cur.Node().(ast.Expr)).Underlying()) {
+ return false
+ }
+ default:
+ break outer
+ }
+ }
+ switch cur.ParentEdgeKind() {
+ case edge.AssignStmt_Lhs:
+ assign := cur.Parent().Node().(*ast.AssignStmt)
+ if assign.Tok != token.DEFINE {
+ return true // x = j or x += j
+ }
+ id := cur.Node().(*ast.Ident)
+ // Re-assigned identifiers are recorded in the Uses map.
+ if _, ok := info.Uses[id]; ok {
+ return true // reassignment of x (x, y := 1, 2)
+ }
+ case edge.RangeStmt_Key, edge.RangeStmt_Value:
+ rng := cur.Parent().Node().(*ast.RangeStmt)
+ if rng.Tok == token.ASSIGN {
+ return true // "for k, v = range x" is like an AssignStmt to k, v
+ }
+ case edge.IncDecStmt_X:
+ return true // x++, x--
+ case edge.UnaryExpr_X:
+ if cur.Parent().Node().(*ast.UnaryExpr).Op == token.AND {
+ return true // &x
+ }
+ }
+ return false
+}
+
+func is[T any](x any) bool {
+ _, ok := x.(T)
+ return ok
+}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go
index 7ebe9768bc3e..d5c40a2e50f5 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go
@@ -8,7 +8,6 @@ import (
"fmt"
"go/ast"
"go/types"
- _ "unsafe" // for go:linkname hack
)
// CallKind describes the function position of an [*ast.CallExpr].
@@ -72,11 +71,15 @@ func ClassifyCall(info *types.Info, call *ast.CallExpr) CallKind {
if tv.IsBuiltin() {
return CallBuiltin
}
- obj := info.Uses[UsedIdent(info, call.Fun)]
+ id := UsedIdent(info, call.Fun)
+ if id == nil {
+ return CallDynamic
+ }
+ obj := info.Uses[id]
// Classify the call by the type of the object, if any.
switch obj := obj.(type) {
case *types.Func:
- if interfaceMethod(obj) {
+ if isInterfaceMethod(obj) {
return CallInterface
}
return CallStatic
@@ -127,11 +130,69 @@ func ClassifyCall(info *types.Info, call *ast.CallExpr) CallKind {
// Note: if e is an instantiated function or method, UsedIdent returns
// the corresponding generic function or method on the generic type.
func UsedIdent(info *types.Info, e ast.Expr) *ast.Ident {
- return usedIdent(info, e)
+ if info.Types == nil || info.Uses == nil {
+ panic("one of info.Types or info.Uses is nil; both must be populated")
+ }
+ // Look through type instantiation if necessary.
+ switch d := ast.Unparen(e).(type) {
+ case *ast.IndexExpr:
+ if info.Types[d.Index].IsType() {
+ e = d.X
+ }
+ case *ast.IndexListExpr:
+ e = d.X
+ }
+
+ switch e := ast.Unparen(e).(type) {
+ // info.Uses always has the object we want, even for selector expressions.
+ // We don't need info.Selections.
+ // See go/types/recording.go:recordSelection.
+ case *ast.Ident:
+ return e
+ case *ast.SelectorExpr:
+ return e.Sel
+ }
+ return nil
+}
+
+// See [golang.org/x/tools/go/types/typeutil.Callee].
+func Callee(info *types.Info, call *ast.CallExpr) types.Object {
+ id := UsedIdent(info, call.Fun)
+ if id == nil {
+ return nil
+ }
+ obj := info.Uses[id]
+ if obj == nil {
+ return nil
+ }
+ if _, ok := obj.(*types.TypeName); ok {
+ return nil
+ }
+ if fn, ok := obj.(*types.Func); ok {
+ return fn.Origin()
+ }
+ return obj
}
-//go:linkname usedIdent golang.org/x/tools/go/types/typeutil.usedIdent
-func usedIdent(info *types.Info, e ast.Expr) *ast.Ident
+// See [golang.org/x/tools/go/types/typeutil.StaticCallee].
+func StaticCallee(info *types.Info, call *ast.CallExpr) *types.Func {
+ id := UsedIdent(info, call.Fun)
+ if id == nil {
+ return nil
+ }
+ obj := info.Uses[id]
+ if obj == nil {
+ return nil
+ }
+ fn, _ := obj.(*types.Func)
+ if fn == nil || isInterfaceMethod(fn) {
+ return nil
+ }
+ return fn.Origin()
+}
-//go:linkname interfaceMethod golang.org/x/tools/go/types/typeutil.interfaceMethod
-func interfaceMethod(f *types.Func) bool
+// isInterfaceMethod reports whether its argument is a method of an interface.
+func isInterfaceMethod(f *types.Func) bool {
+ recv := f.Signature().Recv()
+ return recv != nil && types.IsInterface(recv.Type())
+}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/element.go b/vendor/golang.org/x/tools/internal/typesinternal/element.go
index 89eeea165333..bab37fbfe0e8 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/element.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/element.go
@@ -7,8 +7,6 @@ package typesinternal
import (
"fmt"
"go/types"
-
- "golang.org/x/tools/go/types/typeutil"
)
// ForEachElement calls f for type T and each type reachable from its
@@ -16,25 +14,24 @@ import (
// type constructors; in addition, for each named type N, the type *N
// is added to the result as it may have additional methods.
//
-// The caller must provide an initially empty set used to de-duplicate
-// identical types, potentially across multiple calls to ForEachElement.
-// (Its final value holds all the elements seen, matching the arguments
-// passed to f.)
+// The access argument passed to f indicates whether the type is
+// inaccessible to reflection (for example, intermediate tuple types
+// or underlying types of named types).
//
-// TODO(adonovan): share/harmonize with go/callgraph/rta.
-func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T types.Type, f func(types.Type)) {
- var visit func(T types.Type, skip bool)
- visit = func(T types.Type, skip bool) {
- if !skip {
- if seen, _ := rtypes.Set(T, true).(bool); seen {
- return // de-dup
- }
-
- f(T) // notify caller of new element type
+// The result of f indicates whether the caller has seen this type
+// already, so we can prune the traversal.
+//
+// methodSetOf abstracts (*typeutil.MethodSetCache).MethodSet,
+// avoiding an import cycle.
+func ForEachElement(methodSetOf func(types.Type) *types.MethodSet, T types.Type, f func(T types.Type, access bool) bool) {
+ var visit func(T types.Type, access bool)
+ visit = func(T types.Type, access bool) {
+ if f(T, access) {
+ return // duplicate; prune descent
}
// Recursion over signatures of each method.
- tmset := msets.MethodSet(T)
+ tmset := methodSetOf(T)
for method := range tmset.Methods() {
sig := method.Type().(*types.Signature)
if sig.TypeParams() != nil {
@@ -65,13 +62,13 @@ func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T type
//
// TODO(adonovan): document whether or not it is
// safe to skip non-exported methods (as RTA does).
- visit(sig.Params(), true) // skip the Tuple
- visit(sig.Results(), true) // skip the Tuple
+ visit(sig.Params(), false) // the Tuple is inaccessible
+ visit(sig.Results(), false) // the Tuple is inaccessible
}
switch T := T.(type) {
case *types.Alias:
- visit(types.Unalias(T), skip) // emulates the pre-Alias behavior
+ visit(types.Unalias(T), access) // emulates the pre-Alias behavior
case *types.Basic:
// nop
@@ -80,49 +77,49 @@ func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T type
// nop---handled by recursion over method set.
case *types.Pointer:
- visit(T.Elem(), false)
+ visit(T.Elem(), true)
case *types.Slice:
- visit(T.Elem(), false)
+ visit(T.Elem(), true)
case *types.Chan:
- visit(T.Elem(), false)
+ visit(T.Elem(), true)
case *types.Map:
- visit(T.Key(), false)
- visit(T.Elem(), false)
+ visit(T.Key(), true)
+ visit(T.Elem(), true)
case *types.Signature:
if T.Recv() != nil {
panic(fmt.Sprintf("Signature %s has Recv %s", T, T.Recv()))
}
- visit(T.Params(), true) // skip the Tuple
- visit(T.Results(), true) // skip the Tuple
+ visit(T.Params(), false) // the Tuple is inaccessible
+ visit(T.Results(), false) // the Tuple is inaccessible
case *types.Named:
// A pointer-to-named type can be derived from a named
// type via reflection. It may have methods too.
- visit(types.NewPointer(T), false)
+ visit(types.NewPointer(T), true)
// Consider 'type T struct{S}' where S has methods.
// Reflection provides no way to get from T to struct{S},
// only to S, so the method set of struct{S} is unwanted,
- // so set 'skip' flag during recursion.
- visit(T.Underlying(), true) // skip the unnamed type
+ // so mark it inaccessible during recursion.
+ visit(T.Underlying(), false) // skip the unnamed type
case *types.Array:
- visit(T.Elem(), false)
+ visit(T.Elem(), true)
case *types.Struct:
for i, n := 0, T.NumFields(); i < n; i++ {
// TODO(adonovan): document whether or not
// it is safe to skip non-exported fields.
- visit(T.Field(i).Type(), false)
+ visit(T.Field(i).Type(), true)
}
case *types.Tuple:
for i, n := 0, T.Len(); i < n; i++ {
- visit(T.At(i).Type(), false)
+ visit(T.At(i).Type(), true)
}
case *types.TypeParam, *types.Union:
@@ -133,5 +130,5 @@ func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T type
panic(fmt.Sprintf("ForEachElement called on unexpected type %T", T))
}
}
- visit(T, false)
+ visit(T, true)
}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/toonew.go b/vendor/golang.org/x/tools/internal/typesinternal/toonew.go
index cc86487eaa0a..386c59c74093 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/toonew.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/toonew.go
@@ -13,20 +13,30 @@ import (
// TooNewStdSymbols computes the set of package-level symbols
// exported by pkg that are not available at the specified version.
-// The result maps each symbol to its minimum version.
//
// The pkg is allowed to contain type errors.
-func TooNewStdSymbols(pkg *types.Package, version string) map[types.Object]string {
- disallowed := make(map[types.Object]string)
+func TooNewStdSymbols(pkg *types.Package, version string) map[types.Object]stdlib.Symbol {
+ disallowed := make(map[types.Object]stdlib.Symbol)
+
+ // Some symbols are accessible before their release but
+ // only with specific build tags unknown to us here.
+ // Avoid false positives in such cases.
+ if pkg.Path() == "testing/synctest" && versions.AtLeast(version, "go1.24") {
+ // requires go1.24 && goexperiment.synctest || go1.25
+ return disallowed
+ }
+ if (pkg.Path() == "encoding/json/v2" || pkg.Path() == "encoding/json/jsontext") && versions.AtLeast(version, "go1.25") {
+ // requires go1.25 && goexperiment.jsonv2 || go1.27
+ return disallowed
+ }
// Pass 1: package-level symbols.
symbols := stdlib.PackageSymbols[pkg.Path()]
for _, sym := range symbols {
- symver := sym.Version.String()
- if versions.Before(version, symver) {
+ if versions.Before(version, sym.Version.String()) {
switch sym.Kind {
case stdlib.Func, stdlib.Var, stdlib.Const, stdlib.Type:
- disallowed[pkg.Scope().Lookup(sym.Name)] = symver
+ disallowed[pkg.Scope().Lookup(sym.Name)] = sym
}
}
}
@@ -60,28 +70,36 @@ func TooNewStdSymbols(pkg *types.Package, version string) map[types.Object]strin
// spuriously cause the analyzer to report a reference to a
// too-new symbol even though this expression compiles just
// fine (with the fake implementation) using go1.21.
+ var noSym stdlib.Symbol
+ depth := make(map[types.Object]int)
for _, sym := range symbols {
- symVersion := sym.Version.String()
- if !versions.Before(version, symVersion) {
+ if !versions.Before(version, sym.Version.String()) {
continue // allowed
}
var obj types.Object
+ var indices []int
switch sym.Kind {
case stdlib.Field:
typename, name := sym.SplitField()
- if t := pkg.Scope().Lookup(typename); t != nil && disallowed[t] == "" {
- obj, _, _ = types.LookupFieldOrMethod(t.Type(), false, pkg, name)
+ if t := pkg.Scope().Lookup(typename); t != nil && disallowed[t] == noSym {
+ obj, indices, _ = types.LookupFieldOrMethod(t.Type(), false, pkg, name)
}
case stdlib.Method:
ptr, recvname, name := sym.SplitMethod()
- if t := pkg.Scope().Lookup(recvname); t != nil && disallowed[t] == "" {
- obj, _, _ = types.LookupFieldOrMethod(t.Type(), ptr, pkg, name)
+ if t := pkg.Scope().Lookup(recvname); t != nil && disallowed[t] == noSym {
+ obj, indices, _ = types.LookupFieldOrMethod(t.Type(), ptr, pkg, name)
}
}
if obj != nil {
- disallowed[obj] = symVersion
+ // In the presence of embedding, two or more "pkg.T.name"
+ // strings may map to the same types.Object.
+ // Prefer the Object with the shorter index path.
+ if min, ok := depth[obj]; !ok || len(indices) < min {
+ depth[obj] = len(indices)
+ disallowed[obj] = sym
+ }
}
}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go
index d2c0b4c5ff23..9fd48b088f88 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/types.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -270,3 +270,11 @@ func ImplicitFieldSelections(seln types.Selection) iter.Seq2[*types.Var, bool] {
}
}
}
+
+func TupleOf(elems ...types.Type) *types.Tuple {
+ params := make([]*types.Var, len(elems))
+ for i, elem := range elems {
+ params[i] = types.NewParam(token.NoPos, nil, "", elem)
+ }
+ return types.NewTuple(params...)
+}
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index c4bca5203eb1..b27c7e84a3d4 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -24,12 +24,10 @@ import (
"fmt"
"math"
"net/url"
- "os"
"slices"
"strings"
"sync"
"sync/atomic"
- "syscall"
"time"
"google.golang.org/grpc/balancer"
@@ -1573,26 +1571,13 @@ func (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address,
// to the provided transport.GoAwayInfo, as specified by gRFC A94:
// https://github.com/grpc/proposal/blob/master/A94-grpc-subchannel-disconnections-metrics.md
func disconnectErrorString(info transport.GoAwayInfo) string {
- err := info.Err
- var sysErr syscall.Errno
- switch {
- case info.Reason != transport.GoAwayInvalid:
+ if info.Reason != transport.GoAwayInvalid {
return fmt.Sprintf("GOAWAY %s", info.GoAwayCode.String())
- case err == nil:
- return "unknown"
- case errors.Is(err, context.Canceled):
- return "subchannel shutdown"
- case errors.Is(err, syscall.ECONNRESET):
- return "connection reset"
- case errors.Is(err, syscall.ETIMEDOUT), errors.Is(err, context.DeadlineExceeded), errors.Is(err, os.ErrDeadlineExceeded):
- return "connection timed out"
- case errors.Is(err, syscall.ECONNABORTED):
- return "connection aborted"
- case errors.As(err, &sysErr):
- return "socket error"
- default:
+ }
+ if info.Err == nil {
return "unknown"
}
+ return disconnectErrorLabel(info.Err)
}
// startHealthCheck starts the health checking stream (RPC) to watch the health
diff --git a/vendor/google.golang.org/grpc/clientconn_disconnect_reason_noplan9.go b/vendor/google.golang.org/grpc/clientconn_disconnect_reason_noplan9.go
new file mode 100644
index 000000000000..f0fcd884237a
--- /dev/null
+++ b/vendor/google.golang.org/grpc/clientconn_disconnect_reason_noplan9.go
@@ -0,0 +1,48 @@
+//go:build !plan9
+
+/*
+ *
+ * Copyright 2026 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package grpc
+
+import (
+ "context"
+ "errors"
+ "os"
+ "syscall"
+)
+
+// disconnectErrorLabel returns the grpc.disconnect_error metric label for a
+// transport error, as specified by gRFC A94.
+func disconnectErrorLabel(err error) string {
+ var sysErr syscall.Errno
+ switch {
+ case errors.Is(err, context.Canceled):
+ return "subchannel shutdown"
+ case errors.Is(err, syscall.ECONNRESET):
+ return "connection reset"
+ case errors.Is(err, syscall.ETIMEDOUT), errors.Is(err, context.DeadlineExceeded), errors.Is(err, os.ErrDeadlineExceeded):
+ return "connection timed out"
+ case errors.Is(err, syscall.ECONNABORTED):
+ return "connection aborted"
+ case errors.As(err, &sysErr):
+ return "socket error"
+ default:
+ return "unknown"
+ }
+}
diff --git a/vendor/google.golang.org/grpc/clientconn_disconnect_reason_plan9.go b/vendor/google.golang.org/grpc/clientconn_disconnect_reason_plan9.go
new file mode 100644
index 000000000000..930b12664ccf
--- /dev/null
+++ b/vendor/google.golang.org/grpc/clientconn_disconnect_reason_plan9.go
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright 2026 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package grpc
+
+import (
+ "context"
+ "errors"
+ "os"
+)
+
+// disconnectErrorLabel returns the grpc.disconnect_error metric label for a
+// transport error, as specified by gRFC A94. syscall.Errno does not exist on
+// plan9, so only the portable classifications are available.
+func disconnectErrorLabel(err error) string {
+ switch {
+ case errors.Is(err, context.Canceled):
+ return "subchannel shutdown"
+ case errors.Is(err, context.DeadlineExceeded), errors.Is(err, os.ErrDeadlineExceeded):
+ return "connection timed out"
+ default:
+ return "unknown"
+ }
+}
diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go
index cff016d66a97..31344f175fc1 100644
--- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go
+++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/grpc.go
@@ -178,13 +178,8 @@ func generateFileContent(gen *protogen.Plugin, file *protogen.File, g *protogen.
g.P("// This is a compile-time assertion to ensure that this generated file")
g.P("// is compatible with the grpc package it is being compiled against.")
- if *useGenericStreams {
- g.P("// Requires gRPC-Go v1.64.0 or later.")
- g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion9"))
- } else {
- g.P("// Requires gRPC-Go v1.62.0 or later.")
- g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion8")) // When changing, update version number above.
- }
+ g.P("// Requires gRPC-Go v1.64.0 or later.")
+ g.P("const _ = ", grpcPackage.Ident("SupportPackageIsVersion9"))
g.P()
for _, service := range file.Services {
genService(gen, file, g, service)
@@ -333,11 +328,7 @@ func clientSignature(g *protogen.GeneratedFile, method *protogen.Method) string
if !method.Desc.IsStreamingClient() && !method.Desc.IsStreamingServer() {
s += "*" + g.QualifiedGoIdent(method.Output.GoIdent)
} else {
- if *useGenericStreams {
- s += clientStreamInterface(g, method)
- } else {
- s += method.Parent.GoName + "_" + method.GoName + "Client"
- }
+ s += clientStreamInterface(g, method)
}
s += ", error)"
return s
@@ -373,12 +364,8 @@ func genClientMethod(_ *protogen.Plugin, _ *protogen.File, g *protogen.Generated
return
}
- streamImpl := unexport(service.GoName) + method.GoName + "Client"
- if *useGenericStreams {
- typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent)
- streamImpl = g.QualifiedGoIdent(grpcPackage.Ident("GenericClientStream")) + "[" + typeParam + "]"
- }
-
+ typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent)
+ streamImpl := g.QualifiedGoIdent(grpcPackage.Ident("GenericClientStream")) + "[" + typeParam + "]"
serviceDescVar := service.GoName + "_ServiceDesc"
g.P("stream, err := c.cc.NewStream(ctx, &", serviceDescVar, ".Streams[", index, `], `, fmSymbol, `, cOpts...)`)
g.P("if err != nil { return nil, err }")
@@ -392,61 +379,9 @@ func genClientMethod(_ *protogen.Plugin, _ *protogen.File, g *protogen.Generated
g.P()
// Auxiliary types aliases, for backwards compatibility.
- if *useGenericStreams {
- g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.")
- g.P("type ", service.GoName, "_", method.GoName, "Client = ", clientStreamInterface(g, method))
- g.P()
- return
- }
-
- // Stream auxiliary types and methods, if we're not taking advantage of the
- // pre-implemented generic types and their methods.
- genSend := method.Desc.IsStreamingClient()
- genRecv := method.Desc.IsStreamingServer()
- genCloseAndRecv := !method.Desc.IsStreamingServer()
-
- g.P("type ", service.GoName, "_", method.GoName, "Client interface {")
- if genSend {
- g.P("Send(*", method.Input.GoIdent, ") error")
- }
- if genRecv {
- g.P("Recv() (*", method.Output.GoIdent, ", error)")
- }
- if genCloseAndRecv {
- g.P("CloseAndRecv() (*", method.Output.GoIdent, ", error)")
- }
- g.P(grpcPackage.Ident("ClientStream"))
- g.P("}")
- g.P()
-
- g.P("type ", streamImpl, " struct {")
- g.P(grpcPackage.Ident("ClientStream"))
- g.P("}")
+ g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.")
+ g.P("type ", service.GoName, "_", method.GoName, "Client = ", clientStreamInterface(g, method))
g.P()
-
- if genSend {
- g.P("func (x *", streamImpl, ") Send(m *", method.Input.GoIdent, ") error {")
- g.P("return x.ClientStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genRecv {
- g.P("func (x *", streamImpl, ") Recv() (*", method.Output.GoIdent, ", error) {")
- g.P("m := new(", method.Output.GoIdent, ")")
- g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
- if genCloseAndRecv {
- g.P("func (x *", streamImpl, ") CloseAndRecv() (*", method.Output.GoIdent, ", error) {")
- g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }")
- g.P("m := new(", method.Output.GoIdent, ")")
- g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
}
func serverSignature(g *protogen.GeneratedFile, method *protogen.Method) string {
@@ -460,11 +395,7 @@ func serverSignature(g *protogen.GeneratedFile, method *protogen.Method) string
reqArgs = append(reqArgs, "*"+g.QualifiedGoIdent(method.Input.GoIdent))
}
if method.Desc.IsStreamingClient() || method.Desc.IsStreamingServer() {
- if *useGenericStreams {
- reqArgs = append(reqArgs, serverStreamInterface(g, method))
- } else {
- reqArgs = append(reqArgs, method.Parent.GoName+"_"+method.GoName+"Server")
- }
+ reqArgs = append(reqArgs, serverStreamInterface(g, method))
}
return method.GoName + "(" + strings.Join(reqArgs, ", ") + ") " + ret
}
@@ -545,11 +476,8 @@ func genServerMethod(_ *protogen.Plugin, _ *protogen.File, g *protogen.Generated
return hname
}
- streamImpl := unexport(service.GoName) + method.GoName + "Server"
- if *useGenericStreams {
- typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent)
- streamImpl = g.QualifiedGoIdent(grpcPackage.Ident("GenericServerStream")) + "[" + typeParam + "]"
- }
+ typeParam := g.QualifiedGoIdent(method.Input.GoIdent) + ", " + g.QualifiedGoIdent(method.Output.GoIdent)
+ streamImpl := g.QualifiedGoIdent(grpcPackage.Ident("GenericServerStream")) + "[" + typeParam + "]"
g.P("func ", hnameFuncNameFormatter(hname), "(srv interface{}, stream ", grpcPackage.Ident("ServerStream"), ") error {")
if !method.Desc.IsStreamingClient() {
@@ -563,59 +491,9 @@ func genServerMethod(_ *protogen.Plugin, _ *protogen.File, g *protogen.Generated
g.P()
// Auxiliary types aliases, for backwards compatibility.
- if *useGenericStreams {
- g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.")
- g.P("type ", service.GoName, "_", method.GoName, "Server = ", serverStreamInterface(g, method))
- g.P()
- return hname
- }
-
- // Stream auxiliary types and methods, if we're not taking advantage of the
- // pre-implemented generic types and their methods.
- genSend := method.Desc.IsStreamingServer()
- genSendAndClose := !method.Desc.IsStreamingServer()
- genRecv := method.Desc.IsStreamingClient()
-
- g.P("type ", service.GoName, "_", method.GoName, "Server interface {")
- if genSend {
- g.P("Send(*", method.Output.GoIdent, ") error")
- }
- if genSendAndClose {
- g.P("SendAndClose(*", method.Output.GoIdent, ") error")
- }
- if genRecv {
- g.P("Recv() (*", method.Input.GoIdent, ", error)")
- }
- g.P(grpcPackage.Ident("ServerStream"))
- g.P("}")
+ g.P("// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.")
+ g.P("type ", service.GoName, "_", method.GoName, "Server = ", serverStreamInterface(g, method))
g.P()
-
- g.P("type ", streamImpl, " struct {")
- g.P(grpcPackage.Ident("ServerStream"))
- g.P("}")
- g.P()
-
- if genSend {
- g.P("func (x *", streamImpl, ") Send(m *", method.Output.GoIdent, ") error {")
- g.P("return x.ServerStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genSendAndClose {
- g.P("func (x *", streamImpl, ") SendAndClose(m *", method.Output.GoIdent, ") error {")
- g.P("return x.ServerStream.SendMsg(m)")
- g.P("}")
- g.P()
- }
- if genRecv {
- g.P("func (x *", streamImpl, ") Recv() (*", method.Input.GoIdent, ", error) {")
- g.P("m := new(", method.Input.GoIdent, ")")
- g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }")
- g.P("return m, nil")
- g.P("}")
- g.P()
- }
-
return hname
}
diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go
index 83bff58e0c73..94e7ffcf5871 100644
--- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go
+++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/main.go
@@ -42,10 +42,9 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)
-const version = "1.6.1"
+const version = "1.6.2"
var requireUnimplemented *bool
-var useGenericStreams *bool
func main() {
showVersion := flag.Bool("version", false, "print the version and exit")
@@ -57,7 +56,6 @@ func main() {
var flags flag.FlagSet
requireUnimplemented = flags.Bool("require_unimplemented_servers", true, "set to false to match legacy behavior")
- useGenericStreams = flags.Bool("use_generic_streams_experimental", true, "set to true to use generic types for streaming client and server objects; this flag is EXPERIMENTAL and may be changed or removed in a future release")
protogen.Options{
ParamFunc: flags.Set,
diff --git a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh
index c70fd0fa63cc..fb67b1f41bfc 100644
--- a/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh
+++ b/vendor/google.golang.org/grpc/cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh
@@ -30,7 +30,7 @@ popd
protoc \
--go-grpc_out="${TEMPDIR}" \
- --go-grpc_opt=paths=source_relative,use_generic_streams_experimental=true \
+ --go-grpc_opt=paths=source_relative \
"examples/route_guide/routeguide/route_guide.proto"
GOLDENFILE="examples/route_guide/routeguide/route_guide_grpc.pb.go"
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 29d332e7b671..33344812746c 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -150,8 +150,18 @@ var (
// throttling limit if unforeseen issues arise, and it will be removed in a
// future release.
//
- // TODO: Remove this env var once v1.83.0 is release.
+ // TODO: Remove this env var once v1.83.0 is released.
ControlBufferThrottleLimit = uint64FromEnv("GRPC_GO_EXPERIMENTAL_CONTROL_BUFFER_THROTTLE_LIMIT", 100, 1, 10000)
+
+ // EnableReceiveBufferCompaction enables the compaction of data buffers
+ // to reduce the number of buffers in the receive buffer.
+ //
+ // This environment variable serves as an escape hatch to disable the
+ // feature if unforeseen issues arise, and it will be removed in a future
+ // release.
+ //
+ // TODO: Remove this env var once v1.85.0 is released.
+ EnableReceiveBufferCompaction = boolFromEnv("GRPC_GO_EXPERIMENTAL_ENABLE_RECEIVE_BUFFER_COMPACTION", true)
)
func boolFromEnv(envVar string, def bool) bool {
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index a2312f8eacf1..e4b691913822 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -69,9 +69,8 @@ var (
// https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md
XDSSPIFFEEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_MTLS_SPIFFE", false)
- // XDSHTTPConnectEnabled is true if gRPC should parse custom Metadata
- // configuring use of an HTTP CONNECT proxy via xDS from cluster resources.
- // For more details, see:
+ // XDSHTTPConnectEnabled controls support for dynamic HTTP CONNECT proxying
+ // configured via the xDS control plane. For more details, see:
// https://github.com/grpc/proposal/blob/master/A86-xds-http-connect.md
XDSHTTPConnectEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_HTTP_CONNECT", false)
@@ -88,7 +87,7 @@ var (
// XDSORCAToLRSPropEnabled controls whether ORCA metrics are explicitly
// filtered and prefix-propagated to the LRS server. For more details, see:
// https://github.com/grpc/proposal/blob/master/A85-lrs-custom-metrics-changes.md
- XDSORCAToLRSPropEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION", false)
+ XDSORCAToLRSPropEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_ORCA_LRS_PROPAGATION", true)
// XDSClientExtProcEnabled indicates whether ExtProc filter is enabled on
// the client side. For more details, see:
diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
index 9b6d8a1fa3fe..d4999fcca832 100644
--- a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
+++ b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
@@ -20,10 +20,15 @@ package grpcsync
import (
"context"
+ "errors"
"google.golang.org/grpc/internal/buffer"
)
+// ErrSerializerClosed is returned by ScheduleAndWait if the CallbackSerializer
+// was closed before the callback could be scheduled.
+var ErrSerializerClosed = errors.New("callback serializer is closed")
+
// CallbackSerializer provides a mechanism to schedule callbacks in a
// synchronized manner. It provides a FIFO guarantee on the order of execution
// of scheduled callbacks. New callbacks can be scheduled by invoking the
@@ -77,6 +82,27 @@ func (cs *CallbackSerializer) ScheduleOr(f func(ctx context.Context), onFailure
}
}
+// ScheduleAndWait schedules the provided callback function f to be executed in
+// the order it was added and blocks until f has run. If the context passed to
+// NewCallbackSerializer was canceled before this method is called, f is not run
+// and ScheduleAndWait returns ErrSerializerClosed.
+//
+// Callbacks are expected to honor the context when performing any blocking
+// operations, and should return early when the context is canceled.
+func (cs *CallbackSerializer) ScheduleAndWait(f func(ctx context.Context)) error {
+ done := make(chan struct{})
+ var err error
+ cs.ScheduleOr(func(ctx context.Context) {
+ f(ctx)
+ close(done)
+ }, func() {
+ err = ErrSerializerClosed
+ close(done)
+ })
+ <-done
+ return err
+}
+
func (cs *CallbackSerializer) run(ctx context.Context) {
defer close(cs.done)
diff --git a/vendor/google.golang.org/grpc/internal/mem/buffer_pool.go b/vendor/google.golang.org/grpc/internal/mem/buffer_pool.go
index 2d83b2eced18..00aeca419fec 100644
--- a/vendor/google.golang.org/grpc/internal/mem/buffer_pool.go
+++ b/vendor/google.golang.org/grpc/internal/mem/buffer_pool.go
@@ -26,12 +26,26 @@ import (
"slices"
"sort"
"sync"
+
+ "google.golang.org/grpc/internal"
)
const (
goPageSize = 4 * 1024 // 4KiB. N.B. this must be a power of 2.
)
+var (
+ // BufferPoolingThreshold is the minimum size of a buffer that can be pooled.
+ // This is used to determine whether to pool buffers or allocate them directly.
+ BufferPoolingThreshold = 1 << 10
+)
+
+func init() {
+ internal.SetBufferPoolingThresholdForTesting = func(threshold int) {
+ BufferPoolingThreshold = threshold
+ }
+}
+
var uintSize = bits.UintSize // use a variable for mocking during tests.
// bufferPool is a copy of the public bufferPool interface used to avoid
diff --git a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
index 6320e9b576bb..238950bbbf99 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
@@ -24,7 +24,6 @@ import (
"sync"
"google.golang.org/grpc/internal/serviceconfig"
- "google.golang.org/grpc/metadata"
"google.golang.org/grpc/resolver"
)
@@ -52,82 +51,7 @@ type RPCConfig struct {
Context context.Context
MethodConfig serviceconfig.MethodConfig // configuration to use for this RPC
OnCommitted func() // Called when the RPC has been committed (retries no longer possible)
- Interceptor ClientInterceptor
-}
-
-// ClientStream is the same as grpc.ClientStream, but defined here for circular
-// dependency reasons.
-type ClientStream interface {
- // Header returns the header metadata received from the server if there
- // is any. It blocks if the metadata is not ready to read.
- Header() (metadata.MD, error)
- // Trailer returns the trailer metadata from the server, if there is any.
- // It must only be called after stream.CloseAndRecv has returned, or
- // stream.Recv has returned a non-nil error (including io.EOF).
- Trailer() metadata.MD
- // CloseSend closes the send direction of the stream. It closes the stream
- // when non-nil error is met. It is also not safe to call CloseSend
- // concurrently with SendMsg.
- CloseSend() error
- // Context returns the context for this stream.
- //
- // It should not be called until after Header or RecvMsg has returned. Once
- // called, subsequent client-side retries are disabled.
- Context() context.Context
- // SendMsg is generally called by generated code. On error, SendMsg aborts
- // the stream. If the error was generated by the client, the status is
- // returned directly; otherwise, io.EOF is returned and the status of
- // the stream may be discovered using RecvMsg.
- //
- // SendMsg blocks until:
- // - There is sufficient flow control to schedule m with the transport, or
- // - The stream is done, or
- // - The stream breaks.
- //
- // SendMsg does not wait until the message is received by the server. An
- // untimely stream closure may result in lost messages. To ensure delivery,
- // users should ensure the RPC completed successfully using RecvMsg.
- //
- // It is safe to have a goroutine calling SendMsg and another goroutine
- // calling RecvMsg on the same stream at the same time, but it is not safe
- // to call SendMsg on the same stream in different goroutines. It is also
- // not safe to call CloseSend concurrently with SendMsg.
- SendMsg(m any) error
- // RecvMsg blocks until it receives a message into m or the stream is
- // done. It returns io.EOF when the stream completes successfully. On
- // any other error, the stream is aborted and the error contains the RPC
- // status.
- //
- // It is safe to have a goroutine calling SendMsg and another goroutine
- // calling RecvMsg on the same stream at the same time, but it is not
- // safe to call RecvMsg on the same stream in different goroutines.
- RecvMsg(m any) error
-}
-
-// ClientInterceptor is an interceptor for gRPC client streams.
-type ClientInterceptor interface {
- // NewStream creates a ClientStream for an RPC.
- //
- // Implementations must delegate stream creation to the provided newStream
- // function. To intercept or override stream behavior, implementations
- // may wrap the ClientStream returned by the delegate.
- //
- // Note: RPCInfo.Context is currently unused and will be nil.
- //
- // The done function is invoked when the RPC has finished using its
- // underlying connection or if a connection could not be assigned. Because
- // interceptors operate at the application layer, RPC operations may
- // continue on the ClientStream even after done has been called. The
- // caller must ensure done is non-nil.
- //
- // To ensure RPC completion notifications propagate through the entire
- // interceptor chain, implementations must ensure that the done function
- // passed to the delegate newStream invokes the done function passed to
- // NewStream.
- NewStream(ctx context.Context, ri RPCInfo, done func(), newStream func(ctx context.Context, done func()) (ClientStream, error)) (ClientStream, error)
- // Close closes the interceptor. Once called, no new calls to NewStream are
- // accepted. Ongoing calls to NewStream are allowed to complete.
- Close()
+ Interceptor any
}
// ServerInterceptor is an interceptor for incoming RPC's on gRPC server side.
diff --git a/vendor/google.golang.org/grpc/internal/transport/client_stream.go b/vendor/google.golang.org/grpc/internal/transport/client_stream.go
index ad382b0fda1c..046f0a555772 100644
--- a/vendor/google.golang.org/grpc/internal/transport/client_stream.go
+++ b/vendor/google.golang.org/grpc/internal/transport/client_stream.go
@@ -39,9 +39,8 @@ const nonGRPCDataMaxLen = 1024
type ClientStream struct {
Stream // Embed for common stream functionality.
- ct *http2Client
- done chan struct{} // closed at the end of stream to unblock writers.
- doneFunc func() // invoked at the end of stream.
+ ct *http2Client
+ done chan struct{} // closed at the end of stream to unblock writers.
headerChan chan struct{} // closed to indicate the end of header metadata.
header metadata.MD // the received header metadata
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index a8356c9adbc1..9cd8d28d33eb 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -424,7 +424,7 @@ func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream
st: ht,
headerWireLength: 0, // won't have access to header wire length until golang/go#18997.
}
- s.Stream.buf.init()
+ s.Stream.buf.init(ht.bufferPool)
s.readRequester = s
s.trReader = transportReader{
reader: recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: &s.buf},
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 822c09ba621b..10d19774159b 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -498,10 +498,9 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr, handler s
ct: t,
done: make(chan struct{}),
headerChan: make(chan struct{}),
- doneFunc: callHdr.DoneFunc,
statsHandler: handler,
}
- s.Stream.buf.init()
+ s.Stream.buf.init(t.bufferPool)
s.Stream.wq.init(defaultWriteQuota, s.done)
s.readRequester = s
// The client side stream context should have exactly the same life cycle with the user provided context.
@@ -998,9 +997,6 @@ func (t *http2Client) closeStream(s *ClientStream, err error, rst bool, rstCode
t.controlBuf.executeAndPut(addBackStreamQuota, cleanup)
// This will unblock write.
close(s.done)
- if s.doneFunc != nil {
- s.doneFunc()
- }
}
// Close kicks off the shutdown process of the transport. This should be called
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index be8ae9f9c54f..82e13e64aa67 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -407,7 +407,7 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
st: t,
headerWireLength: int(frame.Header().Length),
}
- s.Stream.buf.init()
+ s.Stream.buf.init(t.bufferPool)
var (
// if false, content-type was missing or invalid
isGRPC = false
@@ -522,6 +522,12 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
delete(mdata, "host")
}
+ // If :authority is still missing, i.e. no host or :authority header is
+ // present, reject the request as invalid.
+ if len(mdata[":authority"]) == 0 {
+ t.writeEarlyAbort(streamID, s.contentSubtype, status.New(codes.Internal, "no host or :authority header present"), http.StatusBadRequest, !frame.StreamEnded())
+ return nil
+ }
if frame.StreamEnded() {
// s is just created by the caller. No lock needed.
s.state = streamReadDone
diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go
index 6dfae39849e4..5fc901e5cf14 100644
--- a/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -30,11 +30,14 @@ import (
"sync"
"sync/atomic"
"time"
+ "unsafe"
"golang.org/x/net/http2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/internal/channelz"
+ "google.golang.org/grpc/internal/envconfig"
+ imem "google.golang.org/grpc/internal/mem"
"google.golang.org/grpc/internal/transport/internal"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/mem"
@@ -45,7 +48,30 @@ import (
"google.golang.org/grpc/tap"
)
-const logLevel = 2
+const (
+ logLevel = 2
+ // recvMsgSize estimates the memory overhead of a recvMsg in the backlog.
+ // It accounts for the recvMsg struct itself and the slice header of the
+ // underlying buffer's data.
+ recvMsgSize = int(unsafe.Sizeof(recvMsg{}) + unsafe.Sizeof([]byte{}))
+
+ // utilizationFactor controls when we consider memory utilization acceptable.
+ // When backlogHeapSize / payloadSize <= utilizationFactor (meaning at least
+ // 50% of the heap memory is actual payload data), compaction is skipped.
+ utilizationFactor = 2
+)
+
+var (
+ // compactionThreshold is approx 57KB (on 64-bit systems). It allows
+ // accumulating up to 1024 1-byte payloads before triggering compaction.
+ //
+ // Because individual payloads <= 1024 bytes are allocated on the heap
+ // outside mem.BufferPool, waiting for at least 1024 bytes to accumulate
+ // ensures that compaction coalesces those small heap allocations into a
+ // single large buffer from mem.BufferPool, enabling buffer reuse while
+ // avoiding frequent copying for small bursts of frames.
+ compactionThreshold = imem.BufferPoolingThreshold * (recvMsgSize + 1)
+)
func init() {
internal.TimeNowFunc = func() int64 { return time.Now().UnixNano() }
@@ -71,23 +97,31 @@ type recvBuffer struct {
c chan recvMsg
mu sync.Mutex
backlog []recvMsg
- err error
+ // uncompactedSuffixLen tracks the number of consecutive data messages at
+ // the tail of backlog that have not been compacted.
+ uncompactedSuffixLen int
+ // uncompactedBytes tracks the total payload bytes across the trailing
+ // uncompactedSuffixLen messages.
+ uncompactedBytes int
+ err error
+ bufPool mem.BufferPool
}
// init allows a recvBuffer to be initialized in-place, which is useful
// for resetting a buffer or for avoiding a heap allocation when the buffer
// is embedded in another struct.
-func (b *recvBuffer) init() {
+func (b *recvBuffer) init(pool mem.BufferPool) {
b.c = make(chan recvMsg, 1)
+ b.bufPool = pool
}
func (b *recvBuffer) put(r recvMsg) {
b.mu.Lock()
+ defer b.mu.Unlock()
if b.err != nil {
// drop the buffer on the floor. Since b.err is not nil, any subsequent reads
// will always return an error, making this buffer inaccessible.
r.buffer.Free()
- b.mu.Unlock()
// An error had occurred earlier, don't accept more
// data or errors.
return
@@ -96,13 +130,70 @@ func (b *recvBuffer) put(r recvMsg) {
if len(b.backlog) == 0 {
select {
case b.c <- r:
- b.mu.Unlock()
return
default:
}
}
b.backlog = append(b.backlog, r)
- b.mu.Unlock()
+ b.compactBacklogLocked(r)
+}
+
+func (b *recvBuffer) compactBacklogLocked(r recvMsg) {
+ if !envconfig.EnableReceiveBufferCompaction {
+ return
+ }
+ if r.buffer == nil {
+ b.uncompactedBytes = 0
+ b.uncompactedSuffixLen = 0
+ return
+ }
+
+ b.uncompactedSuffixLen++
+ b.uncompactedBytes += r.buffer.Len()
+ backlogHeapSize := b.uncompactedSuffixLen*recvMsgSize + b.uncompactedBytes
+
+ // If the memory overhead is less than 50% of the heap usage (e.g., because
+ // a large DATA frame arrived), the average message size in the suffix is
+ // large enough that memory bloat is not a concern. Reset suffix tracking.
+ if backlogHeapSize <= utilizationFactor*b.uncompactedBytes {
+ b.uncompactedBytes = 0
+ b.uncompactedSuffixLen = 0
+ return
+ }
+ // Avoid compacting too frequently for short bursts of small frames.
+ // Wait until we have accumulated at least ~1024 small messages (~57 KB).
+ if backlogHeapSize <= compactionThreshold {
+ // Still can accumulate more payloads.
+ return
+ }
+
+ // Since the memory utilization is less than 50%, the average payload size
+ // of each recvMsg must be less than recvMsgSize (approx 56 bytes).
+ // In the worst case for bytes copied (where the average payload is just
+ // below recvMsgSize), compaction will occur once every:
+ // compactionThreshold / (recvMsgSize + avg_payload) = ~520 messages,
+ // copying ~29KB of data.
+
+ start := 0
+ newBuf := b.bufPool.Get(b.uncompactedBytes)
+ startIdx := len(b.backlog) - b.uncompactedSuffixLen
+
+ for i := startIdx; i < len(b.backlog); i++ {
+ m := b.backlog[i]
+ b.backlog[i] = recvMsg{}
+ start += copy((*newBuf)[start:], m.buffer.ReadOnlyData())
+ m.buffer.Free()
+ }
+ b.backlog[startIdx] = recvMsg{
+ buffer: mem.NewBuffer(newBuf, b.bufPool),
+ }
+ b.backlog = b.backlog[:startIdx+1]
+ // After compaction, the suffix is replaced with a single message containing
+ // the combined payload. The new utilization is close to 1.0 (overhead of
+ // one recvMsg relative to the large compacted payload), which is well
+ // below the utilization factor of 2.
+ b.uncompactedBytes = 0
+ b.uncompactedSuffixLen = 0
}
func (b *recvBuffer) load() {
@@ -110,6 +201,13 @@ func (b *recvBuffer) load() {
if len(b.backlog) > 0 {
select {
case b.c <- b.backlog[0]:
+ // backlog[0] is only part of the tracked uncompacted suffix if the
+ // entire backlog currently consists of the suffix. If an earlier
+ // compaction or reset occurred, backlog[0] is already compacted.
+ if envconfig.EnableReceiveBufferCompaction && b.uncompactedSuffixLen == len(b.backlog) {
+ b.uncompactedSuffixLen--
+ b.uncompactedBytes -= b.backlog[0].buffer.Len()
+ }
b.backlog[0] = recvMsg{}
b.backlog = b.backlog[1:]
default:
@@ -594,8 +692,6 @@ type CallHdr struct {
PreviousAttempts int // value of grpc-previous-rpc-attempts header to set
- DoneFunc func() // called when the stream is finished
-
// Authority is used to explicitly override the `:authority` header.
//
// This value comes from one of two sources:
diff --git a/vendor/google.golang.org/grpc/mem/buffer_pool.go b/vendor/google.golang.org/grpc/mem/buffer_pool.go
index 3b02b909164f..aa121379fd56 100644
--- a/vendor/google.golang.org/grpc/mem/buffer_pool.go
+++ b/vendor/google.golang.org/grpc/mem/buffer_pool.go
@@ -59,10 +59,6 @@ func init() {
internal.SetDefaultBufferPool = func(pool BufferPool) {
defaultBufferPool = pool
}
-
- internal.SetBufferPoolingThresholdForTesting = func(threshold int) {
- bufferPoolingThreshold = threshold
- }
}
// DefaultBufferPool returns the current default buffer pool. It is a BufferPool
diff --git a/vendor/google.golang.org/grpc/mem/buffers.go b/vendor/google.golang.org/grpc/mem/buffers.go
index 2b410b16ebd5..9b355d4465b3 100644
--- a/vendor/google.golang.org/grpc/mem/buffers.go
+++ b/vendor/google.golang.org/grpc/mem/buffers.go
@@ -29,6 +29,8 @@ import (
"fmt"
"sync"
"sync/atomic"
+
+ "google.golang.org/grpc/internal/mem"
)
// A Buffer represents a reference counted piece of data (in bytes) that can be
@@ -63,8 +65,6 @@ type Buffer interface {
}
var (
- bufferPoolingThreshold = 1 << 10
-
bufferObjectPool = sync.Pool{New: func() any { return new(buffer) }}
)
@@ -72,7 +72,7 @@ var (
// equal to the threshold for buffer pooling. This is used to determine whether
// to pool buffers or allocate them directly.
func IsBelowBufferPoolingThreshold(size int) bool {
- return size <= bufferPoolingThreshold
+ return size <= mem.BufferPoolingThreshold
}
type buffer struct {
diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go
index 4aac644a8332..51aff85dfba0 100644
--- a/vendor/google.golang.org/grpc/stream.go
+++ b/vendor/google.golang.org/grpc/stream.go
@@ -201,6 +201,15 @@ func endOfClientStream(cc *ClientConn, err error, opts ...CallOption) {
}
}
+// clientInterceptor is structurally identical to the ClientInterceptor defined
+// in internal/xds/httpfilter/httpfilter.go. It is defined locally here so that
+// we can type-assert the generic Interceptor field in iresolver.RPCConfig
+// without introducing a dependency on xDS packages.
+type clientInterceptor interface {
+ NewStream(ctx context.Context, ri iresolver.RPCInfo, newStream func(ctx context.Context, opts ...CallOption) (ClientStream, error), opts ...CallOption) (ClientStream, error)
+ Close()
+}
+
func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) {
if channelz.IsOn() {
cc.incrCallsStarted()
@@ -244,8 +253,11 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
mc := &emptyMethodConfig
var onCommit func()
- newStream := func(ctx context.Context, done func()) (iresolver.ClientStream, error) {
- return newClientStreamWithParams(ctx, desc, cc, method, mc, onCommit, done, nameResolutionDelayed, opts...)
+ newStream := func(ctx context.Context, filterOpts ...CallOption) (ClientStream, error) {
+ if filterOpts != nil {
+ opts = combine(opts, filterOpts)
+ }
+ return newClientStreamWithParams(ctx, desc, cc, method, mc, onCommit, nameResolutionDelayed, opts...)
}
rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method}
@@ -270,20 +282,24 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
if rpcConfig.Interceptor != nil {
rpcInfo.Context = nil
ns := newStream
- newStream = func(ctx context.Context, done func()) (iresolver.ClientStream, error) {
- cs, err := rpcConfig.Interceptor.NewStream(ctx, rpcInfo, done, ns)
- if err != nil {
- return nil, toRPCErr(err)
+ if interceptor, ok := rpcConfig.Interceptor.(clientInterceptor); ok {
+ newStream = func(ctx context.Context, filterOpts ...CallOption) (ClientStream, error) {
+ cs, err := interceptor.NewStream(ctx, rpcInfo, ns, filterOpts...)
+ if err != nil {
+ return nil, toRPCErr(err)
+ }
+ return cs, nil
}
- return cs, nil
+ } else {
+ return nil, status.Errorf(codes.Internal, "invalid client interceptor type %T", rpcConfig.Interceptor)
}
}
}
- return newStream(ctx, func() {})
+ return newStream(ctx)
}
-func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, mc *serviceconfig.MethodConfig, onCommit, doneFunc func(), nameResolutionDelayed bool, opts ...CallOption) (_ iresolver.ClientStream, err error) {
+func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, mc *serviceconfig.MethodConfig, onCommit func(), nameResolutionDelayed bool, opts ...CallOption) (_ ClientStream, err error) {
callInfo := defaultCallInfo()
if mc.WaitForReady != nil {
callInfo.failFast = !*mc.WaitForReady
@@ -321,7 +337,6 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
Host: cc.authority,
Method: method,
ContentSubtype: callInfo.contentSubtype,
- DoneFunc: doneFunc,
Authority: callInfo.authority,
}
if allowed := callInfo.acceptedResponseCompressors; len(allowed) > 0 {
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index 53c737feeb95..835dc07fdc50 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.82.1"
+const Version = "1.83.2"
diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb
index 04696351eeeef14cbbd69fd1f4250530b1fbfd56..ad35ea4c449a6b23a78974a905b3fcba120223c6 100644
GIT binary patch
delta 50
zcmbQmxSw&t6m2eLiGDvNNe)H>4lG0U`MWs{jB1
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
index 328dc733b042..079a53dd15a5 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go
@@ -69,19 +69,19 @@ func Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescript
}
}
case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
- if v, err := strconv.ParseInt(s, 10, 32); err == nil {
+ if v, err := strconv.ParseInt(s, 0, 32); err == nil {
return protoreflect.ValueOfInt32(int32(v)), nil, nil
}
case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
- if v, err := strconv.ParseInt(s, 10, 64); err == nil {
+ if v, err := strconv.ParseInt(s, 0, 64); err == nil {
return protoreflect.ValueOfInt64(int64(v)), nil, nil
}
case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
- if v, err := strconv.ParseUint(s, 10, 32); err == nil {
+ if v, err := strconv.ParseUint(s, 0, 32); err == nil {
return protoreflect.ValueOfUint32(uint32(v)), nil, nil
}
case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
- if v, err := strconv.ParseUint(s, 10, 64); err == nil {
+ if v, err := strconv.ParseUint(s, 0, 64); err == nil {
return protoreflect.ValueOfUint64(uint64(v)), nil, nil
}
case protoreflect.FloatKind, protoreflect.DoubleKind:
diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
index 65aaf4d210af..58aeff8456db 100644
--- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
+++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
@@ -26,6 +26,7 @@ const (
Edition_EDITION_PROTO3_enum_value = 999
Edition_EDITION_2023_enum_value = 1000
Edition_EDITION_2024_enum_value = 1001
+ Edition_EDITION_2026_enum_value = 1002
Edition_EDITION_UNSTABLE_enum_value = 9999
Edition_EDITION_1_TEST_ONLY_enum_value = 1
Edition_EDITION_2_TEST_ONLY_enum_value = 2
@@ -806,11 +807,13 @@ const (
FieldOptions_FeatureSupport_EditionDeprecated_field_name protoreflect.Name = "edition_deprecated"
FieldOptions_FeatureSupport_DeprecationWarning_field_name protoreflect.Name = "deprecation_warning"
FieldOptions_FeatureSupport_EditionRemoved_field_name protoreflect.Name = "edition_removed"
+ FieldOptions_FeatureSupport_RemovalError_field_name protoreflect.Name = "removal_error"
FieldOptions_FeatureSupport_EditionIntroduced_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_introduced"
FieldOptions_FeatureSupport_EditionDeprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_deprecated"
FieldOptions_FeatureSupport_DeprecationWarning_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning"
FieldOptions_FeatureSupport_EditionRemoved_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_removed"
+ FieldOptions_FeatureSupport_RemovalError_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.removal_error"
)
// Field numbers for google.protobuf.FieldOptions.FeatureSupport.
@@ -819,6 +822,7 @@ const (
FieldOptions_FeatureSupport_EditionDeprecated_field_number protoreflect.FieldNumber = 2
FieldOptions_FeatureSupport_DeprecationWarning_field_number protoreflect.FieldNumber = 3
FieldOptions_FeatureSupport_EditionRemoved_field_number protoreflect.FieldNumber = 4
+ FieldOptions_FeatureSupport_RemovalError_field_number protoreflect.FieldNumber = 5
)
// Names for google.protobuf.OneofOptions.
@@ -1152,6 +1156,7 @@ const (
FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN_enum_value = 0
FeatureSet_STYLE2024_enum_value = 1
FeatureSet_STYLE_LEGACY_enum_value = 2
+ FeatureSet_STYLE2026_enum_value = 3
)
// Names for google.protobuf.FeatureSet.VisibilityFeature.
diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go
index bfb2cfdea5b4..58ff0e24644e 100644
--- a/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -52,8 +52,8 @@ import (
const (
Major = 1
Minor = 36
- Patch = 11
- PreRelease = "devel"
+ Patch = 12
+ PreRelease = ""
)
// String formats the version string for this module in semver format.
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
index 730331e66686..86f0d0926206 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
@@ -546,6 +546,8 @@ func (p *SourcePath) appendFieldOptions_FeatureSupport(b []byte) []byte {
b = p.appendSingularField(b, "deprecation_warning", nil)
case 4:
b = p.appendSingularField(b, "edition_removed", nil)
+ case 5:
+ b = p.appendSingularField(b, "removal_error", nil)
}
return b
}
diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index 0b23faa957c9..a51cb1e546cb 100644
--- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -1,32 +1,9 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// Copyright 2008 Google LLC. All rights reserved.
//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
// Author: kenton@google.com (Kenton Varda)
// Based on original Protocol Buffers design by
@@ -69,6 +46,7 @@ const (
// comparison.
Edition_EDITION_2023 Edition = 1000
Edition_EDITION_2024 Edition = 1001
+ Edition_EDITION_2026 Edition = 1002
// A placeholder edition for developing and testing unscheduled features.
Edition_EDITION_UNSTABLE Edition = 9999
// Placeholder editions for testing feature resolution. These should not be
@@ -93,6 +71,7 @@ var (
999: "EDITION_PROTO3",
1000: "EDITION_2023",
1001: "EDITION_2024",
+ 1002: "EDITION_2026",
9999: "EDITION_UNSTABLE",
1: "EDITION_1_TEST_ONLY",
2: "EDITION_2_TEST_ONLY",
@@ -108,6 +87,7 @@ var (
"EDITION_PROTO3": 999,
"EDITION_2023": 1000,
"EDITION_2024": 1001,
+ "EDITION_2026": 1002,
"EDITION_UNSTABLE": 9999,
"EDITION_1_TEST_ONLY": 1,
"EDITION_2_TEST_ONLY": 2,
@@ -1213,6 +1193,7 @@ const (
FeatureSet_ENFORCE_NAMING_STYLE_UNKNOWN FeatureSet_EnforceNamingStyle = 0
FeatureSet_STYLE2024 FeatureSet_EnforceNamingStyle = 1
FeatureSet_STYLE_LEGACY FeatureSet_EnforceNamingStyle = 2
+ FeatureSet_STYLE2026 FeatureSet_EnforceNamingStyle = 3
)
// Enum value maps for FeatureSet_EnforceNamingStyle.
@@ -1221,11 +1202,13 @@ var (
0: "ENFORCE_NAMING_STYLE_UNKNOWN",
1: "STYLE2024",
2: "STYLE_LEGACY",
+ 3: "STYLE2026",
}
FeatureSet_EnforceNamingStyle_value = map[string]int32{
"ENFORCE_NAMING_STYLE_UNKNOWN": 0,
"STYLE2024": 1,
"STYLE_LEGACY": 2,
+ "STYLE2026": 3,
}
)
@@ -4204,8 +4187,11 @@ type FieldOptions_FeatureSupport struct {
// this one, the last default assigned will be used, and proto files will
// not be able to override it.
EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ // The removal error text if this feature is used after the edition it was
+ // removed in.
+ RemovalError *string `protobuf:"bytes,5,opt,name=removal_error,json=removalError" json:"removal_error,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FieldOptions_FeatureSupport) Reset() {
@@ -4266,6 +4252,13 @@ func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition {
return Edition_EDITION_UNKNOWN
}
+func (x *FieldOptions_FeatureSupport) GetRemovalError() string {
+ if x != nil && x.RemovalError != nil {
+ return *x.RemovalError
+ }
+ return ""
+}
+
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
@@ -4719,7 +4712,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\aoptions\x18\x03 \x01(\v2&.google.protobuf.ExtensionRangeOptionsR\aoptions\x1a7\n" +
"\rReservedRange\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
- "\x03end\x18\x02 \x01(\x05R\x03end\"\xcc\x04\n" +
+ "\x03end\x18\x02 \x01(\x05R\x03end\"\xd4\x04\n" +
"\x15ExtensionRangeOptions\x12X\n" +
"\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\x12Y\n" +
"\vdeclaration\x18\x02 \x03(\v22.google.protobuf.ExtensionRangeOptions.DeclarationB\x03\x88\x01\x02R\vdeclaration\x127\n" +
@@ -4735,7 +4728,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x11VerificationState\x12\x0f\n" +
"\vDECLARATION\x10\x00\x12\x0e\n" +
"\n" +
- "UNVERIFIED\x10\x01*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xc1\x06\n" +
+ "UNVERIFIED\x10\x01*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xc1\x06\n" +
"\x14FieldDescriptorProto\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" +
"\x06number\x18\x03 \x01(\x05R\x06number\x12A\n" +
@@ -4810,12 +4803,13 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"outputType\x128\n" +
"\aoptions\x18\x04 \x01(\v2\x1e.google.protobuf.MethodOptionsR\aoptions\x120\n" +
"\x10client_streaming\x18\x05 \x01(\b:\x05falseR\x0fclientStreaming\x120\n" +
- "\x10server_streaming\x18\x06 \x01(\b:\x05falseR\x0fserverStreaming\"\xad\t\n" +
+ "\x10server_streaming\x18\x06 \x01(\b:\x05falseR\x0fserverStreaming\"\xfa\n" +
+ "\n" +
"\vFileOptions\x12!\n" +
"\fjava_package\x18\x01 \x01(\tR\vjavaPackage\x120\n" +
- "\x14java_outer_classname\x18\b \x01(\tR\x12javaOuterClassname\x125\n" +
+ "\x14java_outer_classname\x18\b \x01(\tR\x12javaOuterClassname\x12\xf9\x01\n" +
"\x13java_multiple_files\x18\n" +
- " \x01(\b:\x05falseR\x11javaMultipleFiles\x12D\n" +
+ " \x01(\b:\x05falseB\xc1\x01\xb2\x01\xbd\x01\b\xe6\a \xe9\a*\xb4\x01This behavior is enabled by default in editions 2024 and above. To disable it, you can set `features.(pb.java).nest_in_file_class = YES` on individual messages, enums, or services.R\x11javaMultipleFiles\x12D\n" +
"\x1djava_generate_equals_and_hash\x18\x14 \x01(\bB\x02\x18\x01R\x19javaGenerateEqualsAndHash\x12:\n" +
"\x16java_string_check_utf8\x18\x1b \x01(\b:\x05falseR\x13javaStringCheckUtf8\x12S\n" +
"\foptimize_for\x18\t \x01(\x0e2).google.protobuf.FileOptions.OptimizeMode:\x05SPEEDR\voptimizeFor\x12\x1d\n" +
@@ -4840,7 +4834,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\fOptimizeMode\x12\t\n" +
"\x05SPEED\x10\x01\x12\r\n" +
"\tCODE_SIZE\x10\x02\x12\x10\n" +
- "\fLITE_RUNTIME\x10\x03*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b*\x10+J\x04\b&\x10'R\x14php_generic_services\"\xf4\x03\n" +
+ "\fLITE_RUNTIME\x10\x03*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b*\x10+J\x04\b&\x10'R\x14php_generic_services\"\xfc\x03\n" +
"\x0eMessageOptions\x12<\n" +
"\x17message_set_wire_format\x18\x01 \x01(\b:\x05falseR\x14messageSetWireFormat\x12L\n" +
"\x1fno_standard_descriptor_accessor\x18\x02 \x01(\b:\x05falseR\x1cnoStandardDescriptorAccessor\x12%\n" +
@@ -4850,8 +4844,8 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\tmap_entry\x18\a \x01(\bR\bmapEntry\x12V\n" +
"&deprecated_legacy_json_field_conflicts\x18\v \x01(\bB\x02\x18\x01R\"deprecatedLegacyJsonFieldConflicts\x127\n" +
"\bfeatures\x18\f \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" +
- "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" +
- "\"\xa1\r\n" +
+ "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" +
+ "\"\xce\r\n" +
"\fFieldOptions\x12A\n" +
"\x05ctype\x18\x01 \x01(\x0e2#.google.protobuf.FieldOptions.CType:\x06STRINGR\x05ctype\x12\x16\n" +
"\x06packed\x18\x02 \x01(\bR\x06packed\x12G\n" +
@@ -4872,12 +4866,13 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption\x1aZ\n" +
"\x0eEditionDefault\x122\n" +
"\aedition\x18\x03 \x01(\x0e2\x18.google.protobuf.EditionR\aedition\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value\x1a\x96\x02\n" +
+ "\x05value\x18\x02 \x01(\tR\x05value\x1a\xbb\x02\n" +
"\x0eFeatureSupport\x12G\n" +
"\x12edition_introduced\x18\x01 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionIntroduced\x12G\n" +
"\x12edition_deprecated\x18\x02 \x01(\x0e2\x18.google.protobuf.EditionR\x11editionDeprecated\x12/\n" +
"\x13deprecation_warning\x18\x03 \x01(\tR\x12deprecationWarning\x12A\n" +
- "\x0fedition_removed\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eeditionRemoved\"/\n" +
+ "\x0fedition_removed\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eeditionRemoved\x12#\n" +
+ "\rremoval_error\x18\x05 \x01(\tR\fremovalError\"/\n" +
"\x05CType\x12\n" +
"\n" +
"\x06STRING\x10\x00\x12\b\n" +
@@ -4901,10 +4896,10 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n" +
"\x16TARGET_TYPE_ENUM_ENTRY\x10\a\x12\x17\n" +
"\x13TARGET_TYPE_SERVICE\x10\b\x12\x16\n" +
- "\x12TARGET_TYPE_METHOD\x10\t*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x12\x10\x13\"\xac\x01\n" +
+ "\x12TARGET_TYPE_METHOD\x10\t*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x12\x10\x13\"\xb4\x01\n" +
"\fOneofOptions\x127\n" +
"\bfeatures\x18\x01 \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" +
- "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xd1\x02\n" +
+ "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xd9\x02\n" +
"\vEnumOptions\x12\x1f\n" +
"\vallow_alias\x18\x02 \x01(\bR\n" +
"allowAlias\x12%\n" +
@@ -4913,7 +4908,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"deprecated\x12V\n" +
"&deprecated_legacy_json_field_conflicts\x18\x06 \x01(\bB\x02\x18\x01R\"deprecatedLegacyJsonFieldConflicts\x127\n" +
"\bfeatures\x18\a \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" +
- "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x05\x10\x06\"\xd8\x02\n" +
+ "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x05\x10\x06\"\xe0\x02\n" +
"\x10EnumValueOptions\x12%\n" +
"\n" +
"deprecated\x18\x01 \x01(\b:\x05falseR\n" +
@@ -4921,13 +4916,13 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\bfeatures\x18\x02 \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12(\n" +
"\fdebug_redact\x18\x03 \x01(\b:\x05falseR\vdebugRedact\x12U\n" +
"\x0ffeature_support\x18\x04 \x01(\v2,.google.protobuf.FieldOptions.FeatureSupportR\x0efeatureSupport\x12X\n" +
- "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xd5\x01\n" +
+ "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xdd\x01\n" +
"\x0eServiceOptions\x127\n" +
"\bfeatures\x18\" \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12%\n" +
"\n" +
"deprecated\x18! \x01(\b:\x05falseR\n" +
"deprecated\x12X\n" +
- "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\x99\x03\n" +
+ "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xa1\x03\n" +
"\rMethodOptions\x12%\n" +
"\n" +
"deprecated\x18! \x01(\b:\x05falseR\n" +
@@ -4939,7 +4934,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x13IDEMPOTENCY_UNKNOWN\x10\x00\x12\x13\n" +
"\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n" +
"\n" +
- "IDEMPOTENT\x10\x02*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\x9a\x03\n" +
+ "IDEMPOTENT\x10\x02*\x06\b\xde\a\x10\xe7\a*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\x9a\x03\n" +
"\x13UninterpretedOption\x12A\n" +
"\x04name\x18\x02 \x03(\v2-.google.protobuf.UninterpretedOption.NamePartR\x04name\x12)\n" +
"\x10identifier_value\x18\x03 \x01(\tR\x0fidentifierValue\x12,\n" +
@@ -4950,7 +4945,7 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x0faggregate_value\x18\b \x01(\tR\x0eaggregateValue\x1aJ\n" +
"\bNamePart\x12\x1b\n" +
"\tname_part\x18\x01 \x02(\tR\bnamePart\x12!\n" +
- "\fis_extension\x18\x02 \x02(\bR\visExtension\"\x8e\x0f\n" +
+ "\fis_extension\x18\x02 \x02(\bR\visExtension\"\xae\x0f\n" +
"\n" +
"FeatureSet\x12\x91\x01\n" +
"\x0efield_presence\x18\x01 \x01(\x0e2).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\bEXPLICIT\x18\x84\a\xa2\x01\r\x12\bIMPLICIT\x18\xe7\a\xa2\x01\r\x12\bEXPLICIT\x18\xe8\a\xb2\x01\x03\b\xe8\aR\rfieldPresence\x12l\n" +
@@ -4960,8 +4955,8 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\x10message_encoding\x18\x05 \x01(\x0e2+.google.protobuf.FeatureSet.MessageEncodingB&\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\x14\x12\x0fLENGTH_PREFIXED\x18\x84\a\xb2\x01\x03\b\xe8\aR\x0fmessageEncoding\x12\x82\x01\n" +
"\vjson_format\x18\x06 \x01(\x0e2&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\a\xa2\x01\n" +
"\x12\x05ALLOW\x18\xe7\a\xb2\x01\x03\b\xe8\aR\n" +
- "jsonFormat\x12\xab\x01\n" +
- "\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\x12\xb9\x01\n" +
+ "jsonFormat\x12\xbc\x01\n" +
+ "\x14enforce_naming_style\x18\a \x01(\x0e2..google.protobuf.FeatureSet.EnforceNamingStyleBZ\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\a\x98\x01\b\x98\x01\t\xa2\x01\x11\x12\fSTYLE_LEGACY\x18\x84\a\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\a\xa2\x01\x0e\x12\tSTYLE2026\x18\x8fN\xb2\x01\x03\b\xe9\aR\x12enforceNamingStyle\x12\xb9\x01\n" +
"\x19default_symbol_visibility\x18\b \x01(\x0e2E.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\n" +
"EXPORT_ALL\x18\x84\a\xa2\x01\x15\x12\x10EXPORT_TOP_LEVEL\x18\xe9\a\xb2\x01\x03\b\xe9\aR\x17defaultSymbolVisibility\x1a\xa1\x01\n" +
"\x11VisibilityFeature\"\x81\x01\n" +
@@ -5001,11 +4996,12 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"JsonFormat\x12\x17\n" +
"\x13JSON_FORMAT_UNKNOWN\x10\x00\x12\t\n" +
"\x05ALLOW\x10\x01\x12\x16\n" +
- "\x12LEGACY_BEST_EFFORT\x10\x02\"W\n" +
+ "\x12LEGACY_BEST_EFFORT\x10\x02\"f\n" +
"\x12EnforceNamingStyle\x12 \n" +
"\x1cENFORCE_NAMING_STYLE_UNKNOWN\x10\x00\x12\r\n" +
"\tSTYLE2024\x10\x01\x12\x10\n" +
- "\fSTYLE_LEGACY\x10\x02*\x06\b\xe8\a\x10\x8bN*\x06\b\x8bN\x10\x90N*\x06\b\x90N\x10\x91NJ\x06\b\xe7\a\x10\xe8\a\"\xef\x03\n" +
+ "\fSTYLE_LEGACY\x10\x02\x12\r\n" +
+ "\tSTYLE2026\x10\x03*\x06\b\xe8\a\x10\x8bN*\x06\b\x8bN\x10\x90N*\x06\b\x90N\x10\x91NJ\x06\b\xe7\a\x10\xe8\a\"\xef\x03\n" +
"\x12FeatureSetDefaults\x12X\n" +
"\bdefaults\x18\x01 \x03(\v2<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefaultR\bdefaults\x12A\n" +
"\x0fminimum_edition\x18\x04 \x01(\x0e2\x18.google.protobuf.EditionR\x0eminimumEdition\x12A\n" +
@@ -5037,14 +5033,15 @@ const file_google_protobuf_descriptor_proto_rawDesc = "" +
"\bSemantic\x12\b\n" +
"\x04NONE\x10\x00\x12\a\n" +
"\x03SET\x10\x01\x12\t\n" +
- "\x05ALIAS\x10\x02*\xbe\x02\n" +
+ "\x05ALIAS\x10\x02*\xd1\x02\n" +
"\aEdition\x12\x13\n" +
"\x0fEDITION_UNKNOWN\x10\x00\x12\x13\n" +
"\x0eEDITION_LEGACY\x10\x84\a\x12\x13\n" +
"\x0eEDITION_PROTO2\x10\xe6\a\x12\x13\n" +
"\x0eEDITION_PROTO3\x10\xe7\a\x12\x11\n" +
"\fEDITION_2023\x10\xe8\a\x12\x11\n" +
- "\fEDITION_2024\x10\xe9\a\x12\x15\n" +
+ "\fEDITION_2024\x10\xe9\a\x12\x11\n" +
+ "\fEDITION_2026\x10\xea\a\x12\x15\n" +
"\x10EDITION_UNSTABLE\x10\x8fN\x12\x17\n" +
"\x13EDITION_1_TEST_ONLY\x10\x01\x12\x17\n" +
"\x13EDITION_2_TEST_ONLY\x10\x02\x12\x1d\n" +
diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
index 1ff0d1494d4d..510894f2b0d6 100644
--- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
@@ -128,120 +128,66 @@ import (
// `Any` contains an arbitrary serialized protocol buffer message along with a
// URL that describes the type of the serialized message.
//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-// // or ...
-// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
-// foo = any.unpack(Foo.getDefaultInstance());
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
-// any, err := anypb.New(foo)
-// if err != nil {
-// ...
-// }
-// ...
-// foo := &pb.Foo{}
-// if err := any.UnmarshalTo(foo); err != nil {
-// ...
-// }
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": ,
-// "lastName":
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
+// In its binary encoding, an `Any` is an ordinary message; but in other wire
+// forms like JSON, it has a special encoding. The format of the type URL is
+// described on the `type_url` field.
+//
+// Protobuf APIs provide utilities to interact with `Any` values:
+//
+// - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
+// around it.
+// - An 'unpack' operation reads the content of an `Any` message, either into an
+// existing message or a new one. Unpack operations must check the type of the
+// value they unpack against the declared `type_url`.
+// - An 'is' operation decides whether an `Any` contains a message of the given
+// type, i.e. whether it can 'unpack' that type.
+//
+// The JSON format representation of an `Any` follows one of these cases:
+//
+// - For types without special-cased JSON encodings, the JSON format
+// representation of the `Any` is the same as that of the message, with an
+// additional `@type` field which contains the type URL.
+// - For types with special-cased JSON encodings (typically called 'well-known'
+// types, listed in https://protobuf.dev/programming-guides/json/#any), the
+// JSON format representation has a key `@type` which contains the type URL
+// and a key `value` which contains the JSON-serialized value.
+//
+// The text format representation of an `Any` is like a message with one field
+// whose name is the type URL in brackets. For example, an `Any` containing a
+// `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
type Any struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // A URL/resource name that uniquely identifies the type of the serialized
- // protocol buffer message. This string must contain at least
- // one "/" character. The last segment of the URL's path must represent
- // the fully qualified name of the type (as in
- // `path/google.protobuf.Duration`). The name should be in a canonical form
- // (e.g., leading "." is not accepted).
+ // Identifies the type of the serialized Protobuf message with a URI reference
+ // consisting of a prefix ending in a slash and the fully-qualified type name.
+ //
+ // Example: type.googleapis.com/google.protobuf.StringValue
//
- // In practice, teams usually precompile into the binary all types that they
- // expect it to use in the context of Any. However, for URLs which use the
- // scheme `http`, `https`, or no scheme, one can optionally set up a type
- // server that maps type URLs to message definitions as follows:
+ // This string must contain at least one `/` character, and the content after
+ // the last `/` must be the fully-qualified name of the type in canonical
+ // form, without a leading dot. Do not write a scheme on these URI references
+ // so that clients do not attempt to contact them.
//
- // - If no scheme is provided, `https` is assumed.
- // - An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // - Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
+ // The prefix is arbitrary and Protobuf implementations are expected to
+ // simply strip off everything up to and including the last `/` to identify
+ // the type. `type.googleapis.com/` is a common default prefix that some
+ // legacy implementations require. This prefix does not indicate the origin of
+ // the type, and URIs containing it are not expected to respond to any
+ // requests.
//
- // Note: this functionality is not currently available in the official
- // protobuf release, and it is not used for type URLs beginning with
- // type.googleapis.com. As of May 2023, there are no widely used type server
- // implementations and no plans to implement one.
+ // All type URL strings must be legal URI references with the additional
+ // restriction (for the text format) that the content of the reference
+ // must consist only of alphanumeric characters, percent-encoded escapes, and
+ // characters in the following set (not including the outer backticks):
+ // `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
+ // should not unescape them to prevent confusion with existing parsers. For
+ // example, `type.googleapis.com%2FFoo` should be rejected.
//
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
+ // In the original design of `Any`, the possibility of launching a type
+ // resolution service at these type URLs was considered but Protobuf never
+ // implemented one and considers contacting these URLs to be problematic and
+ // a potential security issue. Do not attempt to contact type URLs.
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
+ // Holds a Protobuf serialization of the type described by type_url.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
index 91ee89a5cd92..4a0437911d9c 100644
--- a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
@@ -197,24 +197,22 @@ import (
// An implementation may provide options to override this default behavior for
// repeated and message fields.
//
-// In order to reset a field's value to the default, the field must
-// be in the mask and set to the default value in the provided resource.
-// Hence, in order to reset all fields of a resource, provide a default
-// instance of the resource and set all fields in the mask, or do
-// not provide a mask as described below.
-//
-// If a field mask is not present on update, the operation applies to
-// all fields (as if a field mask of all fields has been specified).
-// Note that in the presence of schema evolution, this may mean that
-// fields the client does not know and has therefore not filled into
-// the request will be reset to their default. If this is unwanted
-// behavior, a specific service may require a client to always specify
-// a field mask, producing an error if not.
-//
-// As with get operations, the location of the resource which
-// describes the updated values in the request message depends on the
-// operation kind. In any case, the effect of the field mask is
-// required to be honored by the API.
+// Note that libraries which implement FieldMask resolution have various
+// different behaviors in the face of empty masks or the special "*" mask.
+// When implementing a service you should confirm these cases have the
+// appropriate behavior in the underlying FieldMask library that you desire,
+// and you may need to special case those cases in your application code if
+// the underlying field mask library behavior differs from your intended
+// service semantics.
+//
+// Update methods implementing https://google.aip.dev/134
+// - MUST support the special value * meaning "full replace"
+// - MUST treat an omitted field mask as "replace fields which are present".
+//
+// Other methods implementing https://google.aip.dev/157
+// - SHOULD support the special value "*" to mean "get all".
+// - MUST treat an omitted field mask to mean "get all", unless otherwise
+// documented.
//
// ## Considerations for HTTP REST
//
diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
index 30411b72838c..8325a504892b 100644
--- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
@@ -131,10 +131,15 @@ import (
unsafe "unsafe"
)
-// `NullValue` is a singleton enumeration to represent the null value for the
-// `Value` type union.
+// Represents a JSON `null`.
//
-// The JSON representation for `NullValue` is JSON `null`.
+// `NullValue` is a sentinel, using an enum with only one value to represent
+// the null value for the `Value` type union.
+//
+// A field of type `NullValue` with any value other than `0` is considered
+// invalid. Most ProtoJSON serializers will emit a Value with a `null_value` set
+// as a JSON `null` regardless of the integer value, and so will round trip to
+// a `0` value.
type NullValue int32
const (
@@ -179,14 +184,19 @@ func (NullValue) EnumDescriptor() ([]byte, []int) {
return file_google_protobuf_struct_proto_rawDescGZIP(), []int{0}
}
-// `Struct` represents a structured data value, consisting of fields
-// which map to dynamically typed values. In some languages, `Struct`
-// might be supported by a native representation. For example, in
-// scripting languages like JS a struct is represented as an
-// object. The details of that representation are described together
-// with the proto support for the language.
+// Represents a JSON object.
+//
+// An unordered key-value map, intending to perfectly capture the semantics of a
+// JSON object. This enables parsing any arbitrary JSON payload as a message
+// field in ProtoJSON format.
+//
+// This follows RFC 8259 guidelines for interoperable JSON: notably this type
+// cannot represent large Int64 values or `NaN`/`Infinity` numbers,
+// since the JSON format generally does not support those values in its number
+// type.
//
-// The JSON representation for `Struct` is JSON object.
+// If you do not intend to parse arbitrary JSON into your message, a custom
+// typed message should be preferred instead of using this type.
type Struct struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Unordered map of dynamically typed values.
@@ -269,12 +279,12 @@ func (x *Struct) GetFields() map[string]*Value {
return nil
}
+// Represents a JSON value.
+//
// `Value` represents a dynamically typed value which can be either
// null, a number, a string, a boolean, a recursive struct value, or a
// list of values. A producer of value is expected to set one of these
-// variants. Absence of any variant indicates an error.
-//
-// The JSON representation for `Value` is JSON value.
+// variants. Absence of any variant is an invalid state.
type Value struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The kind of value.
@@ -548,32 +558,35 @@ type isValue_Kind interface {
}
type Value_NullValue struct {
- // Represents a null value.
+ // Represents a JSON `null`.
NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
}
type Value_NumberValue struct {
- // Represents a double value.
+ // Represents a JSON number. Must not be `NaN`, `Infinity` or
+ // `-Infinity`, since those are not supported in JSON. This also cannot
+ // represent large Int64 values, since JSON format generally does not
+ // support them in its number type.
NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
}
type Value_StringValue struct {
- // Represents a string value.
+ // Represents a JSON string.
StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type Value_BoolValue struct {
- // Represents a boolean value.
+ // Represents a JSON boolean (`true` or `false` literal in JSON).
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type Value_StructValue struct {
- // Represents a structured value.
+ // Represents a JSON object.
StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
}
type Value_ListValue struct {
- // Represents a repeated `Value`.
+ // Represents a JSON array.
ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
}
@@ -589,9 +602,7 @@ func (*Value_StructValue) isValue_Kind() {}
func (*Value_ListValue) isValue_Kind() {}
-// `ListValue` is a wrapper around a repeated field of values.
-//
-// The JSON representation for `ListValue` is JSON array.
+// Represents a JSON array.
type ListValue struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Repeated field of dynamically typed values.
diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
index 484c21fd536c..2cd60946cf04 100644
--- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
@@ -153,8 +153,8 @@ import (
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required. A proto3 JSON serializer should always use UTC (as indicated by
-// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// is required. A ProtoJSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a ProtoJSON parser should be
// able to accept both UTC and other timezones (as indicated by an offset).
//
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
@@ -173,7 +173,7 @@ import (
type Timestamp struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
- // be between -315576000000 and 315576000000 inclusive (which corresponds to
+ // be between -62135596800 and 253402300799 inclusive (which corresponds to
// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
// Non-negative fractions of a second at nanosecond resolution. This field is
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 10341f3d2d49..64198faa5a04 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -51,7 +51,7 @@ github.com/apparentlymart/go-textseg/v15/textseg
# github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
## explicit; go 1.13
github.com/asaskevich/govalidator
-# github.com/aws/aws-sdk-go-v2 v1.43.0
+# github.com/aws/aws-sdk-go-v2 v1.43.8
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/aws
github.com/aws/aws-sdk-go-v2/aws/defaults
@@ -76,11 +76,11 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults
github.com/aws/aws-sdk-go-v2/internal/strings
github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
github.com/aws/aws-sdk-go-v2/internal/timeconv
-# github.com/aws/aws-sdk-go-v2/config v1.32.31
+# github.com/aws/aws-sdk-go-v2/config v1.32.39
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/config
github.com/aws/aws-sdk-go-v2/config/internal/ini
-# github.com/aws/aws-sdk-go-v2/credentials v1.19.30
+# github.com/aws/aws-sdk-go-v2/credentials v1.19.38
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/credentials
github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds
@@ -90,48 +90,48 @@ github.com/aws/aws-sdk-go-v2/credentials/logincreds
github.com/aws/aws-sdk-go-v2/credentials/processcreds
github.com/aws/aws-sdk-go-v2/credentials/ssocreds
github.com/aws/aws-sdk-go-v2/credentials/stscreds
-# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.31
+# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.39
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/feature/ec2/imds
github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config
-# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.31
+# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.39
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/internal/configsources
-# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.31
+# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.39
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2
-# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.32
+# github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.40
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/internal/v4a
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto
github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4
-# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13
+# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.18
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
-# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.31
+# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.39
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
-# github.com/aws/aws-sdk-go-v2/service/signin v1.5.0
+# github.com/aws/aws-sdk-go-v2/service/signin v1.5.8
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/signin
github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/signin/types
-# github.com/aws/aws-sdk-go-v2/service/sso v1.33.0
+# github.com/aws/aws-sdk-go-v2/service/sso v1.33.8
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/sso
github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sso/types
-# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.0
+# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.38.8
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/ssooidc
github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/ssooidc/types
-# github.com/aws/aws-sdk-go-v2/service/sts v1.45.0
+# github.com/aws/aws-sdk-go-v2/service/sts v1.45.8
## explicit; go 1.24
github.com/aws/aws-sdk-go-v2/service/sts
github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sts/types
-# github.com/aws/smithy-go v1.27.4
+# github.com/aws/smithy-go v1.27.10
## explicit; go 1.24
github.com/aws/smithy-go
github.com/aws/smithy-go/auth
@@ -212,7 +212,7 @@ github.com/containerd/console
# github.com/containerd/containerd/api v1.11.1
## explicit; go 1.24.0
github.com/containerd/containerd/api/services/content/v1
-# github.com/containerd/containerd/v2 v2.3.3
+# github.com/containerd/containerd/v2 v2.3.4
## explicit; go 1.26.3
github.com/containerd/containerd/v2/core/content
github.com/containerd/containerd/v2/core/content/proxy
@@ -266,7 +266,7 @@ github.com/containerd/errdefs/pkg/internal/types
# github.com/containerd/log v0.1.0
## explicit; go 1.20
github.com/containerd/log
-# github.com/containerd/platforms v1.0.0-rc.4
+# github.com/containerd/platforms v1.0.0-rc.5
## explicit; go 1.24
github.com/containerd/platforms
# github.com/containerd/ttrpc v1.2.9
@@ -299,7 +299,7 @@ github.com/digitorus/timestamp
# github.com/distribution/reference v0.6.0
## explicit; go 1.20
github.com/distribution/reference
-# github.com/docker/cli v29.6.2+incompatible
+# github.com/docker/cli v29.7.2+incompatible
## explicit
github.com/docker/cli/cli
github.com/docker/cli/cli-plugins/metadata
@@ -352,8 +352,8 @@ github.com/docker/go-connections/tlsconfig
# github.com/docker/go-units v0.5.0
## explicit
github.com/docker/go-units
-# github.com/felixge/httpsnoop v1.0.4
-## explicit; go 1.13
+# github.com/felixge/httpsnoop v1.1.0
+## explicit; go 1.25
github.com/felixge/httpsnoop
# github.com/fvbommel/sortorder v1.1.0
## explicit; go 1.13
@@ -361,7 +361,7 @@ github.com/fvbommel/sortorder
# github.com/fxamacker/cbor/v2 v2.9.0
## explicit; go 1.20
github.com/fxamacker/cbor/v2
-# github.com/go-logr/logr v1.4.3
+# github.com/go-logr/logr v1.4.4
## explicit; go 1.18
github.com/go-logr/logr
github.com/go-logr/logr/funcr
@@ -570,7 +570,7 @@ github.com/inconshreveable/mousetrap
# github.com/json-iterator/go v1.1.12
## explicit; go 1.12
github.com/json-iterator/go
-# github.com/klauspost/compress v1.19.1
+# github.com/klauspost/compress v1.19.2
## explicit; go 1.24
github.com/klauspost/compress
github.com/klauspost/compress/fse
@@ -644,7 +644,7 @@ github.com/mitchellh/go-wordwrap
# github.com/mitchellh/hashstructure/v2 v2.0.2
## explicit; go 1.14
github.com/mitchellh/hashstructure/v2
-# github.com/moby/buildkit v0.32.2
+# github.com/moby/buildkit v0.33.0-rc1
## explicit; go 1.26.3
github.com/moby/buildkit/api/services/control
github.com/moby/buildkit/api/types
@@ -912,10 +912,10 @@ github.com/opencontainers/image-spec/specs-go/v1
# github.com/package-url/packageurl-go v0.1.1
## explicit; go 1.17
github.com/package-url/packageurl-go
-# github.com/pelletier/go-toml/v2 v2.3.1
+# github.com/pelletier/go-toml/v2 v2.4.3
## explicit; go 1.21.0
github.com/pelletier/go-toml/v2
-github.com/pelletier/go-toml/v2/internal/characters
+github.com/pelletier/go-toml/v2/internal/parserbridge
github.com/pelletier/go-toml/v2/internal/tracker
github.com/pelletier/go-toml/v2/unstable
# github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
@@ -1062,7 +1062,7 @@ github.com/theupdateframework/go-tuf/v2/metadata/updater
# github.com/tonistiigi/dchapes-mode v0.0.0-20250318174251-73d941a28323
## explicit; go 1.21
github.com/tonistiigi/dchapes-mode
-# github.com/tonistiigi/fsutil v0.0.0-20260717003753-6d9dc2ebad62
+# github.com/tonistiigi/fsutil v0.0.0-20260819142231-83cac42c1c52
## explicit; go 1.25.0
github.com/tonistiigi/fsutil
github.com/tonistiigi/fsutil/copy
@@ -1135,20 +1135,20 @@ github.com/zclconf/go-cty/cty/set
## explicit; go 1.24.0
go.opentelemetry.io/auto/sdk
go.opentelemetry.io/auto/sdk/internal/telemetry
-# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.69.0
+# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal
-# go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.69.0
+# go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.70.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/internal/semconv
-# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
+# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv
-# go.opentelemetry.io/otel v1.44.0
+# go.opentelemetry.io/otel v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel
go.opentelemetry.io/otel/attribute
@@ -1160,13 +1160,16 @@ go.opentelemetry.io/otel/internal/baggage
go.opentelemetry.io/otel/internal/errorhandler
go.opentelemetry.io/otel/internal/global
go.opentelemetry.io/otel/propagation
+go.opentelemetry.io/otel/semconv/internal/metricpool
go.opentelemetry.io/otel/semconv/v1.37.0
go.opentelemetry.io/otel/semconv/v1.37.0/rpcconv
go.opentelemetry.io/otel/semconv/v1.41.0
-go.opentelemetry.io/otel/semconv/v1.41.0/httpconv
go.opentelemetry.io/otel/semconv/v1.41.0/otelconv
-go.opentelemetry.io/otel/semconv/v1.41.0/rpcconv
-# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0
+go.opentelemetry.io/otel/semconv/v1.43.0
+go.opentelemetry.io/otel/semconv/v1.43.0/httpconv
+go.opentelemetry.io/otel/semconv/v1.43.0/otelconv
+go.opentelemetry.io/otel/semconv/v1.43.0/rpcconv
+# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal
@@ -1177,7 +1180,7 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/x
-# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0
+# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal
@@ -1188,11 +1191,11 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/x
-# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0
+# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace
go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform
-# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
+# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal
@@ -1202,7 +1205,7 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/observ
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/x
-# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0
+# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal
@@ -1219,39 +1222,41 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal
go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/counter
go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/observ
go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/x
-# go.opentelemetry.io/otel/metric v1.44.0
+# go.opentelemetry.io/otel/metric v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/metric
go.opentelemetry.io/otel/metric/embedded
go.opentelemetry.io/otel/metric/noop
-# go.opentelemetry.io/otel/sdk v1.44.0
+# go.opentelemetry.io/otel/sdk v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/sdk
go.opentelemetry.io/otel/sdk/instrumentation
+go.opentelemetry.io/otel/sdk/internal/attrnorm
go.opentelemetry.io/otel/sdk/internal/x
go.opentelemetry.io/otel/sdk/resource
go.opentelemetry.io/otel/sdk/trace
go.opentelemetry.io/otel/sdk/trace/internal/env
go.opentelemetry.io/otel/sdk/trace/internal/observ
go.opentelemetry.io/otel/sdk/trace/tracetest
-# go.opentelemetry.io/otel/sdk/metric v1.44.0
+# go.opentelemetry.io/otel/sdk/metric v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/sdk/metric
go.opentelemetry.io/otel/sdk/metric/exemplar
go.opentelemetry.io/otel/sdk/metric/internal
go.opentelemetry.io/otel/sdk/metric/internal/aggregate
+go.opentelemetry.io/otel/sdk/metric/internal/attrnorm
go.opentelemetry.io/otel/sdk/metric/internal/observ
go.opentelemetry.io/otel/sdk/metric/internal/reservoir
go.opentelemetry.io/otel/sdk/metric/internal/x
go.opentelemetry.io/otel/sdk/metric/metricdata
-# go.opentelemetry.io/otel/trace v1.44.0
+# go.opentelemetry.io/otel/trace v1.45.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
go.opentelemetry.io/otel/trace/internal/telemetry
go.opentelemetry.io/otel/trace/noop
-# go.opentelemetry.io/proto/otlp v1.10.0
-## explicit; go 1.24.0
+# go.opentelemetry.io/proto/otlp v1.11.0
+## explicit; go 1.25.0
go.opentelemetry.io/proto/otlp/collector/metrics/v1
go.opentelemetry.io/proto/otlp/collector/trace/v1
go.opentelemetry.io/proto/otlp/common/v1
@@ -1268,7 +1273,7 @@ go.yaml.in/yaml/v3
## explicit; go 1.18
go.yaml.in/yaml/v4
go.yaml.in/yaml/v4/internal/libyaml
-# golang.org/x/crypto v0.54.0
+# golang.org/x/crypto v0.55.0
## explicit; go 1.25.0
golang.org/x/crypto/argon2
golang.org/x/crypto/bcrypt
@@ -1292,13 +1297,13 @@ golang.org/x/crypto/sha3
golang.org/x/crypto/ssh
golang.org/x/crypto/ssh/agent
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
-# golang.org/x/mod v0.38.0
+# golang.org/x/mod v0.40.0
## explicit; go 1.25.0
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
golang.org/x/mod/sumdb/note
-# golang.org/x/net v0.57.0
+# golang.org/x/net v0.58.0
## explicit; go 1.25.0
golang.org/x/net/http/httpguts
golang.org/x/net/http2
@@ -1330,7 +1335,7 @@ golang.org/x/sys/windows/registry
# golang.org/x/term v0.45.0
## explicit; go 1.25.0
golang.org/x/term
-# golang.org/x/text v0.40.0
+# golang.org/x/text v0.41.0
## explicit; go 1.25.0
golang.org/x/text/cases
golang.org/x/text/feature/plural
@@ -1353,7 +1358,7 @@ golang.org/x/text/width
# golang.org/x/time v0.15.0
## explicit; go 1.25.0
golang.org/x/time/rate
-# golang.org/x/tools v0.47.0
+# golang.org/x/tools v0.49.0
## explicit; go 1.25.0
golang.org/x/tools/cmd/stringer
golang.org/x/tools/go/ast/edge
@@ -1361,7 +1366,6 @@ golang.org/x/tools/go/ast/inspector
golang.org/x/tools/go/gcexportdata
golang.org/x/tools/go/packages
golang.org/x/tools/go/types/objectpath
-golang.org/x/tools/go/types/typeutil
golang.org/x/tools/internal/aliases
golang.org/x/tools/internal/event
golang.org/x/tools/internal/event/core
@@ -1369,22 +1373,22 @@ golang.org/x/tools/internal/event/keys
golang.org/x/tools/internal/event/label
golang.org/x/tools/internal/gcimporter
golang.org/x/tools/internal/gocommand
+golang.org/x/tools/internal/moremaps
golang.org/x/tools/internal/packagesinternal
golang.org/x/tools/internal/pkgbits
golang.org/x/tools/internal/stdlib
-golang.org/x/tools/internal/typeparams
golang.org/x/tools/internal/typesinternal
golang.org/x/tools/internal/versions
-# google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa
+# google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d
## explicit; go 1.25.0
google.golang.org/genproto/googleapis/api
google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/api/httpbody
-# google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa
+# google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d
## explicit; go 1.25.0
google.golang.org/genproto/googleapis/rpc/errdetails
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.82.1
+# google.golang.org/grpc v1.83.2
## explicit; go 1.25.0
google.golang.org/grpc
google.golang.org/grpc/attributes
@@ -1453,10 +1457,10 @@ google.golang.org/grpc/serviceconfig
google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
-# google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.1
-## explicit; go 1.24.0
+# google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2
+## explicit; go 1.25.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc
-# google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
+# google.golang.org/protobuf v1.36.12
## explicit; go 1.23
google.golang.org/protobuf/cmd/protoc-gen-go
google.golang.org/protobuf/cmd/protoc-gen-go/internal_gengo
@@ -1510,11 +1514,11 @@ google.golang.org/protobuf/types/pluginpb
# gopkg.in/inf.v0 v0.9.1
## explicit
gopkg.in/inf.v0
-# k8s.io/api v0.36.0
+# k8s.io/api v0.36.3
## explicit; go 1.26.0
k8s.io/api/apps/v1
k8s.io/api/core/v1
-# k8s.io/apimachinery v0.36.0
+# k8s.io/apimachinery v0.36.3
## explicit; go 1.26.0
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/api/meta
@@ -1560,7 +1564,7 @@ k8s.io/apimachinery/pkg/util/yaml
k8s.io/apimachinery/pkg/version
k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/third_party/forked/golang/reflect
-# k8s.io/client-go v0.36.0
+# k8s.io/client-go v0.36.3
## explicit; go 1.26.0
k8s.io/client-go/features
k8s.io/client-go/pkg/apis/clientauthentication
@@ -1603,7 +1607,7 @@ k8s.io/klog/v2/textlogger
# k8s.io/kube-openapi v0.0.0-20260319004828-5883c5ee87b9
## explicit; go 1.23.0
k8s.io/kube-openapi/pkg/util
-# k8s.io/streaming v0.36.0
+# k8s.io/streaming v0.36.3
## explicit; go 1.26.0
k8s.io/streaming/pkg/httpstream
k8s.io/streaming/pkg/httpstream/spdy
@@ -1624,7 +1628,7 @@ sigs.k8s.io/json/internal/golang/encoding/json
## explicit; go 1.18
sigs.k8s.io/randfill
sigs.k8s.io/randfill/bytesource
-# sigs.k8s.io/structured-merge-diff/v6 v6.3.2
+# sigs.k8s.io/structured-merge-diff/v6 v6.3.3
## explicit; go 1.23
sigs.k8s.io/structured-merge-diff/v6/value
# sigs.k8s.io/yaml v1.6.0