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

Distribution interface refactoring plan #354

Closed
6 of 7 tasks
stevvooe opened this issue Apr 13, 2015 · 5 comments
Closed
6 of 7 tasks

Distribution interface refactoring plan #354

stevvooe opened this issue Apr 13, 2015 · 5 comments

Comments

@stevvooe
Copy link
Collaborator

Over the next few weeks, we need to make several changes to the distribution interfaces to support their role as a client to the registry.

The following is a rough list of the goals we'd like to accomplish:

Other issues may be filed to further explain details of these items.

@xiekeyang
Copy link

@stevvooe
On sub-issue of "Separate TagService from manifest service"
According to your proposal in this issue and "TODO" comment in registry.go, I assume you want service to be refactored as,
ManifestService

type ManifestService interface {
    // Exists returns true if the manifest exists.
    Exists(dgst digest.Digest) (bool, error)

    // Get retrieves the identified by the digest, if it exists.
    Get(dgst digest.Digest) (*manifest.SignedManifest, error)

    // Delete removes the manifest, if it exists.
    Delete(dgst digest.Digest) error

    // Put creates or updates the manifest.
    Put(manifest *manifest.SignedManifest) error
}

tagService

type tagService interface {
    // TODO(stevvooe): The methods after this message should be moved to a
    // discrete TagService, per active proposals.

    // Tags lists the tags under the named repository.
    Tags() ([]string, error)

    // ExistsByTag returns true if the manifest exists.
    ExistsByTag(tag string) (bool, error)

    // GetByTag retrieves the named manifest, if it exists.
    GetByTag(tag string) (*manifest.SignedManifest, error)
}

And remove tagStore field from manifestStore. Am I correct?
Thanks a lot!

@stevvooe
Copy link
Collaborator Author

stevvooe commented May 1, 2015

@xiekeyang Yes, this is the plan. However, this plan is somewhat ordered. We first must do the distribution.Blob refactor then we can undertake the other parts. I am currently working on this.

@xiekeyang
Copy link

@stevvooe
Refactor Blob Service API #519 is done. Then, do you have the plan to start refactoring what we talk above (separation tag service to manifest service)? Thanks a lot!

@stevvooe
Copy link
Collaborator Author

@xiekeyang Yes, that is the plan. We may want to decouple the manifest structure first but the ordering is not important. I'm starting this work later this week.

@xiekeyang
Copy link

@stevvooe Are there any help-wanted kind of job on refactor issues? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants