Skip to content

Distribution interface refactoring plan #354

Closed

Description

@stevvooe

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.

Activity

  1. added this to the Registry/2.1 milestone on Apr 13, 2015
  2. xiekeyang commented on Apr 30, 2015

    @xiekeyang

    @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!

  3. stevvooe commented on May 1, 2015

    @stevvooe
    CollaboratorAuthor

    @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.

  4. xiekeyang commented on May 18, 2015

    @xiekeyang

    @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!

  5. stevvooe commented on May 18, 2015

    @stevvooe
    CollaboratorAuthor

    @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.

  6. xiekeyang commented on May 19, 2015

    @xiekeyang

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

  7. removed this from the Registry/2.3 milestone on Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions