mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: update buildkit to v0.18.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
34
vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
generated
vendored
34
vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
generated
vendored
@ -1,16 +1,5 @@
|
||||
// Copyright The OpenTelemetry 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.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package trace // import "go.opentelemetry.io/otel/sdk/trace"
|
||||
|
||||
@ -52,7 +41,12 @@ func (gen *randomIDGenerator) NewSpanID(ctx context.Context, traceID trace.Trace
|
||||
gen.Lock()
|
||||
defer gen.Unlock()
|
||||
sid := trace.SpanID{}
|
||||
_, _ = gen.randSource.Read(sid[:])
|
||||
for {
|
||||
_, _ = gen.randSource.Read(sid[:])
|
||||
if sid.IsValid() {
|
||||
break
|
||||
}
|
||||
}
|
||||
return sid
|
||||
}
|
||||
|
||||
@ -62,9 +56,19 @@ func (gen *randomIDGenerator) NewIDs(ctx context.Context) (trace.TraceID, trace.
|
||||
gen.Lock()
|
||||
defer gen.Unlock()
|
||||
tid := trace.TraceID{}
|
||||
_, _ = gen.randSource.Read(tid[:])
|
||||
sid := trace.SpanID{}
|
||||
_, _ = gen.randSource.Read(sid[:])
|
||||
for {
|
||||
_, _ = gen.randSource.Read(tid[:])
|
||||
if tid.IsValid() {
|
||||
break
|
||||
}
|
||||
}
|
||||
for {
|
||||
_, _ = gen.randSource.Read(sid[:])
|
||||
if sid.IsValid() {
|
||||
break
|
||||
}
|
||||
}
|
||||
return tid, sid
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user