MCPcopy Index your code
hub / github.com/containerd/containerd / lockSnChainID

Method lockSnChainID

core/unpack/unpacker.go:717–726  ·  view source on GitHub ↗
(ctx context.Context, chainID, snapshotter string)

Source from the content-addressed store, hash-verified

715}
716
717func (u *Unpacker) lockSnChainID(ctx context.Context, chainID, snapshotter string) (func(), error) {
718 key := u.makeChainIDKeyWithSnapshotter(chainID, snapshotter)
719
720 if err := u.duplicationSuppressor.Lock(ctx, key); err != nil {
721 return nil, err
722 }
723 return func() {
724 u.duplicationSuppressor.Unlock(key)
725 }, nil
726}
727
728func (u *Unpacker) lockBlobDescriptor(ctx context.Context, desc ocispec.Descriptor) (func(), error) {
729 key := u.makeBlobDescriptorKey(desc)

Callers 1

unpackMethod · 0.95

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected