-
Notifications
You must be signed in to change notification settings - Fork 491
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
Conversation
direction looks good to me. |
pkg/storage/disk/disk.go
Outdated
// 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 { |
There was a problem hiding this comment.
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
Fair enough! These interface names are all over the map; I’ll standardize.
…On Fri, Mar 2, 2018 at 06:53 Michal Pristas ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/storage/disk/disk.go
<#20 (comment)>:
> @@ -0,0 +1,41 @@
+package disk
+
+import (
+ "io/ioutil"
+ "path/filepath"
+
+ "github.com/gomods/athens/pkg/storage"
+)
+
+// 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 {
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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEU0c3IZHQgILLPpXBSd4RRzKds0s6lks5taVzVgaJpZM4SZK7o>
.
|
I can't place 👍 to a commit |
676787a
to
94f57d7
Compare
It’s unnecessary
There was a problem hiding this 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?
pkg/storage/disk/all_test.go
Outdated
) | ||
|
||
var ( | ||
mod = []byte("123") |
There was a problem hiding this comment.
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.
pkg/storage/disk/getter.go
Outdated
"github.com/gomods/athens/pkg/storage" | ||
) | ||
|
||
func (v *storageImpl) Get(baseURL, module, vsn string) (*storage.Version, error) { |
There was a problem hiding this comment.
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
Fixes #5