Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish internal/private.ImageDestination #1462

Merged
merged 5 commits into from Feb 11, 2022
Merged

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Feb 11, 2022

Based on the #1439 experiment, this is trying to establish the common type, so that we can then separately work on the client-side wrapper, and the implementation-side compat/helper infrastructure.

This includes some commits from #1439; the new part is a proposal to, instead of using publicTypes "…/v5/types" and internalTypes "…/v5/internal/types, with internalTypes.ImageDestinationWithOptions, to use types "…/v5/types"(as we used to) andprivate "…/v5/internal/private", with private.ImageDestination`.

The “private” name, as well as all other aspects, is certainly open for debate.

See individual commits for details.

@vrothberg WDYT?

The goal is to establish a practical/convenient naming for
internal-only interfaces, now that we are going to start using them
much more frequently.

Design concerns:
- Don't duplicate any public package name (to avoid the
  publicTypes/internalTypes names in every single user).
  Rules out "types", "image" (as in "image.Destination").
- Don't just use "internal", to keep that around for
  very localized private utilities, like oci/internal

"private", as a more or less synonym to "internal", seems
to work acceptably well: we will have types.ImageDestination
and private.ImageDestination.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... to ensure we don't break anything by refactoring.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
We now have types.ImageDestination (public) and private.ImageDestination.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
... purely to be consistent with public types.ImageDestination.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Document the API of the methods, not how it differs from
other methods.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's do this 😱

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2022

LGTM

@rhatdan rhatdan merged commit 8d40d56 into containers:main Feb 11, 2022
@mtrmac mtrmac deleted the private branch February 11, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants