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

implementing disk storage for the proxy #20

Merged
merged 17 commits into from
Mar 9, 2018
Merged

implementing disk storage for the proxy #20

merged 17 commits into from
Mar 9, 2018

Conversation

arschles
Copy link
Member

@arschles arschles commented Mar 1, 2018

Fixes #5

@arschles arschles requested a review from bketelsen March 1, 2018 23:35
@bketelsen
Copy link
Contributor

direction looks good to me.

// ListerSaver is the only interface defined by the disk storage. Use
// NewListerSaver to create one of these. Everything is all in one
// because it all has to share the same tree
type ListerSaver interface {
Copy link
Member

Choose a reason for hiding this comment

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

don't want to brag about naming so soon but can't this be just a Storage or StorageSystem? ListerSaver seems very weird to me

@arschles
Copy link
Member Author

arschles commented Mar 2, 2018 via email

@michalpristas
Copy link
Member

I can't place 👍 to a commit

@arschles arschles force-pushed the disk-storage branch 3 times, most recently from 676787a to 94f57d7 Compare March 8, 2018 20:35
@arschles arschles changed the title [WIP] implementing disk storage implementing disk storage Mar 8, 2018
@arschles arschles changed the title implementing disk storage implementing disk storage for the proxy Mar 8, 2018
Copy link
Contributor

@bketelsen bketelsen left a comment

Choose a reason for hiding this comment

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

Overall looks great - my only comment in general is whether there needs to be some sort of lock to prevent duplication or corruption on multiple submissions of same package/version combo?

)

var (
mod = []byte("123")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a note for future us that a wider variety of file sizes would be useful to catch possible edge cases - especially related to http and buffers, etc.

"github.com/gomods/athens/pkg/storage"
)

func (v *storageImpl) Get(baseURL, module, vsn string) (*storage.Version, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: vsn is almost unclear, and version isn't too many more characters. Feel free to ignore

@bketelsen bketelsen merged commit af39d0a into master Mar 9, 2018
@arschles arschles deleted the disk-storage branch March 9, 2018 15:01
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