luet/vendor/github.com/moby/buildkit/util/tracing/multispan.go
Ettore Di Giacinto 92e18d5782 Support priv/unpriv image extraction
Optionally add back privileged extraction which can be enabled with
LUET_PRIVILEGED_EXTRACT=true

Signed-off-by: Ettore Di Giacinto <mudler@sabayon.org>
2021-06-16 23:30:28 +02:00

23 lines
442 B
Go

package tracing
import (
opentracing "github.com/opentracing/opentracing-go"
)
// MultiSpan allows shared tracing to multiple spans.
// TODO: This is a temporary solution and doesn't really support shared tracing yet. Instead the first always wins.
type MultiSpan struct {
opentracing.Span
}
func NewMultiSpan() *MultiSpan {
return &MultiSpan{}
}
func (ms *MultiSpan) Add(s opentracing.Span) {
if ms.Span == nil {
ms.Span = s
}
}