...
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
16
17 func ActivateLayer(ctx context.Context, path string) (err error) {
18 title := "hcsshim::ActivateLayer"
19 ctx, span := oc.StartSpan(ctx, title)
20 defer span.End()
21 defer func() { oc.SetSpanStatus(span, err) }()
22 span.AddAttributes(trace.StringAttribute("path", path))
23
24 err = activateLayer(&stdDriverInfo, path)
25 if err != nil {
26 return hcserror.New(err, title, "")
27 }
28 return nil
29 }
30
View as plain text