![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.9.9 to 0.11.1. - [Release notes](https://github.com/Microsoft/hcsshim/releases) - [Commits](https://github.com/Microsoft/hcsshim/compare/v0.9.9...v0.11.1) --- updated-dependencies: - dependency-name: github.com/Microsoft/hcsshim dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
//go:build windows
|
|
|
|
package wclayer
|
|
|
|
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(ctx context.Context, path string) (err error) {
|
|
title := "hcsshim::ProcessBaseLayer"
|
|
ctx, span := oc.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: 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(ctx context.Context, path string) (err error) {
|
|
title := "hcsshim::ProcessUtilityVMImage"
|
|
ctx, span := oc.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: title, Path: path, Err: err}
|
|
}
|
|
return nil
|
|
}
|