MCPcopy
hub / github.com/containerd/containerd / newContentStore

Function newContentStore

core/metadata/content.go:64–70  ·  view source on GitHub ↗

newContentStore returns a namespaced content store using an existing content store interface. policy defines the sharing behavior for content between namespaces. Both modes will result in shared storage in the backend for committed. Choose "shared" to prevent separate namespaces from having to pull

(db *DB, shared bool, cs content.Store)

Source from the content-addressed store, hash-verified

62// Since we have only two policies right now, it's simpler using bool to
63// represent it internally.
64func newContentStore(db *DB, shared bool, cs content.Store) *contentStore {
65 return &contentStore{
66 Store: cs,
67 db: db,
68 shared: shared,
69 }
70}
71
72func (cs *contentStore) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) {
73 ns, err := namespaces.NamespaceRequired(ctx)

Callers 1

NewDBFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…