mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-22 14:53:30 +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>
25 lines
573 B
Go
Generated
25 lines
573 B
Go
Generated
//go:build windows
|
|
|
|
package wclayer
|
|
|
|
import (
|
|
"context"
|
|
"path/filepath"
|
|
|
|
"github.com/Microsoft/go-winio/pkg/guid"
|
|
"github.com/Microsoft/hcsshim/internal/oc"
|
|
"go.opencensus.io/trace"
|
|
)
|
|
|
|
// LayerID returns the layer ID of a layer on disk.
|
|
func LayerID(ctx context.Context, path string) (_ guid.GUID, err error) {
|
|
title := "hcsshim::LayerID"
|
|
ctx, span := oc.StartSpan(ctx, title)
|
|
defer span.End()
|
|
defer func() { oc.SetSpanStatus(span, err) }()
|
|
span.AddAttributes(trace.StringAttribute("path", path))
|
|
|
|
_, file := filepath.Split(path)
|
|
return NameToGuid(ctx, file)
|
|
}
|