forked from opencontainers/umoci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oci/cas: Add Engine.CAS() as a step towards decoupling CAS and refs
This commit hard-codes the blobs/{algorithm}/{encoded} template [1], but sets the stage for future work to relax that positioning [2]. I'm adding a PutIndex call in the tests, becase the CAS implementation now has its own temp directory which is not known to the dirEngine. Casengine's dir implementation does not use .umoci-* temporary directories (it uses .casengine-* temporary directories), so it's protected from Clean. And the .casengine-* implementation does not currently provide it's own Clean() implementation, although I may add that in the future. The "Deprecated:" syntax is discussed in [3,4,5]. Also adjust Close() to return the first error it encounters, but to continue to optimistically attempt the remaining cleanup, logging any subsequent errors. Bumping go-mtree pulls in [6] and gives us a lowercase sirupsen import that is compatible with oci-discovery and casengine. [1]: https://github.com/opencontainers/image-spec/blob/v1.0.0/image-layout.md#blobs [2]: https://github.com/openSUSE/umoci/pull/190 [3]: https://blog.golang.org/godoc-documenting-go-code [4]: golang/blog@257114a [5]: golang/go#10909 [6]: vbatts/go-mtree#144 Signed-off-by: W. Trevor King <wking@tremily.us>
- Loading branch information
Showing
4 changed files
with
111 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters