mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
7
vendor/github.com/moby/buildkit/util/appcontext/appcontext.go
generated
vendored
7
vendor/github.com/moby/buildkit/util/appcontext/appcontext.go
generated
vendored
@ -22,7 +22,12 @@ func Context() context.Context {
|
||||
const exitLimit = 3
|
||||
retries := 0
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
ctx := context.Background()
|
||||
for _, f := range inits {
|
||||
ctx = f(ctx)
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
appContextCache = ctx
|
||||
|
||||
go func() {
|
||||
|
14
vendor/github.com/moby/buildkit/util/appcontext/register.go
generated
vendored
Normal file
14
vendor/github.com/moby/buildkit/util/appcontext/register.go
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package appcontext
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Initializer func(context.Context) context.Context
|
||||
|
||||
var inits []Initializer
|
||||
|
||||
// Register stores a new context initializer that runs on app context creation
|
||||
func Register(f Initializer) {
|
||||
inits = append(inits, f)
|
||||
}
|
Reference in New Issue
Block a user