-
Notifications
You must be signed in to change notification settings - Fork 275
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
Clean up storage.PutOptions #2596
Conversation
// This is a suggestion, implementations may choose to ignore this option. | ||
func PutWithSuggestedChunkSize(suggestedChunkSize int) PutOption { | ||
return func(putOptions *putOptions) { | ||
putOptions.suggestedChunkSize = &suggestedChunkSize |
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.
Should we ignore negative values here?
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.
Done
} | ||
|
||
func (p *putOptions) SuggestedDisableChunking() bool { | ||
return p.suggestedChunkSize != nil && *p.suggestedChunkSize == 0 |
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.
If we don't prevent negative values we should change the conditional from == to <= here.
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.
Done
Use an interface so these can only be built by the
storage
package, clean up docs, clean up meaning of 0.