mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-19 12:36:38 +00:00
Migrate to containerd 1.54
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
4c9c66812a
commit
2ae8b31ac0
32
vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
generated
vendored
32
vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
generated
vendored
@ -1,23 +1,41 @@
|
||||
package wclayer
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/Microsoft/hcsshim/internal/oc"
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
|
||||
// ProcessBaseLayer post-processes a base layer that has had its files extracted.
|
||||
// The files should have been extracted to <path>\Files.
|
||||
func ProcessBaseLayer(path string) error {
|
||||
err := processBaseImage(path)
|
||||
func ProcessBaseLayer(ctx context.Context, path string) (err error) {
|
||||
title := "hcsshim::ProcessBaseLayer"
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("path", path))
|
||||
|
||||
err = processBaseImage(path)
|
||||
if err != nil {
|
||||
return &os.PathError{Op: "ProcessBaseLayer", Path: path, Err: err}
|
||||
return &os.PathError{Op: title, Path: path, Err: err}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProcessUtilityVMImage post-processes a utility VM image that has had its files extracted.
|
||||
// The files should have been extracted to <path>\Files.
|
||||
func ProcessUtilityVMImage(path string) error {
|
||||
err := processUtilityImage(path)
|
||||
func ProcessUtilityVMImage(ctx context.Context, path string) (err error) {
|
||||
title := "hcsshim::ProcessUtilityVMImage"
|
||||
ctx, span := trace.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("path", path))
|
||||
|
||||
err = processUtilityImage(path)
|
||||
if err != nil {
|
||||
return &os.PathError{Op: "ProcessUtilityVMImage", Path: path, Err: err}
|
||||
return &os.PathError{Op: title, Path: path, Err: err}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user