mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-08 16:06:47 +00:00
* Updates containerd to v1.7.0 and new binary for 32-bit Arm OSes. * Updates Go dependencies - openfaas and external Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
29 lines
813 B
Go
Generated
29 lines
813 B
Go
Generated
//go:build windows
|
|
|
|
package computestorage
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/Microsoft/hcsshim/internal/oc"
|
|
"github.com/pkg/errors"
|
|
"go.opencensus.io/trace"
|
|
)
|
|
|
|
// DetachLayerStorageFilter detaches the layer storage filter on a writable container layer.
|
|
//
|
|
// `layerPath` is a path to a directory containing the layer to export.
|
|
func DetachLayerStorageFilter(ctx context.Context, layerPath string) (err error) {
|
|
title := "hcsshim::DetachLayerStorageFilter"
|
|
ctx, span := oc.StartSpan(ctx, title) //nolint:ineffassign,staticcheck
|
|
defer span.End()
|
|
defer func() { oc.SetSpanStatus(span, err) }()
|
|
span.AddAttributes(trace.StringAttribute("layerPath", layerPath))
|
|
|
|
err = hcsDetachLayerStorageFilter(layerPath)
|
|
if err != nil {
|
|
return errors.Wrap(err, "failed to detach layer storage filter")
|
|
}
|
|
return nil
|
|
}
|