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)
| 62 | // Since we have only two policies right now, it's simpler using bool to |
| 63 | // represent it internally. |
| 64 | func newContentStore(db *DB, shared bool, cs content.Store) *contentStore { |
| 65 | return &contentStore{ |
| 66 | Store: cs, |
| 67 | db: db, |
| 68 | shared: shared, |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func (cs *contentStore) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) { |
| 73 | ns, err := namespaces.NamespaceRequired(ctx) |
no outgoing calls
no test coverage detected
searching dependent graphs…