vendor: update buildkit to opentelemetry support

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2021-06-15 21:02:39 -07:00
parent 6ba080d337
commit 334c93fbbe
829 changed files with 89541 additions and 24438 deletions

View File

@ -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() {

View 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)
}