mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-18 12:06:36 +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
13
vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
generated
vendored
13
vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go
generated
vendored
@ -1,13 +1,22 @@
|
||||
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(path string) (guid.GUID, error) {
|
||||
func LayerID(ctx context.Context, path string) (_ guid.GUID, err error) {
|
||||
title := "hcsshim::LayerID"
|
||||
ctx, span := trace.StartSpan(ctx, title)
|
||||
defer span.End()
|
||||
defer func() { oc.SetSpanStatus(span, err) }()
|
||||
span.AddAttributes(trace.StringAttribute("path", path))
|
||||
|
||||
_, file := filepath.Split(path)
|
||||
return NameToGuid(file)
|
||||
return NameToGuid(ctx, file)
|
||||
}
|
||||
|
Reference in New Issue
Block a user