...
1
2
3 package wclayer
4
5 import (
6 "context"
7
8 "github.com/Microsoft/hcsshim/internal/hcserror"
9 "github.com/Microsoft/hcsshim/internal/oc"
10 "go.opencensus.io/trace"
11 )
12
13
14
15 func DestroyLayer(ctx context.Context, path string) (err error) {
16 title := "hcsshim::DestroyLayer"
17 ctx, span := oc.StartSpan(ctx, title)
18 defer span.End()
19 defer func() { oc.SetSpanStatus(span, err) }()
20 span.AddAttributes(trace.StringAttribute("path", path))
21
22 err = destroyLayer(&stdDriverInfo, path)
23 if err != nil {
24 return hcserror.New(err, title, "")
25 }
26 return nil
27 }
28
View as plain text